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.
This commit is contained in:
Kumi 2024-10-21 14:45:07 +02:00
parent 4a7f631532
commit 897724127c
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -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;