From 0ea62d56c4a5053011bc2bf3bdd6f1bd7cdc9504 Mon Sep 17 00:00:00 2001 From: Tim Lock Date: Thu, 3 Apr 2014 14:05:17 +1030 Subject: [PATCH] MDL-38210 report_participation: implement get view/post actions --- mod/workshop/lib.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/mod/workshop/lib.php b/mod/workshop/lib.php index faa01f0534d..c1cc0d3d413 100644 --- a/mod/workshop/lib.php +++ b/mod/workshop/lib.php @@ -247,6 +247,35 @@ function workshop_delete_instance($id) { return true; } +/** + * 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 workshop_get_view_actions() { + return array('view', 'view all', 'view submission', 'view example'); +} + +/** + * 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 workshop_get_post_actions() { + return array('add', 'add assessment', 'add example', 'add submission', + 'update', 'update assessment', 'update example', 'update submission'); +} + /** * Return a small object with summary information about what a * user has done with a given particular instance of this module