Skip to content
Snippets Groups Projects
Commit c657732d authored by Dasuntha Gunathunga's avatar Dasuntha Gunathunga
Browse files

#121 - Added instructor email and user email into translator

parent e8c8cab8
No related branches found
No related tags found
No related merge requests found
...@@ -37,8 +37,9 @@ class EnrolmentCreated extends Event { ...@@ -37,8 +37,9 @@ class EnrolmentCreated extends Event {
], ],
'object' => $this->read_course($opts), 'object' => $this->read_course($opts),
'context' => [ 'context' => [
'instructor' => parent::read($opts)['actor'], 'instructor' => $this->read_user($opts, 'instructor'),
], ],
]); ]);
} }
} }
...@@ -31,8 +31,10 @@ class EnrolmentCreated extends CourseViewed { ...@@ -31,8 +31,10 @@ class EnrolmentCreated extends CourseViewed {
'user_id' => $opts['relateduser']->id, 'user_id' => $opts['relateduser']->id,
'user_url' => $opts['relateduser']->url, 'user_url' => $opts['relateduser']->url,
'user_name' => $opts['relateduser']->fullname, 'user_name' => $opts['relateduser']->fullname,
'user_email' => $opts['relateduser']->email,
'instructor_id' => $opts['user']->id, 'instructor_id' => $opts['user']->id,
'instructor_url' => $opts['user']->url, 'instructor_url' => $opts['user']->url,
'instructor_email' => $opts['user']->email,
'instructor_name' => $opts['user']->fullname, 'instructor_name' => $opts['user']->fullname,
])]; ])];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment