mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-72413 scorm: Use the common module for setting the header
This commit is contained in:
parent
94886e96e7
commit
a292bb9ea7
@ -86,12 +86,13 @@ if (empty($noheader)) {
|
||||
|
||||
$PAGE->set_title("$course->shortname: ".format_string($scorm->name));
|
||||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->activityheader->set_attrs([
|
||||
'hidecompletion' => true,
|
||||
'description' => ''
|
||||
]);
|
||||
$PAGE->navbar->add($strreport, new moodle_url('/mod/scorm/report.php', array('id' => $cm->id)));
|
||||
|
||||
echo $OUTPUT->header();
|
||||
if (!$PAGE->has_secondary_navigation()) {
|
||||
echo $OUTPUT->heading(format_string($scorm->name));
|
||||
}
|
||||
}
|
||||
|
||||
// Open the selected Scorm report and display it.
|
||||
|
@ -136,17 +136,9 @@ if (empty($preventskip) && empty($launch) && (has_capability('mod/scorm:skipview
|
||||
|
||||
$PAGE->set_title($pagetitle);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
// Let the module handle the display.
|
||||
$PAGE->activityheader->set_description('');
|
||||
echo $OUTPUT->header();
|
||||
if (!$PAGE->has_secondary_navigation()) {
|
||||
echo $OUTPUT->heading(format_string($scorm->name));
|
||||
}
|
||||
|
||||
// Display any activity information (eg completion requirements / dates).
|
||||
$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);
|
||||
|
||||
if (!empty($action) && confirm_sesskey() && has_capability('mod/scorm:deleteownresponses', $contextmodule)) {
|
||||
if ($action == 'delete') {
|
||||
$confirmurl = new moodle_url($PAGE->url, array('action' => 'deleteconfirm'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user