12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace mod_iassign\event;
- defined('MOODLE_INTERNAL') || die();
- class course_module_viewed extends \core\event\course_module_viewed {
-
- protected function init () {
- $this->data['crud'] = 'r';
- $this->data['edulevel'] = self::LEVEL_PARTICIPATING;
- $this->data['objecttable'] = 'iassign';
- }
-
-
- public static function get_name () {
- return get_string('eventcoursemoduleviewed', 'mod_iassign');
- }
-
-
- public function get_description () {
- return "The user with id '$this->userid' has viewed the iAssign with id '$this->objectid' in " .
- "the iAssign activity with course module id '$this->contextinstanceid'.";
- }
-
-
- public function get_url () {
- return new \moodle_url('/mod/iassign/view.php', array('id' => $this->contextinstanceid));
- }
-
-
- public function get_legacy_logdata () {
- return array($this->courseid, 'iassign', 'view', "view.php?id={$this->contextinstanceid}", $this->objectid, $this->contextinstanceid);
- }
-
-
-
- protected function validate_data () {
- parent::validate_data();
-
- if(!$this->contextlevel === CONTEXT_MODULE) {
- throw new \coding_exception('Context level must be CONTEXT_MODULE.');
- }
- }
- }
|