Commit f17987c1 by Vik Paruchuri

Fix flagging, select rubric labels in peer grading

parent 59336ee0
......@@ -234,6 +234,9 @@ section.combined-open-ended-status {
&:hover {
background-color: #eee;
}
.rubric-label-selected{
border: 2px solid #666;
}
}
span.rubric-category {
......@@ -952,3 +955,11 @@ section.open-ended-child {
}
}
}
section.peer-grading-container{
div.peer-grading{
section.calibration-feedback {
padding: 20px;
}
}
}
......@@ -338,13 +338,15 @@ class @PeerGradingProblem
remove_flag: () =>
@flag_student_checkbox.removeAttr("checked")
@close_dialog_box()
@submit_button.attr('disabled', true)
close_dialog_box: () =>
@$(@flag_submission_confirmation_sel).dialog('close')
$(@flag_submission_confirmation_sel).dialog('close')
flag_box_checked: () =>
if @flag_student_checkbox.is(':checked')
@$(@flag_submission_confirmation_sel).dialog({ height: 400, width: 400 })
@submit_button.attr('disabled', false)
# called after we perform an is_student_calibrated check
calibration_check_callback: (response) =>
......@@ -397,6 +399,10 @@ class @PeerGradingProblem
# called after a grade is selected on the interface
graded_callback: (event) =>
ev = @$(event.target).parent().parent()
ul = ev.parent().parent()
ul.find(".rubric-label-selected").removeClass('rubric-label-selected')
ev.addClass('rubric-label-selected')
# check to see whether or not any categories have not been scored
if @rub.check_complete()
# show button if we have scores for all categories
......@@ -479,6 +485,7 @@ class @PeerGradingProblem
@answer_unknown_container.show()
@feedback_area.val("")
@flag_student_checkbox.removeAttr("checked")
@submit_button.show()
@submit_button.unbind('click')
@submit_button.click @submit_grade
......
......@@ -310,13 +310,16 @@ class PeerGradingModule(PeerGradingFields, XModule):
error: if there was an error in the submission, this is the error message
"""
required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]', 'submission_flagged', 'answer_unknown'])
success, message = self._check_required(data, required)
required = ['location', 'submission_id', 'submission_key', 'score', 'feedback', 'submission_flagged', 'answer_unknown']
if 'submission_flagged' not in data or data['submission_flagged'] in ["false", False, "False"]:
required.append("rubric_scores[]")
success, message = self._check_required(data, set(required))
if not success:
return self._err_response(message)
data_dict = {k:data.get(k) for k in required}
data_dict['rubric_scores'] = data.getlist('rubric_scores[]')
if 'rubric_scores[]' in required:
data_dict['rubric_scores'] = data.getlist('rubric_scores[]')
data_dict['grader_id'] = self.system.anonymous_student_id
try:
......
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