aboutsummaryrefslogtreecommitdiff
path: root/lib/models/Courseware/StructuralElement.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/Courseware/StructuralElement.php')
-rw-r--r--lib/models/Courseware/StructuralElement.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/models/Courseware/StructuralElement.php b/lib/models/Courseware/StructuralElement.php
index 940547e..bb325db 100644
--- a/lib/models/Courseware/StructuralElement.php
+++ b/lib/models/Courseware/StructuralElement.php
@@ -623,7 +623,8 @@ class StructuralElement extends \SimpleORMap implements \PrivacyObject
private function findCoursewareElements($user): array
{
- $root = $this->getCourseware($this->range_id, $this->range_type);
+ $unit = $this->findUnit();
+ $root = $unit->structural_element;
$elements = array_merge([$root], $root->findDescendants($user));
return $elements;