Project: moodle
Issue MDL-40057: Replace add_to_log with an event trigger - mod_assignment
Replace the add_to_log calls for the following area, with a call to the get_legacy_logdata function in the event class. *mod/assignment (17 calls)* /mod/assignment/index.php:16: add_to_log($course->id, "assignment", "view all", "index.php?id=$course->id", ""); /mod/assignment/type/uploadsingle/assignment.class.php:68: add_to_log($this->course->id, "assignment", "view", "view.php?id={$this->cm->id}", $this->assignment->id, $this->cm->id); /mod/assignment/type/uploadsingle/assignment.class.php:239: add_to_log($this->course->id, 'assignment', 'upload', 'view.php?a='.$this->assignment->id, $this->assignment->id, $this->cm->id); /mod/assignment/type/upload/assignment.class.php:49: add_to_log($this->course->id, 'assignment', 'view', "view.php?id={$this->cm->id}", $this->assignment->id, $this->cm->id); /mod/assignment/type/upload/assignment.class.php:449: add_to_log($this->course->id, 'assignment', 'upload', 'view.php?a='.$this->assignment->id, $this->assignment->id, $this->cm->id); /mod/assignment/type/upload/assignment.class.php:515: add_to_log($this->course->id, 'assignment', 'upload', /mod/assignment/type/upload/assignment.class.php:636: add_to_log($this->course->id, 'assignment', 'upload', //TODO: add finalize action to log /mod/assignment/type/upload/assignment.class.php:676: add_to_log($this->course->id, 'assignment', 'upload', //TODO: add finalize action to log /mod/assignment/type/upload/assignment.class.php:704: add_to_log($this->course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->cm->id.'&userid='.$userid.'&mode='.$mode.'&offset='.$offset, $this->assignment->id, $this->cm->id); /mod/assignment/type/upload/assignment.class.php:820: add_to_log($this->course->id, 'assignment', 'upload', //TODO: add delete action to log /mod/assignment/type/online/assignment.class.php:78: add_to_log($this->course->id, 'assignment', 'upload', 'view.php?a='.$this->assignment->id, $this->assignment->id, $this->cm->id); /mod/assignment/type/online/assignment.class.php:86: add_to_log($this->course->id, "assignment", "view", "view.php?id={$this->cm->id}", $this->assignment->id, $this->cm->id); /mod/assignment/type/offline/assignment.class.php:96: add_to_log($this->course->id, 'assignment', 'update grades', /mod/assignment/lib.php:159: add_to_log($this->course->id, "assignment", "view", "view.php?id={$this->cm->id}", /mod/assignment/lib.php:777: add_to_log($this->course->id, 'assignment', 'update grades', /mod/assignment/lib.php:1248: add_to_log($course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->cm->id, $this->assignment->id, $this->cm->id); /mod/assignment/lib.php:1795: add_to_log($this->course->id, 'assignment', 'update grades',
Story points: 40