Skip to content

Commit

Permalink
added grade and max_grade to studentmodule to fix progress page issues
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-qayyum-khan committed Jun 25, 2015
1 parent fdd006b commit 43bbfbf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions edx_sga/sga.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ def enter_grade(self, request, suffix=''):
state['staff_score'] = score
state['comment'] = request.params.get('comment', '')
module.state = json.dumps(state)
module.grade = score
module.max_grade=self.max_score()
module.save()
log.info(
"enter_grade for course:%s module:%s student:%s",
Expand All @@ -570,6 +572,7 @@ def remove_grade(self, request, suffix=''):
student_id = request.params['student_id']
submissions_api.reset_score(student_id, self.course_id, self.block_id)
module = StudentModule.objects.get(pk=request.params['module_id'])
module.grade = 0
state = json.loads(module.state)
state['staff_score'] = None
state['comment'] = ''
Expand Down

0 comments on commit 43bbfbf

Please sign in to comment.