Commit 16b5b951 by Kristin

Merge pull request #506 from edx/ksteph/bugfix_offline_gradecalc

Fix offline_gradecalc
parents 4c95078e 71a1562e
......@@ -44,12 +44,14 @@ def offline_grade_calculation(course_id):
def is_secure(self):
return False
request = DummyRequest()
print "%d enrolled students" % len(enrolled_students)
course = get_course_by_id(course_id)
for student in enrolled_students:
request = DummyRequest()
request.user = student
request.session = {}
gradeset = grades.grade(student, request, course, keep_raw_scores=True)
gs = enc.encode(gradeset)
ocg, created = models.OfflineComputedGrade.objects.get_or_create(user=student, course_id=course_id)
......
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