Skip to content

Commit

Permalink
Fix for #179
Browse files Browse the repository at this point in the history
  • Loading branch information
ndunand committed Nov 15, 2022
1 parent 2735c00 commit e35885a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions view.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,15 @@
}
}

if (class_exists('\core_completion\cm_completion_details') && class_exists('\core\activity_dates')) {
// Show the activity dates and completion details.
$modinfo = get_fast_modinfo($course);
$cminfo = $modinfo->get_cm($cm->id);
$cmcompletion = \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, $cmcompletion, $activitydates);
if ($CFG->branch < 400) {
if (class_exists('\core_completion\cm_completion_details') && class_exists('\core\activity_dates')) {
// Show the activity dates and completion details.
$modinfo = get_fast_modinfo($course);
$cminfo = $modinfo->get_cm($cm->id);
$cmcompletion = \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, $cmcompletion, $activitydates);
}
}

/// Check to see if groups are being used in this choicegroup
Expand Down

0 comments on commit e35885a

Please sign in to comment.