From 402001c66300b4dde58138ac4bae51504b9b8cb5 Mon Sep 17 00:00:00 2001 From: "daniele.cordella" Date: Wed, 4 Oct 2023 13:09:37 +0200 Subject: [PATCH] deleted get_legacy_* methods from events classes --- classes/event/all_submissions_exported.php | 19 ------------------- classes/event/all_submissions_viewed.php | 19 ------------------- classes/event/all_usertemplates_viewed.php | 19 ------------------- classes/event/course_module_viewed.php | 1 - classes/event/form_previewed.php | 19 ------------------- classes/event/item_created.php | 19 ------------------- classes/event/item_deleted.php | 19 ------------------- classes/event/item_hidden.php | 19 ------------------- classes/event/item_modified.php | 19 ------------------- classes/event/item_shown.php | 19 ------------------- classes/event/mastertemplate_applied.php | 19 ------------------- classes/event/mastertemplate_saved.php | 19 ------------------- classes/event/submission_created.php | 19 ------------------- classes/event/submission_deleted.php | 19 ------------------- classes/event/submission_duplicated.php | 19 ------------------- classes/event/submission_modified.php | 19 ------------------- classes/event/submission_viewed.php | 19 ------------------- classes/event/submissions_imported.php | 19 ------------------- classes/event/submissiontopdf_downloaded.php | 19 ------------------- classes/event/usertemplate_applied.php | 19 ------------------- classes/event/usertemplate_deleted.php | 19 ------------------- classes/event/usertemplate_exported.php | 19 ------------------- classes/event/usertemplate_imported.php | 19 ------------------- classes/event/usertemplate_saved.php | 19 ------------------- 24 files changed, 438 deletions(-) diff --git a/classes/event/all_submissions_exported.php b/classes/event/all_submissions_exported.php index 98cb30460ae..81f32e53cc4 100644 --- a/classes/event/all_submissions_exported.php +++ b/classes/event/all_submissions_exported.php @@ -68,23 +68,4 @@ public function get_description() { public function get_url() { return new \moodle_url('/mod/surveypro/tools.php', ['id' => $this->contextinstanceid, 'section' => 'export']); } - - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'all submissions exported', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } } diff --git a/classes/event/all_submissions_viewed.php b/classes/event/all_submissions_viewed.php index bc3ebf47b98..960c69fd7dc 100644 --- a/classes/event/all_submissions_viewed.php +++ b/classes/event/all_submissions_viewed.php @@ -69,23 +69,4 @@ public function get_url() { $paramurl = ['id' => $this->contextinstanceid, 'section' => 'submissionslist']; return new \moodle_url('/mod/surveypro/view.php', $paramurl); } - - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'all submissions viewed', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } } diff --git a/classes/event/all_usertemplates_viewed.php b/classes/event/all_usertemplates_viewed.php index ca20f9477ee..013015fd4da 100644 --- a/classes/event/all_usertemplates_viewed.php +++ b/classes/event/all_usertemplates_viewed.php @@ -68,23 +68,4 @@ public function get_description() { public function get_url() { return new \moodle_url('/mod/surveypro/utemplates.php', ['id' => $this->contextinstanceid, 'section' => 'manage']); } - - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'all usertemplates viewed', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } } diff --git a/classes/event/course_module_viewed.php b/classes/event/course_module_viewed.php index 3c7d80ddf2b..059afd37d44 100644 --- a/classes/event/course_module_viewed.php +++ b/classes/event/course_module_viewed.php @@ -40,5 +40,4 @@ protected function init() { $this->data['objecttable'] = 'surveypro'; parent::init(); } - // You might need to override get_url() and get_legacy_log_data() if view mode needs to be stored as well. } diff --git a/classes/event/form_previewed.php b/classes/event/form_previewed.php index 860c9f97e70..2d354e104ea 100644 --- a/classes/event/form_previewed.php +++ b/classes/event/form_previewed.php @@ -68,23 +68,4 @@ public function get_description() { public function get_url() { return new \moodle_url('/mod/surveypro/layout.php', ['id' => $this->contextinstanceid, 'section' => 'preview']); } - - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'form previewed', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } } diff --git a/classes/event/item_created.php b/classes/event/item_created.php index 564086dc623..7475105db1c 100644 --- a/classes/event/item_created.php +++ b/classes/event/item_created.php @@ -76,25 +76,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/layout.php', $paramurl); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'item created', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/item_deleted.php b/classes/event/item_deleted.php index 83c126c53b1..fb13db25358 100644 --- a/classes/event/item_deleted.php +++ b/classes/event/item_deleted.php @@ -69,25 +69,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/layout.php', ['id' => $this->contextinstanceid, 'section' => 'itemslist']); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'item deleted', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/item_hidden.php b/classes/event/item_hidden.php index f2cd29c39ad..388339b1c8e 100644 --- a/classes/event/item_hidden.php +++ b/classes/event/item_hidden.php @@ -69,25 +69,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/layout.php', ['id' => $this->contextinstanceid, 'section' => 'itemslist']); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'item hidden', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/item_modified.php b/classes/event/item_modified.php index 253decad98d..c2ff72408c2 100644 --- a/classes/event/item_modified.php +++ b/classes/event/item_modified.php @@ -76,25 +76,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/layout.php', $paramurl); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'item modified', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/item_shown.php b/classes/event/item_shown.php index 68d9c93cdd2..64405179fa6 100644 --- a/classes/event/item_shown.php +++ b/classes/event/item_shown.php @@ -69,25 +69,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/layout.php', ['id' => $this->contextinstanceid, 'section' => 'itemslist']); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'item shown', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/mastertemplate_applied.php b/classes/event/mastertemplate_applied.php index 0f883a4cc85..7a19819da7b 100644 --- a/classes/event/mastertemplate_applied.php +++ b/classes/event/mastertemplate_applied.php @@ -69,25 +69,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/mtemplates.php', ['id' => $this->contextinstanceid, 'section' => 'apply']); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'mastertemplate applied', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/mastertemplate_saved.php b/classes/event/mastertemplate_saved.php index b28698ea760..d83a8079de4 100644 --- a/classes/event/mastertemplate_saved.php +++ b/classes/event/mastertemplate_saved.php @@ -69,25 +69,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/mtemplates.php', ['id' => $this->contextinstanceid, 'section' => 'save']); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'mastertemplate saved', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/submission_created.php b/classes/event/submission_created.php index 8deeb14f9a9..94884b57603 100644 --- a/classes/event/submission_created.php +++ b/classes/event/submission_created.php @@ -74,25 +74,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/view.php', $paramurl); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'submission created', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/submission_deleted.php b/classes/event/submission_deleted.php index ff96a83ea93..96ed26bca62 100644 --- a/classes/event/submission_deleted.php +++ b/classes/event/submission_deleted.php @@ -69,23 +69,4 @@ public function get_url() { $paramurl = ['id' => $this->contextinstanceid, 'section' => 'submissionslist']; return new \moodle_url('/mod/surveypro/view.php', $paramurl); } - - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'submission deleted', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } } diff --git a/classes/event/submission_duplicated.php b/classes/event/submission_duplicated.php index 309cc51f13f..549cb5987c7 100644 --- a/classes/event/submission_duplicated.php +++ b/classes/event/submission_duplicated.php @@ -69,23 +69,4 @@ public function get_url() { $paramurl = ['id' => $this->contextinstanceid, 'section' => 'submissionslist']; return new \moodle_url('/mod/surveypro/view.php', $paramurl); } - - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'submission duplicated', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } } diff --git a/classes/event/submission_modified.php b/classes/event/submission_modified.php index 45df9f1373b..63f8ab007fc 100644 --- a/classes/event/submission_modified.php +++ b/classes/event/submission_modified.php @@ -74,25 +74,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/view.php', $paramurl); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'submission modified', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/submission_viewed.php b/classes/event/submission_viewed.php index 7d3a42332c3..652fa5f3dbd 100644 --- a/classes/event/submission_viewed.php +++ b/classes/event/submission_viewed.php @@ -74,25 +74,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/view.php', $paramurl); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'submission viewed', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/submissions_imported.php b/classes/event/submissions_imported.php index 5a34b5ab86d..67a3b2d2718 100644 --- a/classes/event/submissions_imported.php +++ b/classes/event/submissions_imported.php @@ -68,23 +68,4 @@ public function get_description() { public function get_url() { return new \moodle_url('/mod/surveypro/tools.php', ['id' => $this->contextinstanceid, 'section' => 'import']); } - - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'submissions imported', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } } diff --git a/classes/event/submissiontopdf_downloaded.php b/classes/event/submissiontopdf_downloaded.php index e63562613ac..19fda22b08f 100644 --- a/classes/event/submissiontopdf_downloaded.php +++ b/classes/event/submissiontopdf_downloaded.php @@ -74,25 +74,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/view.php', $paramurl); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'submission downloaded to pdf', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/usertemplate_applied.php b/classes/event/usertemplate_applied.php index ffc33fdbffc..19c72ea7168 100644 --- a/classes/event/usertemplate_applied.php +++ b/classes/event/usertemplate_applied.php @@ -71,25 +71,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/utemplates.php', ['id' => $this->contextinstanceid, 'section' => 'apply']); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'usertemplate applied', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/usertemplate_deleted.php b/classes/event/usertemplate_deleted.php index 809bf8ca2fa..bcbd87bff7c 100644 --- a/classes/event/usertemplate_deleted.php +++ b/classes/event/usertemplate_deleted.php @@ -69,25 +69,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/utemplates.php', ['id' => $this->contextinstanceid, 'section' => 'manage']); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'usertemplate deleted', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/usertemplate_exported.php b/classes/event/usertemplate_exported.php index 7ff0055f85b..7fd9cfcbf2c 100644 --- a/classes/event/usertemplate_exported.php +++ b/classes/event/usertemplate_exported.php @@ -69,25 +69,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/utemplates.php', ['id' => $this->contextinstanceid, 'section' => 'manage']); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'usertemplate exported', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/usertemplate_imported.php b/classes/event/usertemplate_imported.php index 3ea3653b922..d0c0fccaf18 100644 --- a/classes/event/usertemplate_imported.php +++ b/classes/event/usertemplate_imported.php @@ -69,25 +69,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/utemplates.php', ['id' => $this->contextinstanceid, 'section' => 'manage']); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'usertemplate imported', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. * diff --git a/classes/event/usertemplate_saved.php b/classes/event/usertemplate_saved.php index 616659af3af..96ea51b5150 100644 --- a/classes/event/usertemplate_saved.php +++ b/classes/event/usertemplate_saved.php @@ -69,25 +69,6 @@ public function get_url() { return new \moodle_url('/mod/surveypro/utemplates.php', ['id' => $this->contextinstanceid, 'section' => 'save']); } - /** - * Return legacy data for add_to_log(). - * - * @return array - */ - public function get_legacy_logdata() { - // Override if you are migrating an add_to_log() call. - return array($this->courseid, 'surveypro', 'usertemplate saved', - $this->get_url(), $this->objectid, $this->contextinstanceid, ); - } - - /** - * Return the legacy event name. - * - * @return string - */ - public static function get_legacy_eventname() { - } - /** * Custom validation. *