Commit b64177b8 by solashirai Committed by Piotr Mitros

starting to figure out ux

parent cd45bc0a
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
} }
div[data-rate="flag"]{ div[data-rate="flag"]{
float: center; position: relative;
float: right;
} }
div[data-rate="upvote"] { div[data-rate="upvote"] {
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<div class="csh_student_answer"> <div class="csh_student_answer">
<span><b>{{answer}}</b></span> <span><b>{{answer}}</b></span>
<div> <div>
<input type ="button" class="csh_student_hint_creation" value="Submit a new hint for this answer." <input type ="button" class="csh_student_hint_creation" value="Submit a New Hint"
</input> </input>
</div> </div>
</div> </div>
......
...@@ -84,7 +84,7 @@ function CrowdsourceHinter(runtime, element){ ...@@ -84,7 +84,7 @@ function CrowdsourceHinter(runtime, element){
}; };
html = Mustache.render($("#show_hint_feedback").html(), data); html = Mustache.render($("#show_hint_feedback").html(), data);
}); });
$(this).append(html); $(this).find("span").append(html);
} }
}); });
} }
...@@ -232,9 +232,12 @@ function CrowdsourceHinter(runtime, element){ ...@@ -232,9 +232,12 @@ function CrowdsourceHinter(runtime, element){
success: function (result){ success: function (result){
if(result.rating == "flagged"){ if(result.rating == "flagged"){
//hide hint if it was flagged by the student //hide hint if it was flagged by the student
$(this).parent().parent().hide(); $(".csh_hint", element).each(function(){
if ($(this).parent().parent().find(".csh_hint").text() == hint && $(this).parent().parent().parent().find("span").text() == student_answer){
$(this).parent().parent().remove(); $(this).parent().parent().remove();
} }
});
}
else if(result.rating != "voted"){ else if(result.rating != "voted"){
$(".csh_hint", element).each(function(){ $(".csh_hint", element).each(function(){
if ($(this).parent().parent().find(".csh_hint").text() == hint && $(this).parent().parent().parent().find("span").text() == student_answer){ if ($(this).parent().parent().find(".csh_hint").text() == hint && $(this).parent().parent().parent().find("span").text() == student_answer){
......
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