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));
        }
    }
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));
        }
    }
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 ) ) ; } }
Fill the discussion cache.

@param   int[]       $discussionids
Fill the discussion cache .