Merge branch 'MDL-45650_master' of https://github.com/markn86/moodle
[moodle.git] / user / view.php
index 39c4919..7bad594 100644 (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,