. /** * The mod_forum course module viewed event. * * @package mod_forum * @copyright 2014 Dan Poltawski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_forum\event; defined('MOODLE_INTERNAL') || die(); /** * The mod_forum course module viewed event class. * * @package mod_forum * @since Moodle 2.7 * @copyright 2014 Dan Poltawski * @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['crud'] = 'r'; $this->data['edulevel'] = self::LEVEL_PARTICIPATING; $this->data['objecttable'] = 'forum'; } /** * Get URL related to the action * * @return \moodle_url */ public function get_url() { return new \moodle_url('/mod/forum/view.php', array('f' => $this->objectid)); } public static function get_objectid_mapping() { return array('db' => 'forum', 'restore' => 'forum'); } }