mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-40059 glossary: event course_module_instance_list_viewed
This commit is contained in:
parent
3dbe89ac62
commit
f527c5d040
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* mod_glossary course module instance list viewed event.
|
||||
*
|
||||
* @package mod_glossary
|
||||
* @copyright 2014 Marina Glancy
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace mod_glossary\event;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* mod_glossary course module instance list viewed event class.
|
||||
*
|
||||
* @package mod_glossary
|
||||
* @copyright 2014 Marina Glancy
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
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.
|
||||
}
|
||||
|
@ -20,8 +20,11 @@ require_course_login($course);
|
||||
$PAGE->set_pagelayout('incourse');
|
||||
$context = context_course::instance($course->id);
|
||||
|
||||
add_to_log($course->id, "glossary", "view all", "index.php?id=$course->id", "");
|
||||
|
||||
$event = \mod_glossary\event\course_module_instance_list_viewed::create(array(
|
||||
'context' => $context
|
||||
));
|
||||
$event->add_record_snapshot('course', $course);
|
||||
$event->trigger();
|
||||
|
||||
/// Get all required strings
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user