diff --git a/mod/wiki/files.php b/mod/wiki/files.php index 16f3f732e89..06e62d079d5 100644 --- a/mod/wiki/files.php +++ b/mod/wiki/files.php @@ -89,20 +89,9 @@ $PAGE->navbar->add(format_string(get_string('wikifiles', 'wiki'))); $PAGE->set_secondary_active_tab('modulepage'); echo $OUTPUT->header(); -if (!$PAGE->has_secondary_navigation()) { - echo $OUTPUT->heading(format_string($wiki->name)); -} - -// Render the activity information. -$cminfo = cm_info::create($cm); -$completiondetails = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id); -$activitydates = \core\activity_dates::get_dates_for_module($cminfo, $USER->id); -echo $OUTPUT->activity_information($cminfo, $completiondetails, $activitydates); $renderer = $PAGE->get_renderer('mod_wiki'); -echo $OUTPUT->box(format_module_intro('wiki', $wiki, $PAGE->cm->id), 'generalbox', 'intro'); - $actionbar = new \mod_wiki\output\action_bar($pageid, $PAGE->url); echo $renderer->render_action_bar($actionbar); diff --git a/mod/wiki/filesedit.php b/mod/wiki/filesedit.php index 41d363ebd32..e292abf1cfd 100644 --- a/mod/wiki/filesedit.php +++ b/mod/wiki/filesedit.php @@ -79,6 +79,9 @@ $PAGE->set_heading($course->fullname); $PAGE->navbar->add(format_string(get_string('wikifiles', 'wiki')), $CFG->wwwroot . '/mod/wiki/files.php?pageid=' . $pageid); $PAGE->navbar->add(format_string($title)); $PAGE->set_secondary_active_tab('modulepage'); +$PAGE->activityheader->set_attrs([ + 'hidecompletion' => true +]); $data = new stdClass(); $data->returnurl = $returnurl; @@ -98,8 +101,6 @@ if ($mform->is_cancelled()) { } echo $OUTPUT->header(); -echo $OUTPUT->heading(format_string($wiki->name)); -echo $OUTPUT->box(format_module_intro('wiki', $wiki, $PAGE->cm->id), 'generalbox', 'intro'); echo $OUTPUT->box_start('generalbox'); $mform->display(); echo $OUTPUT->box_end(); diff --git a/mod/wiki/pagelib.php b/mod/wiki/pagelib.php index 97e4e2709f7..8496d3978cf 100644 --- a/mod/wiki/pagelib.php +++ b/mod/wiki/pagelib.php @@ -125,7 +125,7 @@ abstract class page_wiki { * This method prints the top of the page. */ function print_header() { - global $OUTPUT, $PAGE, $CFG, $USER, $SESSION; + global $OUTPUT, $PAGE, $SESSION; $PAGE->set_heading($PAGE->course->fullname); @@ -138,12 +138,6 @@ abstract class page_wiki { $this->create_navbar(); echo $OUTPUT->header(); - $wiki = $PAGE->activityrecord; - if (!$PAGE->has_secondary_navigation()) { - echo $OUTPUT->heading(format_string($wiki->name)); - } - - echo $this->wikioutput->wiki_info(); if (!empty($this->page)) { echo $this->action_bar($this->page->id, $PAGE->url); diff --git a/mod/wiki/renderer.php b/mod/wiki/renderer.php index 78214a19bbc..dcd68384dbf 100644 --- a/mod/wiki/renderer.php +++ b/mod/wiki/renderer.php @@ -234,9 +234,21 @@ class mod_wiki_renderer extends plugin_renderer_base { return $output; } + + /** + * Print the wiki activity information and intro + * + * @return string + * @deprecated since 4.0. Now handled in PAGE's activity header + */ public function wiki_info() { global $USER; + debugging( + 'wiki_info() is deprecated. Output is handled within the $PAGE->activityheader instead.', + DEBUG_DEVELOPER + ); + // Display any activity information (eg completion requirements / dates). $cminfo = cm_info::create($this->page->cm); $completiondetails = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id); diff --git a/mod/wiki/upgrade.txt b/mod/wiki/upgrade.txt index 6f643bf87b8..00c7cf67bcd 100644 --- a/mod/wiki/upgrade.txt +++ b/mod/wiki/upgrade.txt @@ -1,5 +1,7 @@ This files describes API changes in /mod/wiki/*, information provided here is intended especially for developers. +=== 4.0 === +* wiki_info has been deprecated. Output will be handled within the $PAGE->activityheader instead. === 3.8 === * The following functions have been finally deprecated and can not be used anymore: