mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-44017 Events: Deprecated content_viewed event
Replaced content_viewed event with appropriate events and deprecated content_viewed event
This commit is contained in:
parent
0a489777fc
commit
e1b16f9773
39 changed files with 1291 additions and 453 deletions
|
@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die();
|
|||
* @copyright 2013 Frédéric Massart
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class chapter_viewed extends \core\event\content_viewed {
|
||||
class chapter_viewed extends \core\event\base {
|
||||
|
||||
/**
|
||||
* Returns description of what happened.
|
||||
|
@ -81,17 +81,4 @@ class chapter_viewed extends \core\event\content_viewed {
|
|||
$this->data['edulevel'] = self::LEVEL_PARTICIPATING;
|
||||
$this->data['objecttable'] = 'book_chapters';
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom validation.
|
||||
*
|
||||
* @throws \coding_exception
|
||||
* @return void
|
||||
*/
|
||||
protected function validate_data() {
|
||||
// Hack to please the parent class. 'view chapter' was the key used in old add_to_log().
|
||||
$this->data['other']['content'] = 'view chapter';
|
||||
parent::validate_data();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue