Commit b65577f2 by Bridger Maxwell

Fixed tests for fast grading.

parent 1e0932b7
......@@ -237,6 +237,10 @@ def progress_summary(student, request, course, grader, student_module_cache):
course: An XModule containing the course to grade
student_module_cache: A StudentModuleCache initialized with all
instance_modules for the student
If the student does not have access to load the course module, this function
will return None.
"""
......@@ -245,6 +249,9 @@ def progress_summary(student, request, course, grader, student_module_cache):
course_module = get_module(student, request,
course.location, student_module_cache,
course.id)
if not course_module:
# This student must not have access to the course.
return None
chapters = []
# Don't include chapters that aren't displayable (e.g. due to error)
......
......@@ -460,6 +460,10 @@ def progress(request, course_id, student_id=None):
course.grader, student_module_cache)
grade_summary = grades.grade(student, request, course, student_module_cache)
if courseware_summary is None:
#This means the student didn't have access to the course (which the instructor requested)
raise Http404
context = {'course': course,
'courseware_summary': courseware_summary,
'grade_summary': grade_summary,
......
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