diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-03-19 20:42:38 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-03-19 20:42:38 +0100 |
| commit | dcadab054835093990f333ab3cc60ff4aaab88be (patch) | |
| tree | 2f1a287a98d540fc263b4b18b8cfb0f423b88c88 | |
| parent | fc1b563c7f62374dfb04170056b07d8c482319d7 (diff) | |
use correct idbiest-6362
| -rw-r--r-- | lib/models/Courseware/Instance.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/models/Courseware/Instance.php b/lib/models/Courseware/Instance.php index 921dcf4..ad7b873 100644 --- a/lib/models/Courseware/Instance.php +++ b/lib/models/Courseware/Instance.php @@ -570,7 +570,6 @@ class Instance { if (!$formatter) { $formatter = function ($row) { - unset($row['id']); return \Courseware\Block::build($row, false); }; } @@ -581,7 +580,7 @@ class Instance * all blocks belonging to these elements. */ $sql = $this->recursiveGetStructuralElementsQuery( - "SELECT DISTINCT st.`id`, b.* + "SELECT DISTINCT st.`id` AS structural_id, b.* FROM structural_tree st JOIN `cw_containers` c ON c.`structural_element_id` = st.`id` @@ -594,7 +593,8 @@ class Instance $data = []; foreach ($statement as $row) { - $structuralElementId = $row['id']; + $structuralElementId = $row['structural_id']; + unset($row['structural_id']); if (!isset($data[$structuralElementId])) { $data[$structuralElementId] = []; |
