Merge branch 'MDL-54991-31' of git://github.com/crazyserver/moodle into MOODLE_31_STABLE

This commit is contained in:
Andrew Nicols
2016-06-28 15:32:24 +08:00
+3
View File
@@ -2433,7 +2433,10 @@ class mod_assign_external extends external_api {
// 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);
}