Open
Description
This bit of code is confusing to me:
for i, child in zip(range(num_progresses_to_count), open_children):
satisfied_courses.update(satisfied_by_category[i])
if child.statement.connection_type == CONNECTION_TYPE_ALL:
num_courses_satisfied += (child.is_fulfilled and len(child.satisfied_courses) > 0)
else:
num_courses_satisfied += len(satisfied_by_category[i])
This means that children with connection type all can only ever contribute 1 course to satisfied courses, but children with connection type any can contribute as many courses as they have. I'm not totally understanding the logic here, because it seems in both case that any courses satisfying the children contribute to the parents regardless of child connection type. The current code leads to strange behavior where e.g. a parent demanding >= 4 subjects would not be satisfied by a child with 4 subjects if that child happened to be an "all" type.
Metadata
Metadata
Assignees
Labels
No labels
Activity