Don't break the course if the grading policy is broken

This commit is contained in:
Calen Pennington
2013-01-14 11:38:34 -05:00
committed by cahrens
parent 79e4c606fc
commit 602435fc60

View File

@@ -228,7 +228,11 @@ class CourseDescriptor(SequenceDescriptor):
if policy_dir:
paths = [policy_dir + '/grading_policy.json'] + paths
policy = json.loads(cls.read_grading_policy(paths, system))
try:
policy = json.loads(cls.read_grading_policy(paths, system))
except ValueError:
system.error_tracker("Unable to decode grading policy as json")
policy = None
# cdodge: import the grading policy information that is on disk and put into the
# descriptor 'definition' bucket as a dictionary so that it is persisted in the DB