Skip to content

Commit

Permalink
MDL-54991 assign: Invalid submissiongroup when not using groups
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyserver committed Jun 27, 2016
1 parent b8474fe commit ff6de75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mod/assign/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2433,7 +2433,10 @@ public static function get_submission_status($assignid, $userid = 0) {
// We need to change the type of some of the structures retrieved from the renderable.
if (!empty($lastattempt->submissiongroup)) {
$lastattempt->submissiongroup = $lastattempt->submissiongroup->id;
} else {
unset($lastattempt->submissiongroup);
}

if (!empty($lastattempt->usergroups)) {
$lastattempt->usergroups = array_keys($lastattempt->usergroups);
}
Expand Down

0 comments on commit ff6de75

Please sign in to comment.