From b482e2ac21314ffae7fe87ee5aca3059d0d6b1b5 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Mon, 4 Mar 2013 12:51:21 -0500 Subject: [PATCH] add performance optimizations (efficiently get all course content) --- lms/djangoapps/instructor/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/instructor/views.py b/lms/djangoapps/instructor/views.py index a3e3b9c37e..ef1705b433 100644 --- a/lms/djangoapps/instructor/views.py +++ b/lms/djangoapps/instructor/views.py @@ -59,7 +59,7 @@ def split_by_comma_and_whitespace(s): @cache_control(no_cache=True, no_store=True, must_revalidate=True) def instructor_dashboard(request, course_id): """Display the instructor dashboard for a course.""" - course = get_course_with_access(request.user, course_id, 'staff') + course = get_course_with_access(request.user, course_id, 'staff', depth=None) instructor_access = has_access(request.user, course, 'instructor') # an instructor can manage staff lists @@ -893,7 +893,7 @@ def gradebook(request, course_id): - only displayed to course staff - shows students who are enrolled. """ - course = get_course_with_access(request.user, course_id, 'staff') + course = get_course_with_access(request.user, course_id, 'staff', depth=None) enrolled_students = User.objects.filter(courseenrollment__course_id=course_id).order_by('username').select_related("profile")