Commit 8f4efb04 by Diana Huang Committed by Vik Paruchuri

Hook up new radio buttons to the Javascript

parent 69ae1cc2
......@@ -34,7 +34,7 @@
<a href="#">Respond to Feedback</a>
</header>
<section id="evaluation_${id}" class="evaluation">
How accurate do you think this grading is?
<p>How accurate do you think this feedback is?</p>
<div class="evaluation-scoring">
<ul class="scoring-list">
<li><input type="radio" name="evaluation-score" id="evaluation-score-5" value="5" /> <label for="evaluation-score-5"> Excellent</label></li>
......@@ -44,7 +44,7 @@
<li><input type="radio" name="evaluation-score" id="evaluation-score-1" value="1" /> <label for="evaluation-score-1"> Awful</label></li>
</ul>
</div>
Additional comments:
<p>Additional comments:</p>
<textarea rows="${rows}" cols="${cols}" name="feedback_${id}" class="feedback-on-feedback" id="feedback_${id}"></textarea>
<div class="submit-message-container">
<input name="submit-message" class="submit-message" type="button" value="Submit your message"/>
......
......@@ -205,9 +205,13 @@ class @Problem
feedback = @$('section.evaluation textarea.feedback-on-feedback')[0].value
submission_id = $('div.external-grader-message div.submission_id')[0].innerHTML
grader_id = $('div.external-grader-message div.grader_id')[0].innerHTML
score = $(".evaluation-scoring input:radio[name='evaluation-score']:checked").val()
fd.append('feedback', feedback)
fd.append('submission_id', submission_id)
fd.append('grader_id', grader_id)
if(score)
fd.append('score', score)
settings =
type: "POST"
......@@ -216,7 +220,7 @@ class @Problem
contentType: false
success: (response) =>
@gentle_alert response.message
@$('section.evaluation input.submit-message').hide()
@$('section.evaluation').slideToggle()
$.ajaxWithPrefix("#{@url}/message_post", settings)
......
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