Commit a7dfb40a by David Ormsbee

Working end to end assessment part saving action.

parent fbc2d492
......@@ -132,8 +132,8 @@ def create_assessment(
"rubric": rubric.id,
"scorer_id": scorer_id,
"submission": submission.pk,
"points_earned": sum(assessment_dict["points_earned"]),
"points_possible": assessment_dict["points_possible"],
#"points_earned": sum(assessment_dict["points_earned"]),
#"points_possible": assessment_dict["points_possible"],
"score_type": PEER_TYPE,
"parts": [{"option": option_id} for option_id in option_ids]
}
......
......@@ -16,8 +16,8 @@ class PeerAssessmentMixin(AssessmentMixin):
'criteria': self.rubric_criteria
}
assessment_dict = {
"points_earned": map(int, data["points_earned"]),
"points_possible": sum(c['total_value'] for c in self.rubric_criteria),
#"points_earned": map(int, data["points_earned"]),
#"points_possible": sum(c['total_value'] for c in self.rubric_criteria),
"feedback": "Not yet implemented.",
"options_selected": data["options_selected"],
}
......@@ -28,24 +28,27 @@ class PeerAssessmentMixin(AssessmentMixin):
int(assessment_ui_model.must_be_graded_by),
assessment_dict,
rubric_dict,
}
)
# Temp kludge until we fix JSON serialization for datetime
assessment["scored_at"] = str(assessment["scored_at"])
return assessment_ui_model, "Success"
return {}
@XBlock.handler
def render_peer_assessment(self, data, suffix=''):
with self.get_assessment_module('peer-assessment') as assessment:
context_dict = {"peer_submission": self.get_peer_submission(
self.get_student_item_dict(),
assessment
)}
assessment = self.get_assessment_module('peer-assessment')
# TODO: Throw some error if not assessment
context_dict = {"peer_submission": self.get_peer_submission(
self.get_student_item_dict(),
assessment
)}
return super(PeerAssessmentMixin, self).render(
'static/html/oa_peer_assessment.html',
context_dict)
context_dict
)
def get_peer_submission(self, student_item_dict, assessment):
peer_submission = False
......
......@@ -6,5 +6,5 @@ class SelfAssessmentMixin(AssessmentMixin):
@XBlock.handler
def render_self_assessment(self, data, suffix=''):
return self.render('static/html/oa_self_assessment.html')
return super(SelfAssessmentMixin, self).render('static/html/oa_self_assessment.html')
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