diff options
author | José Alberto Royo Ratia <joalroyo@unizar.es> | 2020-09-28 11:39:02 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-09-28 13:34:48 +0200 |
commit | fa2b1244f6f48a7961e44eefdcf9cf0f3797ba80 (patch) | |
tree | 3716a16d0d5be2ee1d61d6caa364b4685b896dd1 /admin | |
parent | ee80b183d90b6e05e3730813eb76386ff6377e3c (diff) |
#1005 Add support for computer groups in RemotePC
When OpenGnsys is used via RemotePC, a failure occurs when
classrooms with groups of computers are included because the
processing and recursion is not controlled correctly because attempts
are made to add objects to a null array.
This commit adds and populates an array with the computers in the group.
Reviewed-by: Javier Sánchez Parra <jsanchez@soleta.eu>
Diffstat (limited to 'admin')
-rw-r--r-- | admin/WebConsole/rest/server.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/admin/WebConsole/rest/server.php b/admin/WebConsole/rest/server.php index c55d6709..c7c153ad 100644 --- a/admin/WebConsole/rest/server.php +++ b/admin/WebConsole/rest/server.php @@ -407,6 +407,10 @@ EOD; $tmp['name'] = $rs->campos["nombreaula"]; $tmp['inremotepc'] = ($rs->campos["inremotepc"] == 1); $tmp['group']['id'] = (int)$rs->campos["grupoid"]; + $tmp['classroomGroups'] = array(); + if (isset($rs->campos["nombregrupoordenador"])){ + $tmp['classroomGroups'] = array(array("id" => (int)$rs->campos["group_id"], "name" => $rs->campos["nombregrupoordenador"], "comments" => $rs->campos["comentarios"], "classroomGroups" => array())); + } $tmp['ou']['id'] = (int)$ouid; array_push($response, $tmp); } |