MDL-40917 mod_resource: replaced add_to_log with events

This commit is contained in:
Rajesh Taneja
2014-01-10 14:12:07 +08:00
parent bbb291b7b7
commit 4a536604b8
5 changed files with 201 additions and 2 deletions
@@ -0,0 +1,48 @@
<?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/>.
/**
* The mod_resource course module viewed event.
*
* @package mod_resource
* @copyright 2014 Rajesh Taneja <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace mod_resource\event;
defined('MOODLE_INTERNAL') || die();
/**
* The mod_resource course module viewed event.
*
* @package mod_resource
* @copyright 2014 Rajesh Taneja <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class course_module_viewed extends \core\event\course_module_viewed {
/**
* Init method.
*
* @return void
*/
protected function init() {
$this->data['objecttable'] = 'resource';
$this->data['crud'] = 'r';
$this->data['level'] = self::LEVEL_PARTICIPATING;
}
}