diff --git a/version.php b/version.php index 3e4e929..1963f80 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'mod_pdfannotator'; -$plugin->version = 2023041400; +$plugin->version = 2023041900; $plugin->release = 'PDF Annotator v1.5 release 3'; $plugin->requires = 2021051700; $plugin->maturity = MATURITY_STABLE; diff --git a/view.php b/view.php index 006664b..dd2e2bb 100644 --- a/view.php +++ b/view.php @@ -76,11 +76,15 @@ // Display course name, navigation bar at the very top and "Dashboard->...->..." bar. echo $OUTPUT->header(); + // Render the activity information. -$modinfo = get_fast_modinfo($course); -$cminfo = $modinfo->get_cm($cm->id); -$completiondetails = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id); -$activitydates = \core\activity_dates::get_dates_for_module($cminfo, $USER->id); +if ($CFG->version < 2022041900) { + $modinfo = get_fast_modinfo($course); + $cminfo = $modinfo->get_cm($cm->id); + $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); +} require_once($CFG->dirroot . '/mod/pdfannotator/controller.php');