mirror of
https://github.com/moodle/moodle.git
synced 2025-04-26 19:03:38 +02:00
MDL-54991 assign: Invalid submissiongroup when not using groups
This commit is contained in:
parent
b8474fe0c7
commit
ff6de75396
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user