mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-55371 mod_assign: Do not return empty users in get_participant WS
The WS was returning null users making the WS to fail.
This commit is contained in:
parent
06e3b6d8ba
commit
396395b8d3
2 changed files with 12 additions and 3 deletions
|
@ -2775,7 +2775,9 @@ class mod_assign_external extends external_api {
|
|||
// Skip the expensive lookup of user detail if we're blind marking or the caller
|
||||
// hasn't asked for user details to be embedded.
|
||||
if (!$assign->is_blind_marking() && $embeduser) {
|
||||
$return['user'] = user_get_user_details($participant, $course);
|
||||
if ($userdetails = user_get_user_details($participant, $course)) {
|
||||
$return['user'] = $userdetails;
|
||||
}
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue