mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-45752 Course: Add additional events
This commit is contained in:
parent
0344082208
commit
768e3613a9
9 changed files with 462 additions and 2 deletions
|
@ -1,6 +1,25 @@
|
|||
<?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/>.
|
||||
|
||||
/// Displays external information about a course
|
||||
/**
|
||||
* Displays external information about a course
|
||||
* @package core_course
|
||||
* @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
require_once("../config.php");
|
||||
require_once("lib.php");
|
||||
|
@ -54,6 +73,11 @@
|
|||
|
||||
echo "<br />";
|
||||
|
||||
// Trigger event, course information viewed.
|
||||
$eventparams = array('context' => $context, 'objectid' => $course->id);
|
||||
$event = \core\event\course_information_viewed::create($eventparams);
|
||||
$event->trigger();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue