123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- namespace mod_gradeimporter\event;
- class gradeimporter_submission_created extends \core\event\base {
- protected function init() {
- $this->data['crud'] = 'c';
- $this->data['edulevel'] = self::LEVEL_PARTICIPATING;
- }
-
- public function get_description () {
- return "The user with id '$this->userid' has created a submission " .
- "on the grade importer with the course module id '$this->contextinstanceid'.";
- }
-
- public static function get_name () {
- return get_string('eventmodelsubmissioncreated', 'mod_gradeimporter');
- }
-
- public function get_url () {
- $url = new \moodle_url('/mod/gradeimporter/view.php', array('id' => $this->contextinstanceid));
- return $url;
- }
-
- protected function get_legacy_logdata () {
-
- $logurl = new \moodle_url('/mod/gradeimporter/view.php', array('id' => $this->contextinstanceid));
- return array($this->courseid, 'gradeimporter', 'editgradeimporter', $logurl,
- $this->other['gradeimporterid'], $this->gradeimporterid);
- }
-
- protected function validate_data () {
- parent::validate_data();
- if ($this->contextlevel != CONTEXT_MODULE) {
- throw new \coding_exception('Context level must be CONTEXT_MODULE');
- }
- }
- }
|