Merge pull request #18143 from edx/ai/EDUCATOR-2825-course-outline

Fix inconsistency progress between Unit and Course Outline.
This commit is contained in:
Attiya Ishaque
2018-05-08 20:43:07 +05:00
committed by GitHub

View File

@@ -91,7 +91,10 @@ def get_course_outline_block_tree(request, course_id):
if block['children'][idx]['resume_block'] is True:
block['resume_block'] = True
if len([child['complete'] for child in block['children'] if child['complete']]) == len(block['children']):
completable_blocks = [child for child in block['children']
if child['type'] != 'discussion']
if len([child['complete'] for child in block['children']
if child['complete']]) == len(completable_blocks):
block['complete'] = True
def mark_last_accessed(user, course_key, block):