Commit e4f1dab4 by David Ormsbee

Merge pull request #1590 from MITx/fix/cdodge/optimize-progress-summary-page

add depth parameters when loading course and student-state caches. This ...
parents 9b1ae9f9 4892897c
......@@ -270,7 +270,7 @@ def progress_summary(student, request, course, student_module_cache):
# would be simpler
course_module = get_module(student, request,
course.location, student_module_cache,
course.id)
course.id, depth=None)
if not course_module:
# This student must not have access to the course.
return None
......
......@@ -570,7 +570,7 @@ def progress(request, course_id, student_id=None):
Course staff are allowed to see the progress of students in their class.
"""
course = get_course_with_access(request.user, course_id, 'load')
course = get_course_with_access(request.user, course_id, 'load', depth=None)
staff_access = has_access(request.user, course, 'staff')
if student_id is None or student_id == request.user.id:
......@@ -590,7 +590,7 @@ def progress(request, course_id, student_id=None):
student = User.objects.prefetch_related("groups").get(id=student.id)
student_module_cache = StudentModuleCache.cache_for_descriptor_descendents(
course_id, student, course)
course_id, student, course, depth=None)
courseware_summary = grades.progress_summary(student, request, course,
student_module_cache)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment