Fix inconsistency progress between Unit and Course Outline.

This commit is contained in:
attiyaishaque
2018-05-07 16:08:06 +05:00
parent 0fc942bad3
commit b8fdc2ce05

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):