MDL-71161 mod_scorm: Display activity completion information

This commit is contained in:
Michael Hawkins 2021-03-22 17:45:50 +08:00 committed by Jun Pataleta
parent 1a596574ba
commit 920646237d

View File

@ -139,6 +139,12 @@ $PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
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'));