Use timestamps in _has_database_updated_with_new_score check

Also fixes issue where ORA grades were never updated, by including
them in this check.

TNL-5994
TNL-5995
This commit is contained in:
Eric Fischer
2016-12-07 14:41:20 -05:00
parent d0be0ae8ec
commit 5a98a90eba
10 changed files with 163 additions and 65 deletions

View File

@@ -1008,6 +1008,7 @@ def set_score(user_id, usage_key, score, max_score):
student_module.grade = score
student_module.max_grade = max_score
student_module.save()
return student_module.modified
def get_score(user_id, usage_key):
@@ -1024,4 +1025,4 @@ def get_score(user_id, usage_key):
except StudentModule.DoesNotExist:
return None
else:
return student_module.grade, student_module.max_grade
return student_module