original_string: protected function fill_discussion_cache($discussionids) {
          global $DB;
  
          if (empty($discussionids)) {
              $this->discussion = [];
          } else {
  
              $requiredfields = [
                      'id',
                      'groupid',
                      'firstpost',
                      'timestart',
                      'timeend',
                  ];
  
              list($in, $params) = $DB->get_in_or_equal($discussionids);
              $this->discussions = $DB->get_records_select(
                      'forum_discussions', "id $in", $params, '', implode(', ', $requiredfields));
          }
      }
code: protected function fill_discussion_cache($discussionids) {
          global $DB;
  
          if (empty($discussionids)) {
              $this->discussion = [];
          } else {
  
              $requiredfields = [
                      'id',
                      'groupid',
                      'firstpost',
                      'timestart',
                      'timeend',
                  ];
  
              list($in, $params) = $DB->get_in_or_equal($discussionids);
              $this->discussions = $DB->get_records_select(
                      'forum_discussions', "id $in", $params, '', implode(', ', $requiredfields));
          }
      }
code_tokens: protected function fill_discussion_cache ( $ discussionids ) { global $ DB ; if ( empty ( $ discussionids ) ) { $ this -> discussion = [ ] ; } else { $ requiredfields = [ 'id' , 'groupid' , 'firstpost' , 'timestart' , 'timeend' , ] ; list ( $ in , $ params ) = $ DB -> get_in_or_equal ( $ discussionids ) ; $ this -> discussions = $ DB -> get_records_select ( 'forum_discussions' , "id $in" , $ params , '' , implode ( ', ' , $ requiredfields ) ) ; } }
docstring: Fill the discussion cache.
  
  @param   int[]       $discussionids
docstring_tokens: Fill the discussion cache .