Skip to content

Commit

Permalink
enable multiple recaps to work on instructor dash (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidijarad authored and nicovanniekerk committed Oct 20, 2017
1 parent 0746288 commit ffcc6fa
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 @@ -254,10 +254,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 @@ -842,10 +843,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 ffcc6fa

Please sign in to comment.