From 897724127ccb0794d8c911acc399c9489ab73a28 Mon Sep 17 00:00:00 2001 From: Kumi Date: Mon, 21 Oct 2024 14:45:07 +0200 Subject: [PATCH] fix(observer): update event type for course completion check Changed event type from 'course_module_completion_updated' to 'attempt_submitted' within the observer to correctly trigger course completion checks upon quiz attempt submission. This aligns with the intended workflow of updating completion status when a quiz is attempted instead of a module update. This change ensures that the system accurately reflects users' progress and achieves synchronization with the quiz completion logic. --- classes/observer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/observer.php b/classes/observer.php index ddb7a41..17ece7f 100644 --- a/classes/observer.php +++ b/classes/observer.php @@ -6,7 +6,7 @@ defined('MOODLE_INTERNAL') || die(); class observer { - public static function check_course_completion(\core\event\course_module_completion_updated $event) + public static function check_course_completion(\mod_quiz\event\attempt_submitted $event) { global $DB;