correctanswer=String(default="42",scope=Scope.content)#should be irrelevant for completed version
hints=Dict(default={"75":{"hint12":10,"hint22":0,"hints32":0},"1":{"hint1":1,"hint2":1,"hint3":0},"roflcopter":{"HighFyve":1000}},scope=Scope.content)#All hints. sorted by type of mistake. type_of_incorrect_answer{"hint":rating, "hint":rating}
hints=Dict(default={"2":{"hint1for2":0,"hint2for2":0,"hints3for22":0},"1":{"hint1for1":0,"hint2for1":0,"hint3for1":0},"3":{"hint1for3":0,"hint2for3":0,"hint3for3":0}},scope=Scope.content)#All hints. sorted by type of mistake. type_of_incorrect_answer{"hint":rating, "hint":rating}
HintsToUse=Dict(default={},scope=Scope.user_state)#Dict of hints to provide user
WrongAnswers=List(default=[],scope=Scope.user_state)#List of mistakes made by user
DefaultHints=Dict(default={"hint":100,"hinttwo":10,"hintthree":0,"hintasdf":50,"aas;dklfj?":1000,"SuperDuperBestHint":10000},scope=Scope.content)#Default hints in case no incorrect answers in hints match the user's mistake
DefaultHints=Dict(default={"defaulthint1":0,"defaulthint2":0,"defaulthint3":0,"defaulthint4":0,"defaulthint5":0,"bestdefaulthint":3},scope=Scope.content)#Default hints in case no incorrect answers in hints match the user's mistake
Used=List(default=[],scope=Scope.user_state)#List of used hints from HintsToUse
correctanswer = String(default="42", scope=Scope.content) #should be irrelevant for completed version
hints = Dict(default={"75": {"hint12":10, "hint22":0, "hints32":0}, "1": {"hint1":1, "hint2":1, "hint3":0}, "roflcopter": {"HighFyve":1000}}, scope=Scope.content) #All hints. sorted by type of mistake. type_of_incorrect_answer{"hint":rating, "hint":rating}
hints = Dict(default={"2": {"hint1for2":0, "hint2for2":0, "hints3for22":0}, "1": {"hint1for1":0, "hint2for1":0, "hint3for1":0}, "3": {"hint1for3":0, "hint2for3":0, "hint3for3":0}}, scope=Scope.content) #All hints. sorted by type of mistake. type_of_incorrect_answer{"hint":rating, "hint":rating}
HintsToUse = Dict(default={}, scope=Scope.user_state) #Dict of hints to provide user
WrongAnswers = List(default=[], scope=Scope.user_state) #List of mistakes made by user
DefaultHints = Dict(default={"hint": 100, "hinttwo": 10, "hintthree": 0, "hintasdf": 50, "aas;dklfj?": 1000, "SuperDuperBestHint": 10000}, scope=Scope.content) #Default hints in case no incorrect answers in hints match the user's mistake
DefaultHints = Dict(default={"defaulthint1": 0, "defaulthint2": 0, "defaulthint3": 0, "defaulthint4": 0, "defaulthint5": 0, "bestdefaulthint": 3}, scope=Scope.content) #Default hints in case no incorrect answers in hints match the user's mistake
Used = List(default=[], scope=Scope.user_state)#List of used hints from HintsToUse
@@ -26,53 +27,21 @@ function CrowdXBlock(runtime, element){
functiongetfeedback(result){
$("#answer").show();
$(".problem").show();
if(result.wngans0!=undefined){
$("#pair0").show();
}if(result.wngans1!=undefined){
$("#pair1").show();
}if(result.wngans2!=undefined){
$("#pair2").show();
}if(result.wngans3!=undefined){
$("#pair3").show();
}
$('.WrongAnswer0',element).text("For your incorrect answer of: "+result.wngans0);
$('.HintUsed0',element).text("You recieved the hint: "+result.hntusd0);
$('.WrongAnswer1',element).text("For your incorrect answer of: "+result.wngans1);
$('.HintUsed1',element).text("You recieved the hint: "+result.hntusd1);
$('.WrongAnswer2',element).text("For your incorrect answer of: "+result.wngans2);
$('.HintUsed2',element).text("You recieved the hint: "+result.hntusd2);
$('.WrongAnswer3',element).text("For your incorrect answer of: "+result.wngans3);
$('.HintUsed3',element).text("You recieved the hint: "+result.hntusd3);
}
$("#feedback").show();
$.each(result,function(index,value){
console.log(index+": "+value);
$('.hintansarea').append("<p> For your incorrect answer of:"+" "+value+"</p> <p> You received the hint:"+" "+index+" <input id\""+index+"\" type=\"button\" class=\"hintbutton\" value=\"Upvote this Hint\"> </p>");
@@ -26,53 +27,21 @@ function CrowdXBlock(runtime, element){
function getfeedback(result){
$("#answer").show();
$(".problem").show();
if(result.wngans0 != undefined){
$("#pair0").show();
}if(result.wngans1 != undefined){
$("#pair1").show();
}if(result.wngans2 != undefined){
$("#pair2").show();
}if(result.wngans3 != undefined){
$("#pair3").show();
}
$('.WrongAnswer0', element).text("For your incorrect answer of: " + result.wngans0);
$('.HintUsed0', element).text("You recieved the hint: " + result.hntusd0);
$('.WrongAnswer1', element).text("For your incorrect answer of: " + result.wngans1);
$('.HintUsed1', element).text("You recieved the hint: " + result.hntusd1);
$('.WrongAnswer2', element).text("For your incorrect answer of: " + result.wngans2);
$('.HintUsed2', element).text("You recieved the hint: " + result.hntusd2);
$('.WrongAnswer3', element).text("For your incorrect answer of: " + result.wngans3);
$('.HintUsed3', element).text("You recieved the hint: " + result.hntusd3);
}
$("#feedback").show();
$.each(result, function(index, value) {
console.log( index + ": " + value );
$('.hintansarea').append("<p> For your incorrect answer of:" + " " + value + "</p> <p> You received the hint:" + " " + index + " <input id\"" + index + "\" type=\"button\" class=\"hintbutton\" value=\"Upvote this Hint\"> </p>");