Skip to content

Commit

Permalink
filter all block completions instead of only verticals
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Faraz Maqsood authored and Muhammad Faraz Maqsood committed Feb 28, 2024
1 parent 10cc1b3 commit 361a8ab
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions openedx/features/sdaia_features/course_progress/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ def evaluate_subsection_completion_milestones(**kwargs):

course_key = instance.context_key

p_unit = modulestore().get_item(instance.block_key).parent
c_units = modulestore().get_item(p_unit).children
completed_units = BlockCompletion.objects.filter(block_key__in=c_units, completion=1.0).count()
if not(completed_units == len(c_units)):
return

course = modulestore().get_course(course_key)
course_completion_percentages_for_emails = course.course_completion_percentages_for_emails
if not course.allow_course_completion_emails or not course_completion_percentages_for_emails:
Expand Down

0 comments on commit 361a8ab

Please sign in to comment.