diff --git a/mod/survey/report.php b/mod/survey/report.php index c289363e523..6fd60686891 100644 --- a/mod/survey/report.php +++ b/mod/survey/report.php @@ -94,15 +94,16 @@ $PAGE->set_title("$course->shortname: ".format_string($survey->name)); $PAGE->set_heading($course->fullname); + $PAGE->activityheader->set_attrs([ + 'hidecompletion' => true, + 'description' => '' + ]); // Activate the secondary nav tab. navigation_node::override_active_url(new moodle_url('/mod/survey/report.php', ['id' => $id, 'action' => 'summary'])); $actionbar = new \mod_survey\output\actionbar($id, $action, $url); echo $OUTPUT->header(); -if (!$PAGE->has_secondary_navigation()) { - echo $OUTPUT->heading(format_string($survey->name)); -} $renderer = $PAGE->get_renderer('mod_survey'); echo $renderer->response_actionbar($actionbar); diff --git a/mod/survey/view.php b/mod/survey/view.php index 2ddfe863ca0..5ccfc3d7005 100644 --- a/mod/survey/view.php +++ b/mod/survey/view.php @@ -70,15 +70,12 @@ if ($surveyalreadydone) { $strsurvey = get_string("modulename", "survey"); $PAGE->set_title($survey->name); $PAGE->set_heading($course->fullname); -echo $OUTPUT->header(); -if (!$PAGE->has_secondary_navigation()) { - echo $OUTPUT->heading(format_string($survey->name)); +// No need to show the description if the survey is done and a graph page is to be shown. +if ($surveyalreadydone && $showscales) { + $PAGE->activityheader->set_description(''); } -// Render the activity information. -$completiondetails = \core_completion\cm_completion_details::get_instance($cm, $USER->id); -$activitydates = \core\activity_dates::get_dates_for_module($cm, $USER->id); -echo $OUTPUT->activity_information($cm, $completiondetails, $activitydates); +echo $OUTPUT->header(); // Check to see if groups are being used in this survey. if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used. @@ -119,7 +116,6 @@ if ($surveyalreadydone) { } else { - echo $OUTPUT->box(format_module_intro('survey', $survey, $cm->id), 'generalbox', 'intro'); echo $OUTPUT->spacer(array('height' => 30, 'width' => 1), true); // Should be done with CSS instead. $questions = survey_get_questions($survey); @@ -147,7 +143,6 @@ echo '