Commit 8b961de7 by Justin Riley

ProctorModuleInfo: raise exception if course DNE

parent c21906a0
...@@ -125,6 +125,8 @@ class ProctorModuleInfo(object): ...@@ -125,6 +125,8 @@ class ProctorModuleInfo(object):
def __init__(self, course_id): def __init__(self, course_id):
self.ms = modulestore() self.ms = modulestore()
self.course = self.ms.get_course(course_id) self.course = self.ms.get_course(course_id)
if not self.course:
raise Exception("course does not exist: %s" % course_id)
self.get_released_proctor_modules() self.get_released_proctor_modules()
def _get_student_obj(self, student): def _get_student_obj(self, student):
......
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