diff --git a/completion/services.py b/completion/services.py index b5fbd7d..3effbd7 100644 --- a/completion/services.py +++ b/completion/services.py @@ -117,13 +117,14 @@ def vertical_is_complete(self, item): if not self.completion_tracking_enabled(): return None - optional_vertical = getattr(item, "optional_content", False) + optional_vertical = getattr(item, "optional_completion", False) # this is temporary local logic and will be removed when the whole course tree is included in completion child_locations = [ child.scope_ids.usage_id for child in self.get_completable_children(item) - # for non-optional verticals, only include non-optional children - if optional_vertical or not getattr(child, "optional_content", False) + # if vertical is optional, include all children + # else only include non-optional children + if optional_vertical or not getattr(child, "optional_completion", False) ] completions = self.get_completions(child_locations) for child_location in child_locations: