. /** * H5P activity viewed. * * @package mod_h5pactivity * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_h5pactivity\event; defined('MOODLE_INTERNAL') || die(); /** * The course_module_viewed event class. * * @package mod_h5pactivity * @copyright 2020 Ferran Recio * @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(): void { $this->data['objecttable'] = 'h5pactivity'; $this->data['crud'] = 'r'; $this->data['edulevel'] = self::LEVEL_PARTICIPATING; } /** * This is used when restoring course logs where it is required that we * map the objectid to it's new value in the new course. * * @return array */ public static function get_objectid_mapping() { return ['db' => 'h5pactivity', 'restore' => 'h5pactivity']; } }