/** * page_wiki constructor * * @param $wiki. Current wiki * @param $subwiki. Current subwiki. * @param $cm. Current course_module. */ function __construct($wiki, $subwiki, $cm) { global $PAGE, $CFG; $this->subwiki = $subwiki; $this->modcontext = context_module::instance($PAGE->cm->id); // initialise wiki renderer $this->wikioutput = $PAGE->get_renderer('mod_wiki'); $PAGE->set_cacheable(true); $PAGE->set_cm($cm); $PAGE->set_activity_record($wiki); // the search box $PAGE->set_button(wiki_search_form($cm)); }
/** * page_wiki constructor * * @param $wiki. Current wiki * @param $subwiki. Current subwiki. * @param $cm. Current course_module. */ function __construct($wiki, $subwiki, $cm) { global $PAGE, $CFG; $this->subwiki = $subwiki; $this->cm = $cm; $this->modcontext = context_module::instance($this->cm->id); // initialise wiki renderer $this->wikioutput = $PAGE->get_renderer('mod_wiki'); $PAGE->set_cacheable(true); $PAGE->set_cm($cm); $PAGE->set_activity_record($wiki); // the search box if (!empty($subwiki->id)) { $search = optional_param('searchstring', null, PARAM_TEXT); $PAGE->set_button(wiki_search_form($cm, $search, $subwiki)); } }