diff --git a/mod/data/classes/event/course_module_instance_list_viewed.php b/mod/data/classes/event/course_module_instance_list_viewed.php new file mode 100644 index 00000000000..7e19721fc4a --- /dev/null +++ b/mod/data/classes/event/course_module_instance_list_viewed.php @@ -0,0 +1,32 @@ +. + +/** + * The mod_data course module instance list viewed event. + * + * @package mod_data + * @copyright 2014 Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace mod_data\event; + +defined('MOODLE_INTERNAL') || die(); + +class course_module_instance_list_viewed extends \core\event\course_module_instance_list_viewed { + // No code required here as the parent class handles it all. +} + diff --git a/mod/data/index.php b/mod/data/index.php index de7c74bb1af..8620a3476f3 100644 --- a/mod/data/index.php +++ b/mod/data/index.php @@ -39,7 +39,11 @@ $PAGE->set_pagelayout('incourse'); $context = context_course::instance($course->id); -add_to_log($course->id, "data", "view all", "index.php?id=$course->id", ""); +$params = array( + 'context' => context_course::instance($course->id) +); +$event = \mod_data\event\course_module_instance_list_viewed::create($params); +$event->trigger(); $strname = get_string('name'); $strdata = get_string('modulename','data');