diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index dab04a0957..6b77792203 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -327,6 +327,9 @@ def progress(request, course_id, student_id=None): # NOTE: To make sure impersonation by instructor works, use # student instead of request.user in the rest of the function. + + # The pre-fetching of groups is done to make auth checks not require an + # additional DB lookup (this kills the Progress page in particular). student = User.objects.prefetch_related("groups").get(id=student.id) student_module_cache = StudentModuleCache.cache_for_descriptor_descendents(