MDL-44017 Events: Deprecated content_viewed event

Replaced content_viewed event with appropriate events and deprecated
content_viewed event
This commit is contained in:
Rajesh Taneja 2014-03-04 16:13:28 +08:00
parent 0a489777fc
commit e1b16f9773
39 changed files with 1291 additions and 453 deletions

View file

@ -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();
}
}