diff options
author | Simon Rettberg | 2016-06-24 14:24:00 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-06-24 14:24:00 +0200 |
commit | 43281909e652d651e8d5b721b440ea5c6eaf8798 (patch) | |
tree | cd802be78717f79114de2924e6d6615cea3866ed /modules-available/locations/inc | |
parent | [exams] Move to content group; fix timepicker; mark old exams (diff) | |
download | slx-admin-43281909e652d651e8d5b721b440ea5c6eaf8798.tar.gz slx-admin-43281909e652d651e8d5b721b440ea5c6eaf8798.tar.xz slx-admin-43281909e652d651e8d5b721b440ea5c6eaf8798.zip |
[exams] Indent location by tree depth; fix ordering of locations in vis.js
Diffstat (limited to 'modules-available/locations/inc')
-rw-r--r-- | modules-available/locations/inc/location.inc.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules-available/locations/inc/location.inc.php b/modules-available/locations/inc/location.inc.php index b1474279..69ddb4ee 100644 --- a/modules-available/locations/inc/location.inc.php +++ b/modules-available/locations/inc/location.inc.php @@ -78,6 +78,7 @@ class Location } $del = false; unset($row); + $index = 0; foreach ($rows as $key => &$row) { if ($del === false && $row['locationid'] == $excludeId) { $del = $row['depth']; @@ -91,6 +92,7 @@ class Location if ((is_array($selected) && in_array($row['locationid'], $selected)) || (int)$row['locationid'] === $selected) { $row['selected'] = true; } + $row['sortIndex'] = $index++; } if ($addNoParent) { array_unshift($rows, array( |