Commit 1c5c54c8 by Diana Huang

Make the rubric for self-assessment selectable and remove the

separate grade selection.
parent 68fc794a
...@@ -208,9 +208,9 @@ class @CombinedOpenEnded ...@@ -208,9 +208,9 @@ class @CombinedOpenEnded
save_assessment: (event) => save_assessment: (event) =>
event.preventDefault() event.preventDefault()
if @child_state == 'assessing' if @child_state == 'assessing' && Rubric.check_complete()
checked_assessment = @$('input[name="grade-selection"]:checked') checked_assessment = Rubric.get_total_score()
data = {'assessment' : checked_assessment.val()} data = {'assessment' : checked_assessment}
$.postWithPrefix "#{@ajax_url}/save_assessment", data, (response) => $.postWithPrefix "#{@ajax_url}/save_assessment", data, (response) =>
if response.success if response.success
@child_state = response.state @child_state = response.state
......
...@@ -122,7 +122,7 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild): ...@@ -122,7 +122,7 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild):
if self.state == self.INITIAL: if self.state == self.INITIAL:
return '' return ''
rubric_renderer = CombinedOpenEndedRubric(system, True) rubric_renderer = CombinedOpenEndedRubric(system, False)
rubric_html = rubric_renderer.render_rubric(self.rubric) rubric_html = rubric_renderer.render_rubric(self.rubric)
# we'll render it # we'll render it
......
...@@ -426,7 +426,6 @@ class PeerGradingProblem ...@@ -426,7 +426,6 @@ class PeerGradingProblem
@submit_button.show() @submit_button.show()
setup_score_selection: (max_score) => setup_score_selection: (max_score) =>
# And now hook up an event handler again # And now hook up an event handler again
$("input[name='score-selection']").change @graded_callback $("input[name='score-selection']").change @graded_callback
......
...@@ -2,20 +2,4 @@ ...@@ -2,20 +2,4 @@
<div class="rubric"> <div class="rubric">
${rubric | n } ${rubric | n }
</div> </div>
% if not read_only:
<div class="scoring-container">
<h3>Scoring</h3>
<p>Please select a score below:</p>
<div class="grade-selection">
%for i in xrange(0,max_score+1):
<% id = "score-{0}".format(i) %>
<input type="radio" class="grade-selection" name="grade-selection" value="${i}" id="${id}">
<label for="${id}">${i}</label>
%endfor
</div>
</div>
% endif
</div> </div>
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