MDL-40047 events: Replace add_to_logs with new events in feedback

This commit is contained in:
Ankit Agarwal 2013-09-20 13:58:22 +08:00
parent 9c515cdcfb
commit 3f6fd94140
7 changed files with 57 additions and 43 deletions

View file

@ -99,7 +99,7 @@ class course_module_viewed extends \core\event\content_viewed {
if ($this->other['anonymous'] == FEEDBACK_ANONYMOUS_YES) {
return null;
} else {
return array($this->courseid, 'feedback', 'view', 'view.php?id=' . $this->other['cmid'], $this->other['instanceid'],
return array($this->courseid, 'feedback', 'view', 'view.php?id=' . $this->other['cmid'], $this->objectid,
$this->other['cmid']);
}
}
@ -116,9 +116,6 @@ class course_module_viewed extends \core\event\content_viewed {
if (!isset($this->other['cmid'])) {
throw new \coding_exception("Field other['cmid'] cannot be empty");
}
if (!isset($this->other['instanceid'])) {
throw new \coding_exception("Field other['instanceid'] cannot be empty");
}
// Call parent validations.
parent::validate_data();