Commit 1680336d by Diana Huang

Fix some minor bugs in the staff grading interface

parent a0c0005e
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<h3>Rubric</h3> <h3>Rubric</h3>
% if view_only: % if view_only:
<p>Select the criteria you feel best represents this submission in each category.</p> <p>Select the criteria you feel best represents this submission in each category.</p>
% else % else:
<p>The highlighted selection best matches how the student feels you performed in each category.</p> <p>The highlighted selection best matches how the student feels you performed in each category.</p>
% endif % endif
<table class="rubric"> <table class="rubric">
......
...@@ -133,7 +133,8 @@ class StaffGradingService(GradingService): ...@@ -133,7 +133,8 @@ class StaffGradingService(GradingService):
'feedback': feedback, 'feedback': feedback,
'grader_id': grader_id, 'grader_id': grader_id,
'skipped': skipped, 'skipped': skipped,
'rubric_scores': rubric_scores} 'rubric_scores': rubric_scores,
'rubric_scores_complete': True}
return self.post(self.save_grade_url, data=data) return self.post(self.save_grade_url, data=data)
...@@ -298,7 +299,7 @@ def save_grade(request, course_id): ...@@ -298,7 +299,7 @@ def save_grade(request, course_id):
if request.method != 'POST': if request.method != 'POST':
raise Http404 raise Http404
required = set(['score', 'feedback', 'submission_id', 'location', 'rubric_scores']) required = set(['score', 'feedback', 'submission_id', 'location', 'rubric_scores[]'])
actual = set(request.POST.keys()) actual = set(request.POST.keys())
missing = required - actual missing = required - actual
if len(missing) > 0: if len(missing) > 0:
...@@ -311,6 +312,7 @@ def save_grade(request, course_id): ...@@ -311,6 +312,7 @@ def save_grade(request, course_id):
location = p['location'] location = p['location']
skipped = 'skipped' in p skipped = 'skipped' in p
try: try:
result_json = staff_grading_service().save_grade(course_id, result_json = staff_grading_service().save_grade(course_id,
grader_id, grader_id,
...@@ -318,7 +320,7 @@ def save_grade(request, course_id): ...@@ -318,7 +320,7 @@ def save_grade(request, course_id):
p['score'], p['score'],
p['feedback'], p['feedback'],
skipped, skipped,
p['rubric_scores']) p.getlist('rubric_scores[]'))
except GradingServiceError: except GradingServiceError:
log.exception("Error saving grade") log.exception("Error saving grade")
return _err_response('Could not connect to grading service') return _err_response('Could not connect to grading service')
......
...@@ -286,6 +286,7 @@ class StaffGrading ...@@ -286,6 +286,7 @@ class StaffGrading
submit_and_get_next: () -> submit_and_get_next: () ->
data = data =
rubric_scores: @get_score_list() rubric_scores: @get_score_list()
score: 0
feedback: @feedback_area.val() feedback: @feedback_area.val()
submission_id: @submission_id submission_id: @submission_id
location: @location location: @location
......
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