diff --git a/lib/models/Courseware/StructuralElement.php b/lib/models/Courseware/StructuralElement.php index 940547ec65cde61e5cbfbafa625af8185ad80b22..bb325db4a90cf8094f48f169843f2976fe637abf 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;