From abcbc5eb0cf431cd028444ac9e7b417621ef4ac2 Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Thu, 11 Mar 2021 16:37:24 +0800 Subject: [PATCH] MDL-71161 mod_glossary: show glossary activity info --- mod/glossary/view.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mod/glossary/view.php b/mod/glossary/view.php index adadafe2c0a..c363643f8a4 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -46,6 +46,7 @@ if (!empty($id)) { } else { print_error('invalidid', 'glossary'); } +$cm = cm_info::create($cm); require_course_login($course->id, true, $cm); $context = context_module::instance($cm->id); @@ -298,6 +299,11 @@ if ($tab == GLOSSARY_APPROVAL_VIEW) { } echo $OUTPUT->heading(format_string($glossary->name), 2); +// 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); + /// All this depends if whe have $showcommonelements if ($showcommonelements) { /// To calculate available options