From deed4fe2511797e2897cc5b7c6ea3c82a4a2d7c1 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 25 Jan 2023 15:24:04 +0000 Subject: [PATCH] MDL-77024 quiz: fix metatdata on log events Some had the wrong edulevel or crud --- mod/quiz/classes/event/attempt_manual_grading_completed.php | 2 +- mod/quiz/classes/event/attempt_preview_started.php | 2 +- mod/quiz/classes/event/attempt_reviewed.php | 2 +- mod/quiz/classes/event/attempt_summary_viewed.php | 2 +- mod/quiz/classes/event/page_break_created.php | 4 ++-- mod/quiz/classes/event/page_break_deleted.php | 4 ++-- mod/quiz/classes/event/question_manually_graded.php | 2 +- mod/quiz/classes/event/quiz_grade_updated.php | 2 +- mod/quiz/classes/event/quiz_repaginated.php | 2 +- mod/quiz/classes/event/section_break_created.php | 2 +- mod/quiz/classes/event/section_break_deleted.php | 2 +- mod/quiz/classes/event/section_shuffle_updated.php | 2 +- mod/quiz/classes/event/section_title_updated.php | 2 +- mod/quiz/classes/event/slot_created.php | 2 +- mod/quiz/classes/event/slot_deleted.php | 2 +- mod/quiz/classes/event/slot_mark_updated.php | 2 +- mod/quiz/classes/event/slot_moved.php | 2 +- mod/quiz/classes/event/slot_requireprevious_updated.php | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) diff --git a/mod/quiz/classes/event/attempt_manual_grading_completed.php b/mod/quiz/classes/event/attempt_manual_grading_completed.php index 5433a66d3cc..f16779149e5 100644 --- a/mod/quiz/classes/event/attempt_manual_grading_completed.php +++ b/mod/quiz/classes/event/attempt_manual_grading_completed.php @@ -28,7 +28,7 @@ class attempt_manual_grading_completed extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_attempts'; $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_OTHER; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public function get_description() { diff --git a/mod/quiz/classes/event/attempt_preview_started.php b/mod/quiz/classes/event/attempt_preview_started.php index 7b00db28e9b..f49e80bc0dd 100644 --- a/mod/quiz/classes/event/attempt_preview_started.php +++ b/mod/quiz/classes/event/attempt_preview_started.php @@ -47,7 +47,7 @@ class attempt_preview_started extends \core\event\base { */ protected function init() { $this->data['objecttable'] = 'quiz_attempts'; - $this->data['crud'] = 'r'; + $this->data['crud'] = 'c'; $this->data['edulevel'] = self::LEVEL_TEACHING; } diff --git a/mod/quiz/classes/event/attempt_reviewed.php b/mod/quiz/classes/event/attempt_reviewed.php index fbfdd8dc62a..ba1cd541623 100644 --- a/mod/quiz/classes/event/attempt_reviewed.php +++ b/mod/quiz/classes/event/attempt_reviewed.php @@ -47,7 +47,7 @@ class attempt_reviewed extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_attempts'; $this->data['crud'] = 'r'; - $this->data['edulevel'] = self::LEVEL_TEACHING; + $this->data['edulevel'] = self::LEVEL_PARTICIPATING; } /** diff --git a/mod/quiz/classes/event/attempt_summary_viewed.php b/mod/quiz/classes/event/attempt_summary_viewed.php index 385e2b356d3..0c22705301a 100644 --- a/mod/quiz/classes/event/attempt_summary_viewed.php +++ b/mod/quiz/classes/event/attempt_summary_viewed.php @@ -50,7 +50,7 @@ class attempt_summary_viewed extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_attempts'; $this->data['crud'] = 'r'; - $this->data['edulevel'] = self::LEVEL_TEACHING; + $this->data['edulevel'] = self::LEVEL_PARTICIPATING; } /** diff --git a/mod/quiz/classes/event/page_break_created.php b/mod/quiz/classes/event/page_break_created.php index c346a5b8c98..ee917547add 100644 --- a/mod/quiz/classes/event/page_break_created.php +++ b/mod/quiz/classes/event/page_break_created.php @@ -41,8 +41,8 @@ namespace mod_quiz\event; class page_break_created extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_slots'; - $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['crud'] = 'c'; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/page_break_deleted.php b/mod/quiz/classes/event/page_break_deleted.php index a3cd735e322..22cc5eee828 100644 --- a/mod/quiz/classes/event/page_break_deleted.php +++ b/mod/quiz/classes/event/page_break_deleted.php @@ -41,8 +41,8 @@ namespace mod_quiz\event; class page_break_deleted extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_slots'; - $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['crud'] = 'd'; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/question_manually_graded.php b/mod/quiz/classes/event/question_manually_graded.php index a77912ee3ed..e8a39e81b3d 100644 --- a/mod/quiz/classes/event/question_manually_graded.php +++ b/mod/quiz/classes/event/question_manually_graded.php @@ -48,7 +48,7 @@ class question_manually_graded extends \core\event\base { */ protected function init() { $this->data['objecttable'] = 'question'; - $this->data['crud'] = 'c'; + $this->data['crud'] = 'u'; $this->data['edulevel'] = self::LEVEL_TEACHING; } diff --git a/mod/quiz/classes/event/quiz_grade_updated.php b/mod/quiz/classes/event/quiz_grade_updated.php index 371b50d578f..df9be18eded 100644 --- a/mod/quiz/classes/event/quiz_grade_updated.php +++ b/mod/quiz/classes/event/quiz_grade_updated.php @@ -42,7 +42,7 @@ class quiz_grade_updated extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz'; $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/quiz_repaginated.php b/mod/quiz/classes/event/quiz_repaginated.php index a23575f1b92..fcfce229cf1 100644 --- a/mod/quiz/classes/event/quiz_repaginated.php +++ b/mod/quiz/classes/event/quiz_repaginated.php @@ -41,7 +41,7 @@ class quiz_repaginated extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz'; $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/section_break_created.php b/mod/quiz/classes/event/section_break_created.php index 6a7d7af7e7d..97c97b1b400 100644 --- a/mod/quiz/classes/event/section_break_created.php +++ b/mod/quiz/classes/event/section_break_created.php @@ -44,7 +44,7 @@ class section_break_created extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_sections'; $this->data['crud'] = 'c'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/section_break_deleted.php b/mod/quiz/classes/event/section_break_deleted.php index 57a831448aa..6dc7cbfeb7d 100644 --- a/mod/quiz/classes/event/section_break_deleted.php +++ b/mod/quiz/classes/event/section_break_deleted.php @@ -43,7 +43,7 @@ class section_break_deleted extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_sections'; $this->data['crud'] = 'd'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/section_shuffle_updated.php b/mod/quiz/classes/event/section_shuffle_updated.php index b43dba63597..6f1842d8f0c 100644 --- a/mod/quiz/classes/event/section_shuffle_updated.php +++ b/mod/quiz/classes/event/section_shuffle_updated.php @@ -43,7 +43,7 @@ class section_shuffle_updated extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_sections'; $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/section_title_updated.php b/mod/quiz/classes/event/section_title_updated.php index acdf3e8daaa..398fe0bb689 100644 --- a/mod/quiz/classes/event/section_title_updated.php +++ b/mod/quiz/classes/event/section_title_updated.php @@ -44,7 +44,7 @@ class section_title_updated extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_sections'; $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/slot_created.php b/mod/quiz/classes/event/slot_created.php index 6f0d49fd96c..5fb52b0f9cf 100644 --- a/mod/quiz/classes/event/slot_created.php +++ b/mod/quiz/classes/event/slot_created.php @@ -43,7 +43,7 @@ class slot_created extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_slots'; $this->data['crud'] = 'c'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/slot_deleted.php b/mod/quiz/classes/event/slot_deleted.php index 3935591e900..08e8f2f6719 100644 --- a/mod/quiz/classes/event/slot_deleted.php +++ b/mod/quiz/classes/event/slot_deleted.php @@ -42,7 +42,7 @@ class slot_deleted extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_slots'; $this->data['crud'] = 'd'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/slot_mark_updated.php b/mod/quiz/classes/event/slot_mark_updated.php index e02970bcbcc..8922627e57a 100644 --- a/mod/quiz/classes/event/slot_mark_updated.php +++ b/mod/quiz/classes/event/slot_mark_updated.php @@ -43,7 +43,7 @@ class slot_mark_updated extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_slots'; $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/slot_moved.php b/mod/quiz/classes/event/slot_moved.php index 583c6569919..92b77bf76b3 100644 --- a/mod/quiz/classes/event/slot_moved.php +++ b/mod/quiz/classes/event/slot_moved.php @@ -44,7 +44,7 @@ class slot_moved extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_slots'; $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() { diff --git a/mod/quiz/classes/event/slot_requireprevious_updated.php b/mod/quiz/classes/event/slot_requireprevious_updated.php index 031905da651..61c401fbe66 100644 --- a/mod/quiz/classes/event/slot_requireprevious_updated.php +++ b/mod/quiz/classes/event/slot_requireprevious_updated.php @@ -42,7 +42,7 @@ class slot_requireprevious_updated extends \core\event\base { protected function init() { $this->data['objecttable'] = 'quiz_slots'; $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['edulevel'] = self::LEVEL_TEACHING; } public static function get_name() {