Skip to content

Commit

Permalink
enable multiple recaps to work on instructor dash (openedx#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidijarad authored and nicovanniekerk committed Feb 12, 2018
1 parent 90696a6 commit f62a59c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lms/djangoapps/instructor/views/instructor_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,11 @@ def get_course_blocks(course_key, category):
# Get all the recap xblocks in a course

recap_blocks = get_course_blocks(course_key, "recap")
free_blocks = get_course_blocks(course_key, "freetextresponse")

# Add the Recap instructor dashboard tab if there is a recap Xblock

if len(recap_blocks) == 1:
if len(recap_blocks) > 0:
sections.append(_section_recap(request, course, recap_blocks, access))


Expand Down Expand Up @@ -846,10 +847,9 @@ def _section_recap(request, course, recap_blocks, access):
).order_by('username').select_related('profile')

for block in recap_blocks:

recap_items.append({
'name': block.display_name,
#'url_base': reverse('xblock_view', args=[]),
'block_list': block.xblock_list,
'url_base': reverse('xblock_view', args=[course.id, block.location, 'recap_blocks_listing_view']),
'make_pdf_json': reverse('xblock_handler', args=[course.id, block.location, 'make_pdf_json']),
})
Expand Down

0 comments on commit f62a59c

Please sign in to comment.