MDL-71161 mod_imscp: Display activity information output component

This commit is contained in:
Jun Pataleta 2021-03-25 16:36:00 +08:00
parent 16a9e8ada7
commit 23cb701a75

View File

@ -70,6 +70,13 @@ if (!$imscp->structure) {
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($imscp->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);
// Info box.
if ($imscp->intro) {
echo $OUTPUT->box(format_module_intro('imscp', $imscp, $cm->id), 'generalbox', 'intro');