Merge branch 'MDL-45607_master' of https://github.com/markn86/moodle

This commit is contained in:
Sam Hemelryk 2014-05-26 09:53:41 +12:00
commit bde2e4c599
2 changed files with 6 additions and 5 deletions

View File

@ -69,7 +69,7 @@ class user_profile_viewed extends base {
*/
public function get_description() {
return "The user with id '$this->userid' viewed the profile for the user with id '$this->relateduserid' in the course " .
"with id '{$this->other['courseid']}'.";
"with id '$this->courseid'.";
}
/**
@ -78,7 +78,7 @@ class user_profile_viewed extends base {
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/user/view.php', array('id' => $this->relateduserid, 'course' => $this->other['courseid']));
return new \moodle_url('/user/view.php', array('id' => $this->relateduserid, 'course' => $this->courseid));
}
/**
@ -87,7 +87,7 @@ class user_profile_viewed extends base {
* @return array
*/
protected function get_legacy_logdata() {
return array($this->other['courseid'], 'user', 'view', 'view.php?id=' . $this->relateduserid . '&course=' .
$this->other['courseid'], $this->relateduserid);
return array($this->courseid, 'user', 'view', 'view.php?id=' . $this->relateduserid . '&course=' .
$this->courseid, $this->relateduserid);
}
}

View File

@ -192,7 +192,8 @@ if ($user->deleted) {
$event = \core\event\user_profile_viewed::create(array(
'objectid' => $USER->id,
'relateduserid' => $user->id,
'context' => $usercontext,
'courseid' => $course->id,
'context' => $coursecontext,
'other' => array(
'courseid' => $course->id,
'courseshortname' => $course->shortname,