Commit f9dfc035 by solashirai Committed by Piotr Mitros

continuing css

parent 6361a5ae
......@@ -225,9 +225,15 @@ class CrowdsourceHinter(XBlock):
if str(self.Used[index]) in self.hint_database[self.WrongAnswers[index]]:
# add new key (hint) to feedback_data with a value (incorrect answer)
feedback_data[str(self.Used[index])] = str(self.WrongAnswers[index])
self.WrongAnswers=[]
self.Used=[]
return feedback_data
else:
# if the student's answer had no hints (or all the hints were flagged and unavailable) return None
feedback_data[None] = str(self.WrongAnswers[index])
self.WrongAnswers=[]
self.Used=[]
return feedback_data
self.WrongAnswers=[]
self.Used=[]
return feedback_data
......
......@@ -30,7 +30,7 @@
</script>
<script type="x-tmpl/mustache" id="student_hint_creation">
<p><input type="text" name="studentinput" class="csh_student_text_input" size="40">
<p><textarea type="text" name="studentinput" class="csh_student_text_input"></textarea>
<input answer="{{student_answer}}" type="button" class="csh_submit_new" value="Submit Hint">
</p>
</script>
......@@ -59,13 +59,13 @@
<div class='csh_HintsToUse' student_answer = ''>
</div>
<div class='csh_HintQuickFeedback'>
<div role="button" class="csh_rate_hint" data-rate="upvote" data-icon="arrow-u" aria-label="upvote">
<div role="button" class="csh_rate_hint" data-rate="upvote" title="This hint was helpful!">
<b></b>
</div>
<div role="button" class="csh_rate_hint" data-rate="downvote" aria-label="downvote">
<div role="button" class="csh_rate_hint" data-rate="downvote" title="This hint was not very helpful.">
<b></b>
</div>
<div role="button" class="csh_rate_hint" data-rate="flag" data-icon="flag" aria-label="flag">
<div role="button" class="csh_rate_hint" data-rate="flag" title="Report this hint">
<b></b>
</div>
</div>
......
......@@ -205,6 +205,9 @@ function CrowdsourceHinter(runtime, element){
})
$(element).on('click', '.csh_rate_hint', function(){
if ($(this).attr('data-rate') == "flag"){
alert("This hint has been flagged for review.");
}
hint = $('.csh_HintsToUse', element).text();
student_answer = $('.csh_HintsToUse', element).attr('student_answer');
Logger.log('crowd_hinter.rate_hint.click.event', {"hint": hint, "student_answer": student_answer, "rating": $(this).attr('data-rate')});
......
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