mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-70817 mod_choice: Show choice activity info
This commit is contained in:
parent
dd32d65f3a
commit
469f035a4c
@ -19,6 +19,7 @@ $PAGE->set_url($url);
|
||||
if (! $cm = get_coursemodule_from_id('choice', $id)) {
|
||||
print_error('invalidcoursemodule');
|
||||
}
|
||||
$cm = cm_info::create($cm);
|
||||
|
||||
if (! $course = $DB->get_record("course", array("id" => $cm->course))) {
|
||||
print_error('coursemisconf');
|
||||
@ -99,6 +100,11 @@ choice_view($choice, $course, $cm, $context);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(format_string($choice->name), 2, null);
|
||||
|
||||
// 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);
|
||||
|
||||
if ($notify and confirm_sesskey()) {
|
||||
if ($notify === 'choicesaved') {
|
||||
echo $OUTPUT->notification(get_string('choicesaved', 'choice'), 'notifysuccess');
|
||||
|
Loading…
x
Reference in New Issue
Block a user