Skip to content

Commit

Permalink
fix(AssignmentGraded): Corrects actor format. (#139 - thanks @Nicosoft)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryasmi authored Oct 11, 2017
2 parents ddc17db + 3b7bab1 commit 3b599d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 1 addition & 8 deletions lib/emitter/src/Events/AssignmentGraded.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,7 @@ public function read(array $opts) {
]);

// Excluded from array merge to make sure that the actor is overwritten e.g. if a different IFI is used.
$statement['actor'] = [
'objectType' => 'Agent',
'name' => $opts['graded_user_name'],
'account' => [
'homePage' => $opts['graded_user_url'],
'name' => $opts['graded_user_id'],
],
];
$statement['actor'] = $this->read_user($opts, "graded_user");

if (!is_null($opts['grade_success'])) {
$statement['result']['success'] = $opts['grade_success'];
Expand Down
1 change: 1 addition & 0 deletions lib/translator/src/Events/AssignmentGraded.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function read(array $opts) {
'graded_user_id' => $opts['graded_user']->id,
'graded_user_url' => $opts['graded_user']->url,
'graded_user_name' => $opts['graded_user']->fullname,
'graded_user_email' => $opts['graded_user']->email,
'grade_score_raw' => $scoreraw,
'grade_score_min' => $scoremin,
'grade_score_max' => $scoremax,
Expand Down

0 comments on commit 3b599d4

Please sign in to comment.