mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-72413 folder: Use the common module for setting the header
This commit is contained in:
parent
7e5b0f6289
commit
93782ecdb9
@ -47,10 +47,7 @@ class mod_folder_renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
if (trim($folder->intro)) {
|
||||
if ($folder->display != FOLDER_DISPLAY_INLINE) {
|
||||
$output .= $this->output->box(format_module_intro('folder', $folder, $cm->id),
|
||||
'generalbox', 'intro');
|
||||
} else if ($cm->showdescription) {
|
||||
if ($folder->display == FOLDER_DISPLAY_INLINE && $cm->showdescription) {
|
||||
// for "display inline" do not filter, filters run at display time.
|
||||
$output .= format_module_intro('folder', $folder, $cm->id, false);
|
||||
}
|
||||
|
@ -69,21 +69,10 @@ $PAGE->set_title($course->shortname.': '.$folder->name);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->set_activity_record($folder);
|
||||
|
||||
|
||||
$output = $PAGE->get_renderer('mod_folder');
|
||||
|
||||
echo $output->header();
|
||||
|
||||
if (!$PAGE->has_secondary_navigation()) {
|
||||
echo $output->heading(format_string($folder->name), 2);
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
echo $output->display_folder($folder);
|
||||
|
||||
echo $output->footer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user