diff --git a/mod/assign/lib.php b/mod/assign/lib.php index 240cc6af0bf..d6dca2c3215 100644 --- a/mod/assign/lib.php +++ b/mod/assign/lib.php @@ -827,6 +827,11 @@ function assign_scale_used_anywhere($scaleid) { /** * List the actions that correspond to a view of this module. * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function assign_get_view_actions() { @@ -836,6 +841,11 @@ function assign_get_view_actions() { /** * List the actions that correspond to a post of this module. * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function assign_get_post_actions() { diff --git a/mod/book/lib.php b/mod/book/lib.php index 9d510a9d5f7..3eacef55fb8 100644 --- a/mod/book/lib.php +++ b/mod/book/lib.php @@ -222,6 +222,11 @@ function book_scale_used_anywhere($scaleid) { /** * Return read actions. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function book_get_view_actions() { @@ -247,6 +252,11 @@ function book_get_view_actions() { /** * Return write actions. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function book_get_post_actions() { diff --git a/mod/book/tool/print/lib.php b/mod/book/tool/print/lib.php index ffa60de10d8..1e30f32c727 100644 --- a/mod/book/tool/print/lib.php +++ b/mod/book/tool/print/lib.php @@ -52,6 +52,11 @@ function booktool_print_extend_settings_navigation(settings_navigation $settings /** * Return read actions. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function booktool_print_get_view_actions() { diff --git a/mod/chat/lib.php b/mod/chat/lib.php index 426039f6716..4a939830884 100644 --- a/mod/chat/lib.php +++ b/mod/chat/lib.php @@ -1103,6 +1103,13 @@ function chat_print_error($level, $msg) { } /** + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function chat_get_view_actions() { @@ -1110,6 +1117,13 @@ function chat_get_view_actions() { } /** + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function chat_get_post_actions() { diff --git a/mod/choice/lib.php b/mod/choice/lib.php index ba58a1f6066..29935ee7da7 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -657,6 +657,13 @@ function choice_get_choice($choiceid) { } /** + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function choice_get_view_actions() { @@ -664,6 +671,13 @@ function choice_get_view_actions() { } /** + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function choice_get_post_actions() { diff --git a/mod/data/classes/event/record_created.php b/mod/data/classes/event/record_created.php index 0678e9a5374..8c3eb7e12f1 100644 --- a/mod/data/classes/event/record_created.php +++ b/mod/data/classes/event/record_created.php @@ -42,7 +42,7 @@ class record_created extends \core\event\base { protected function init() { $this->data['objecttable'] = 'data_records'; $this->data['crud'] = 'c'; - $this->data['edulevel'] = self::LEVEL_TEACHING; + $this->data['edulevel'] = self::LEVEL_PARTICIPATING; } /** diff --git a/mod/data/classes/event/record_deleted.php b/mod/data/classes/event/record_deleted.php index 44a5784c181..bd5a25aaf7a 100644 --- a/mod/data/classes/event/record_deleted.php +++ b/mod/data/classes/event/record_deleted.php @@ -42,7 +42,7 @@ class record_deleted extends \core\event\base { protected function init() { $this->data['objecttable'] = 'data_records'; $this->data['crud'] = 'd'; - $this->data['edulevel'] = self::LEVEL_TEACHING; + $this->data['edulevel'] = self::LEVEL_PARTICIPATING; } /** diff --git a/mod/data/classes/event/record_updated.php b/mod/data/classes/event/record_updated.php index bd02dcf0c36..9c4adc137b6 100644 --- a/mod/data/classes/event/record_updated.php +++ b/mod/data/classes/event/record_updated.php @@ -42,7 +42,7 @@ class record_updated extends \core\event\base { protected function init() { $this->data['objecttable'] = 'data_records'; $this->data['crud'] = 'u'; - $this->data['edulevel'] = self::LEVEL_TEACHING; + $this->data['edulevel'] = self::LEVEL_PARTICIPATING; } /** diff --git a/mod/data/lib.php b/mod/data/lib.php index 2de18288859..5936e797492 100644 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -1722,7 +1722,12 @@ function data_print_ratings($data, $record) { } /** - * For Participantion Reports + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. * * @return array */ @@ -1731,6 +1736,13 @@ function data_get_view_actions() { } /** + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function data_get_post_actions() { diff --git a/mod/feedback/lib.php b/mod/feedback/lib.php index f924139fd63..8940f46fee0 100644 --- a/mod/feedback/lib.php +++ b/mod/feedback/lib.php @@ -572,6 +572,13 @@ function feedback_scale_used_anywhere($scaleid) { } /** + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function feedback_get_view_actions() { @@ -579,6 +586,13 @@ function feedback_get_view_actions() { } /** + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function feedback_get_post_actions() { diff --git a/mod/folder/lib.php b/mod/folder/lib.php index 030c7e5bebb..3cf7675f03f 100644 --- a/mod/folder/lib.php +++ b/mod/folder/lib.php @@ -70,7 +70,13 @@ function folder_reset_userdata($data) { } /** - * List of view style log actions + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function folder_get_view_actions() { @@ -78,7 +84,13 @@ function folder_get_view_actions() { } /** - * List of update style log actions + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function folder_get_post_actions() { diff --git a/mod/forum/lib.php b/mod/forum/lib.php index f3ccc5a13dc..670a5790c37 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -7073,6 +7073,13 @@ function forum_discussion_update_last_post($discussionid) { /** + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function forum_get_view_actions() { @@ -7080,6 +7087,13 @@ function forum_get_view_actions() { } /** + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function forum_get_post_actions() { diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 6f48e37b6b2..7a034956131 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -2646,13 +2646,29 @@ function glossary_get_paging_bar($totalcount, $page, $perpage, $baseurl, $maxpag return $code; } + /** + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function glossary_get_view_actions() { return array('view','view all','view entry'); } + /** + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function glossary_get_post_actions() { diff --git a/mod/imscp/lib.php b/mod/imscp/lib.php index 56bd5227b2d..d14013f2fb8 100644 --- a/mod/imscp/lib.php +++ b/mod/imscp/lib.php @@ -65,7 +65,13 @@ function imscp_reset_userdata($data) { } /** - * List of view style log actions + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function imscp_get_view_actions() { @@ -73,7 +79,13 @@ function imscp_get_view_actions() { } /** - * List of update style log actions + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function imscp_get_post_actions() { diff --git a/mod/label/lib.php b/mod/label/lib.php index afac5f39b30..1ed06df29eb 100644 --- a/mod/label/lib.php +++ b/mod/label/lib.php @@ -138,20 +138,6 @@ function label_get_coursemodule_info($coursemodule) { } } -/** - * @return array - */ -function label_get_view_actions() { - return array(); -} - -/** - * @return array - */ -function label_get_post_actions() { - return array(); -} - /** * This function is used by the reset_course_userdata function in moodlelib. * diff --git a/mod/lesson/lib.php b/mod/lesson/lib.php index ba948accc43..8a8d56137ec 100644 --- a/mod/lesson/lib.php +++ b/mod/lesson/lib.php @@ -527,6 +527,13 @@ function lesson_grade_item_delete($lesson) { } /** + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function lesson_get_view_actions() { @@ -534,6 +541,13 @@ function lesson_get_view_actions() { } /** + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function lesson_get_post_actions() { diff --git a/mod/page/lib.php b/mod/page/lib.php index dfdf59ab124..e775e5855b9 100644 --- a/mod/page/lib.php +++ b/mod/page/lib.php @@ -63,7 +63,13 @@ function page_reset_userdata($data) { } /** - * List of view style log actions + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function page_get_view_actions() { @@ -71,7 +77,13 @@ function page_get_view_actions() { } /** - * List of update style log actions + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function page_get_post_actions() { diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 5513e8071ea..10eccf58293 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -1269,6 +1269,13 @@ function quiz_update_events($quiz, $override = null) { } /** + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function quiz_get_view_actions() { @@ -1276,6 +1283,13 @@ function quiz_get_view_actions() { } /** + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function quiz_get_post_actions() { diff --git a/mod/resource/lib.php b/mod/resource/lib.php index fe5a294d8c1..903e2278697 100644 --- a/mod/resource/lib.php +++ b/mod/resource/lib.php @@ -63,7 +63,13 @@ function resource_reset_userdata($data) { } /** - * List of view style log actions + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function resource_get_view_actions() { @@ -71,7 +77,13 @@ function resource_get_view_actions() { } /** - * List of update style log actions + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function resource_get_post_actions() { diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php index d1f32368494..8c36639d972 100644 --- a/mod/scorm/lib.php +++ b/mod/scorm/lib.php @@ -712,6 +712,13 @@ function scorm_grade_item_delete($scorm) { } /** + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function scorm_get_view_actions() { @@ -719,6 +726,13 @@ function scorm_get_view_actions() { } /** + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function scorm_get_post_actions() { diff --git a/mod/survey/lib.php b/mod/survey/lib.php index 9b765f10a54..ae3d171af60 100644 --- a/mod/survey/lib.php +++ b/mod/survey/lib.php @@ -676,6 +676,13 @@ function survey_print_graph($url) { } /** + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function survey_get_view_actions() { @@ -683,6 +690,13 @@ function survey_get_view_actions() { } /** + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function survey_get_post_actions() { diff --git a/mod/upgrade.txt b/mod/upgrade.txt index b46d3406779..54909c94f42 100644 --- a/mod/upgrade.txt +++ b/mod/upgrade.txt @@ -4,6 +4,8 @@ information provided here is intended especially for developers. === 2.7 === * modgrade form element has been redesigned and allows setting the maximum grade point higher than 100. +* xxx_get_view_actions() and xxx_get_post_actions() will be ignored by new logging system for + participation report. view_action and post_action will be detected by event's crud and edulevel. === 2.6 === diff --git a/mod/url/lib.php b/mod/url/lib.php index 8a4483c8d0a..b33b6e4fa3a 100644 --- a/mod/url/lib.php +++ b/mod/url/lib.php @@ -65,7 +65,13 @@ function url_reset_userdata($data) { } /** - * List of view style log actions + * List the actions that correspond to a view of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = 'r' and edulevel = LEVEL_PARTICIPATING will + * be considered as view action. + * * @return array */ function url_get_view_actions() { @@ -73,7 +79,13 @@ function url_get_view_actions() { } /** - * List of update style log actions + * List the actions that correspond to a post of this module. + * This is used by the participation report. + * + * Note: This is not used by new logging system. Event with + * crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING + * will be considered as post action. + * * @return array */ function url_get_post_actions() {