From b8fdc2ce05c00c967645d631980fed4fcccc9648 Mon Sep 17 00:00:00 2001 From: attiyaishaque Date: Mon, 7 May 2018 16:08:06 +0500 Subject: [PATCH] Fix inconsistency progress between Unit and Course Outline. --- openedx/features/course_experience/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openedx/features/course_experience/utils.py b/openedx/features/course_experience/utils.py index 661b6df423..df5cdd03de 100644 --- a/openedx/features/course_experience/utils.py +++ b/openedx/features/course_experience/utils.py @@ -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):