From 44b15619e9ffa45a8650449c2009ef10d9b684bd Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 14 May 2014 15:23:58 -0400 Subject: [PATCH] Fix spoc_gradebook --- lms/djangoapps/instructor/views/instructor_dashboard.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index 952c7736e8..6c88c62445 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -271,10 +271,11 @@ def spoc_gradebook(request, course_id): - Only shown for courses with enrollment < settings.FEATURES.get("MAX_ENROLLMENT_INSTR_BUTTONS") - Only displayed to course staff """ - course = get_course_with_access(request.user, course_id, 'staff', depth=None) + course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) + course = get_course_with_access(request.user, 'staff', course_key, depth=None) enrolled_students = User.objects.filter( - courseenrollment__course_id=course_id, + courseenrollment__course_id=course_key, courseenrollment__is_active=1 ).order_by('username').select_related("profile") @@ -296,7 +297,7 @@ def spoc_gradebook(request, course_id): return render_to_response('courseware/gradebook.html', { 'students': student_info, 'course': course, - 'course_id': course_id, + 'course_id': course_key, # Checked above 'staff_access': True, 'ordered_grades': sorted(course.grade_cutoffs.items(), key=lambda i: i[1], reverse=True),