Commit a0ab195e by Sola

now have submission buttons that are specific to the incorrect answer to which…

now have submission buttons that are specific to the incorrect answer to which the student wants to submit a hint. i believe all is functional.
parent bd777f90
......@@ -34,110 +34,113 @@ class CrowdXBlock(XBlock):
@XBlock.json_handler
def get_hint(self, data, suffix=''): #get hints into HintsToUse dict, pass on to user
answer = str(data["submittedanswer"])
if str(data["submittedanswer"]) == self.correctanswer:
return{"correct": 1}
hintsarehere = 0
self.WrongAnswers.append(str(data["submittedanswer"])) #add user's incorrect answer to WrongAnswers
answer = str(data["submittedanswer"])
if str(data["submittedanswer"]) == self.correctanswer:
return{"correct": 1}
hintsarehere = 0
self.WrongAnswers.append(str(data["submittedanswer"])) #add user's incorrect answer to WrongAnswers
for key in self.hints:
temphints = str(self.hints[str(key)]) #perhaps a better way to do this exists, but for now this works
if str(key) == str(data["submittedanswer"]):
print("HI HEllO")
self.HintsToUse = {}
self.HintsToUse.update(ast.literal_eval(temphints))
for key in self.HintsToUse:
if key not in self.Used:
hintsarehere = 1
if hintsarehere == 0:
print("PLSDONTHAPPENDOE")
temphints = str(self.hints[str(key)]) #perhaps a better way to do this exists, but for now this works
if str(key) == str(data["submittedanswer"]):
print("HI HEllO")
self.HintsToUse = {}
self.HintsToUse.update(ast.literal_eval(temphints))
for key in self.HintsToUse:
if key not in self.Used:
hintsarehere = 1
print("hints are here doe")
if hintsarehere == 0:
print("PLSDONTHAPPENDOE")
self.HintsToUse.update(self.DefaultHints) #Use DefaultHints if there aren't enough other hints
if str(data["submittedanswer"]) not in self.hints:
self.hints[str(data["submittedanswer"])] = {} #add user's incorrect answer to WrongAnswers
if max(self.HintsToUse.iteritems(), key=operator.itemgetter(1))[0] not in self.Used:
if str(data["submittedanswer"]) not in self.hints:
self.hints[str(data["submittedanswer"])] = {} #add user's incorrect answer to WrongAnswers
if max(self.HintsToUse.iteritems(), key=operator.itemgetter(1))[0] not in self.Used:
self.Used.append(max(self.HintsToUse.iteritems(), key=operator.itemgetter(1))[0]) #Highest rated hint is shown first
return {'HintsToUse': max(self.HintsToUse.iteritems(), key=operator.itemgetter(1))[0]}
else:
NotUsed = random.choice(self.HintsToUse.keys())
if len(NotUsed) != len(self.Used):
while NotUsed in self.Used:
NotUsed = random.choice(self.HintsToUse.keys()) #Choose random hint that hasn't already been Used
self.Used.append(NotUsed)
return {'HintsToUse': NotUsed} #note to self dont let python get into endless notused loop
return {'HintsToUse': max(self.HintsToUse.iteritems(), key=operator.itemgetter(1))[0]}
else:
NotUsed = random.choice(self.HintsToUse.keys())
if len(NotUsed) != len(self.Used):
while NotUsed in self.Used:
NotUsed = random.choice(self.HintsToUse.keys()) #Choose random hint that hasn't already been Used
self.Used.append(NotUsed)
return {'HintsToUse': NotUsed} #note to self dont let python get into endless notused loop
@XBlock.json_handler
def get_feedback(self, data, suffix=''): #start feedback, sent hint/answer data
feedbackdict = {}
if len(self.WrongAnswers) == 0:
return #Do nothing if no mistakes were made
else: #lenth of Used will be used to dictate flow of feedback
for i in range(0, len(self.Used)):
ans = str('wngans' + str(i))
hnt = str('hntusd' + str(i))
feedbackdict[str(self.Used[i])] = str(self.WrongAnswers[i])
print str(feedbackdict)
return feedbackdict
feedbackdict = {}
if len(self.WrongAnswers) == 0:
return #Do nothing if no mistakes were made
else: #lenth of Used will be used to dictate flow of feedback
for i in range(0, len(self.Used)):
ans = str('wngans' + str(i))
hnt = str('hntusd' + str(i))
feedbackdict[str(self.Used[i])] = str(self.WrongAnswers[i])
print str(feedbackdict)
return feedbackdict
@XBlock.json_handler #add 1 or -1 to rating of a hint
def rate_hint(self, data, suffix=''):
ansnum = self.Used.index(str(data['ansnum']))
print("ansnum is" + ansnum)
if self.Voted == 0:
ansnum = self.Used.index(str(data['ansnum']))
print("ansnum is" + str(ansnum))
if self.Voted == 0:
for key in self.DefaultHints:
if key == self.Used[int(ansnum)]: #rating for hints in DefaultHints
self.DefaultHints[str(key)] += int(data["rating"])
self.Voted = 1
print str(self.DefaultHints)
return
self.DefaultHints[str(key)] += int(data["rating"])
self.Voted = 1
print str(self.DefaultHints)
return
for key in self.hints:
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
if str(key) == str(self.WrongAnswers[ansnum]): #ansnum will the the answer/hint pair that is selected
tempdict[self.Used[int(ansnum)]] += int(data["rating"])
self.hints[str(key)] = tempdict
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
self.Voted = 1
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
if str(key) == str(self.WrongAnswers[ansnum]): #ansnum will the the answer/hint pair that is selected
tempdict[self.Used[int(ansnum)]] += int(data["rating"])
self.hints[str(key)] = tempdict
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
self.Voted = 1
@XBlock.json_handler
def give_hint(self, data, suffix=''): #add student-made hint into hints
if self.Voted == 0:
if self.Voted == 0:
for key in self.hints:
if str(key) == str(self.WrongAnswers[0]):
if str(data['submission']) not in self.hints[str(key)]:
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
tempdict.update({data['submission']: 0})
self.hints[str(key)] = tempdict
self.Voted = 1
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
else:
ansnum = self.Used.index(data['submission'])
for key in self.DefaultHints:
print(str(key))
print("still working here")
if str(key) == self.WrongAnswers[self.Used.index(str(data['id']))]:
if str(data['submission']) not in self.hints[str(key)]:
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
tempdict.update({data['submission']: 0})
self.hints[str(key)] = tempdict
self.Voted = 1
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
else:
ansnum = self.Used.index(data['submission'])
for key in self.DefaultHints:
if key == self.Used[int(ansnum)]: #rating for hints in DefaultHints
self.DefaultHints[str(key)] += int(1)
self.Voted = 1
print str(self.DefaultHints)
return
for key in self.hints:
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
if str(key) == str(self.WrongAnswers[int(ansnum)]): #ansnum will the the answer/hint pair that is selected
tempdict[self.Used[int(ansnum)]] += int(1)
self.hints[str(key)] = tempdict
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
self.Voted = 1
self.DefaultHints[str(key)] += int(1)
self.Voted = 1
print str(self.DefaultHints)
return
for key in self.hints:
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
if str(key) == str(self.WrongAnswers[int(ansnum)]): #ansnum will the the answer/hint pair that is selected
tempdict[self.Used[int(ansnum)]] += int(1)
self.hints[str(key)] = tempdict
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
self.Voted = 1
@XBlock.json_handler
def clear_states(self, data, suffix=''):
self.Used = []
self.HintsToUse = {}
self.Voted = 0
self.WrongAnswers = []
self.Used = []
self.HintsToUse = {}
self.Voted = 0
self.WrongAnswers = []
@staticmethod
def workbench_scenarios():
......
......@@ -34,110 +34,113 @@ class CrowdXBlock(XBlock):
@XBlock.json_handler
def get_hint(self, data, suffix=''): #get hints into HintsToUse dict, pass on to user
answer = str(data["submittedanswer"])
if str(data["submittedanswer"]) == self.correctanswer:
return{"correct": 1}
hintsarehere = 0
self.WrongAnswers.append(str(data["submittedanswer"])) #add user's incorrect answer to WrongAnswers
answer = str(data["submittedanswer"])
if str(data["submittedanswer"]) == self.correctanswer:
return{"correct": 1}
hintsarehere = 0
self.WrongAnswers.append(str(data["submittedanswer"])) #add user's incorrect answer to WrongAnswers
for key in self.hints:
temphints = str(self.hints[str(key)]) #perhaps a better way to do this exists, but for now this works
if str(key) == str(data["submittedanswer"]):
print("HI HEllO")
self.HintsToUse = {}
self.HintsToUse.update(ast.literal_eval(temphints))
for key in self.HintsToUse:
if key not in self.Used:
hintsarehere = 1
if hintsarehere == 0:
print("PLSDONTHAPPENDOE")
temphints = str(self.hints[str(key)]) #perhaps a better way to do this exists, but for now this works
if str(key) == str(data["submittedanswer"]):
print("HI HEllO")
self.HintsToUse = {}
self.HintsToUse.update(ast.literal_eval(temphints))
for key in self.HintsToUse:
if key not in self.Used:
hintsarehere = 1
print("hints are here doe")
if hintsarehere == 0:
print("PLSDONTHAPPENDOE")
self.HintsToUse.update(self.DefaultHints) #Use DefaultHints if there aren't enough other hints
if str(data["submittedanswer"]) not in self.hints:
self.hints[str(data["submittedanswer"])] = {} #add user's incorrect answer to WrongAnswers
if max(self.HintsToUse.iteritems(), key=operator.itemgetter(1))[0] not in self.Used:
if str(data["submittedanswer"]) not in self.hints:
self.hints[str(data["submittedanswer"])] = {} #add user's incorrect answer to WrongAnswers
if max(self.HintsToUse.iteritems(), key=operator.itemgetter(1))[0] not in self.Used:
self.Used.append(max(self.HintsToUse.iteritems(), key=operator.itemgetter(1))[0]) #Highest rated hint is shown first
return {'HintsToUse': max(self.HintsToUse.iteritems(), key=operator.itemgetter(1))[0]}
else:
NotUsed = random.choice(self.HintsToUse.keys())
if len(NotUsed) != len(self.Used):
while NotUsed in self.Used:
NotUsed = random.choice(self.HintsToUse.keys()) #Choose random hint that hasn't already been Used
self.Used.append(NotUsed)
return {'HintsToUse': NotUsed} #note to self dont let python get into endless notused loop
return {'HintsToUse': max(self.HintsToUse.iteritems(), key=operator.itemgetter(1))[0]}
else:
NotUsed = random.choice(self.HintsToUse.keys())
if len(NotUsed) != len(self.Used):
while NotUsed in self.Used:
NotUsed = random.choice(self.HintsToUse.keys()) #Choose random hint that hasn't already been Used
self.Used.append(NotUsed)
return {'HintsToUse': NotUsed} #note to self dont let python get into endless notused loop
@XBlock.json_handler
def get_feedback(self, data, suffix=''): #start feedback, sent hint/answer data
feedbackdict = {}
if len(self.WrongAnswers) == 0:
return #Do nothing if no mistakes were made
else: #lenth of Used will be used to dictate flow of feedback
for i in range(0, len(self.Used)):
ans = str('wngans' + str(i))
hnt = str('hntusd' + str(i))
feedbackdict[str(self.Used[i])] = str(self.WrongAnswers[i])
print str(feedbackdict)
return feedbackdict
feedbackdict = {}
if len(self.WrongAnswers) == 0:
return #Do nothing if no mistakes were made
else: #lenth of Used will be used to dictate flow of feedback
for i in range(0, len(self.Used)):
ans = str('wngans' + str(i))
hnt = str('hntusd' + str(i))
feedbackdict[str(self.Used[i])] = str(self.WrongAnswers[i])
print str(feedbackdict)
return feedbackdict
@XBlock.json_handler #add 1 or -1 to rating of a hint
def rate_hint(self, data, suffix=''):
ansnum = self.Used.index(str(data['ansnum']))
print ansnum
if self.Voted == 0:
ansnum = self.Used.index(str(data['ansnum']))
print("ansnum is" + str(ansnum))
if self.Voted == 0:
for key in self.DefaultHints:
if key == self.Used[int(ansnum)]: #rating for hints in DefaultHints
self.DefaultHints[str(key)] += int(data["rating"])
self.Voted = 1
print str(self.DefaultHints)
return
self.DefaultHints[str(key)] += int(data["rating"])
self.Voted = 1
print str(self.DefaultHints)
return
for key in self.hints:
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
if str(key) == str(self.WrongAnswers[ansnum]): #ansnum will the the answer/hint pair that is selected
tempdict[self.Used[int(ansnum)]] += int(data["rating"])
self.hints[str(key)] = tempdict
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
self.Voted = 1
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
if str(key) == str(self.WrongAnswers[ansnum]): #ansnum will the the answer/hint pair that is selected
tempdict[self.Used[int(ansnum)]] += int(data["rating"])
self.hints[str(key)] = tempdict
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
self.Voted = 1
@XBlock.json_handler
def give_hint(self, data, suffix=''): #add student-made hint into hints
if self.Voted == 0:
if self.Voted == 0:
for key in self.hints:
if str(key) == str(self.WrongAnswers[0]):
if str(data['submission']) not in self.hints[str(key)]:
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
tempdict.update({data['submission']: 0})
self.hints[str(key)] = tempdict
self.Voted = 1
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
else:
ansnum = self.Used.index(data['submission'])
for key in self.DefaultHints:
print(str(key))
print("still working here")
if str(key) == self.WrongAnswer[self.Used.index(str(data['id']))]:
if str(data['submission']) not in self.hints[str(key)]:
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
tempdict.update({data['submission']: 0})
self.hints[str(key)] = tempdict
self.Voted = 1
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
else:
ansnum = self.Used.index(data['submission'])
for key in self.DefaultHints:
if key == self.Used[int(ansnum)]: #rating for hints in DefaultHints
self.DefaultHints[str(key)] += int(1)
self.Voted = 1
print str(self.DefaultHints)
return
for key in self.hints:
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
if str(key) == str(self.WrongAnswers[int(ansnum)]): #ansnum will the the answer/hint pair that is selected
tempdict[self.Used[int(ansnum)]] += int(1)
self.hints[str(key)] = tempdict
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
self.Voted = 1
self.DefaultHints[str(key)] += int(1)
self.Voted = 1
print str(self.DefaultHints)
return
for key in self.hints:
tempdict = str(self.hints[str(key)]) #rate hint that is in hints
tempdict = (ast.literal_eval(tempdict))
if str(key) == str(self.WrongAnswers[int(ansnum)]): #ansnum will the the answer/hint pair that is selected
tempdict[self.Used[int(ansnum)]] += int(1)
self.hints[str(key)] = tempdict
print("TESTING AGAIN HI")
print("hints are " + str(self.hints[str(key)]))
print("otherstuff " + str(self.hints))
self.Voted = 1
@XBlock.json_handler
def clear_states(self, data, suffix=''):
self.Used = []
self.HintsToUse = {}
self.Voted = 0
self.WrongAnswers = []
self.Used = []
self.HintsToUse = {}
self.Voted = 0
self.WrongAnswers = []
@staticmethod
def workbench_scenarios():
......
......@@ -4,7 +4,7 @@
</p>
<span><br><span> Dummy Answer Input Here</span></span>
<section id="studentinput" class="textinput">
<input type="text" name="studentanswer" id="studentsubmit" class="math" size="40">
<input type="text" name="studentanswer" id="studentsubmit" class="notmath" size="40">
<input id="studentanswer" type="button" class="button" value="Submit Answer">
</div>
......@@ -30,10 +30,6 @@
<input type="hidden" name="problem_id" value="Numerical Input">
<section class="problem">
<span><br><span> Enter and submit your own hint!</span></span>
<section id="studentinput" class="textinput">
<input type="text" name="studentinput" id="answer" class="math" size="40">
<input id="submit" type="button" class="button" value="Submit Hint">
</div></section></span>
</section>
......
......@@ -15,10 +15,9 @@
<span class='Thankyou'></span>
</p>
<script id="feedback">
var hintused = []
var wronganswer = []
</script>
<div class="hintansarea">
</div>
<p>
<input id="caus" type="button" class="button" value="clearAllUserState">
......@@ -31,10 +30,6 @@ var wronganswer = []
<input type="hidden" name="problem_id" value="Numerical Input">
<section class="problem">
<span><br><span> Enter and submit your own hint!</span></span>
<section id="studentinput" class="textinput">
<input type="text" name="studentinput" id="answer" class="math" size="40">
<input id="submit" type="button" class="button" value="Submit Hint">
</div></section></span>
</section>
......
......@@ -30,25 +30,32 @@ function CrowdXBlock(runtime, element){
$("#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>");
$('.hintansarea').append("<p id=\"submit" + index + "\"> 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><p> <input id=\"" + index + "\" type=\"button\" class=\"submitbutton\" value=\"Submit a hint for this problem\">");
});
};
$(document).on('click', '.hintbutton', function(){ //upvote
console.log("please show me something");
console.log("the first id" + this.id);
id = this.id;
console.log($(this).id());
console.log($(this).attr('id'));
$.ajax({
type: "POST",
url: runtime.handlerUrl(element, 'rate_hint'),
data: JSON.stringify({"rating": 1, "ansnum": $(this).attr('id')}),
success: finish
});})
$('#submit', element).click(function(eventObject) {
$(document).on('click', '.submitbutton', function(){ //upvote
console.log("submitbutton hit");
id = this.id;
console.log("this id " + $(this).attr('id'));
$('#submit' + id).append("<p><input type=\"text\" name=\"studentinput\" id=\"" + id + "\" class=\"math\" size=\"40\"><<input id=\"submit\" type=\"button\" class=\"button\" value=\"Submit Hint\"> </p>");})
$(document).on('click', '#submit', function(){
console.log("the other id thing" + this.id);
console.log("thisthing" + $(".math").attr('id'));
$.ajax({
type: "POST",
url: runtime.handlerUrl(element, 'give_hint'),
data: JSON.stringify({"submission": $('#answer').val()}), //give hin for first incorrect answer
data: JSON.stringify({"submission": $('.math').val(), "id": $(".math").attr('id')}), //give hin for first incorrect answer
success: finish
});
$("#answer").val('');})
......@@ -64,28 +71,16 @@ function CrowdXBlock(runtime, element){
$("#studentsubmit").val('');
$("#answer").val('');})
function finish(){
$("#pair0").hide();
$("#pair3").hide();
$("#pair2").hide();
$("#pair1").hide();
$(".hintbutton").hide();
$('.Thankyou', element).text("Thankyou for your help!");
$('.correct', element).hide();
$(".hintansarea").hide();
}
function clearstates(){
$("#pair0").hide();
$("#pair3").hide();
$("#pair2").hide();
$("#pair1").hide();
$(".hintansarea").hide();
$(".hintbutton").hide();
$("#answer").hide();
$(".problem").hide();
$('.WrongAnswer0', element).text();
$('.HintUsed0', element).text();
$('.WrongAnswer1', element).text();
$('.HintUsed1', element).text();
$('.WrongAnswer2', element).text();
$('.HintUsed2', element).text();
$('.WrongAnswer3', element).text();
$('.HintUsed3', element).text();
}
function checkreply(result){
......
......@@ -30,25 +30,32 @@ function CrowdXBlock(runtime, element){
$("#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>");
$('.hintansarea').append("<p id=\"submit" + index + "\"> 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><p> <input id=\"" + index + "\" type=\"button\" class=\"submitbutton\" value=\"Submit a hint for this problem\">");
});
};
$(document).on('click', '.hintbutton', function(){ //upvote
console.log("please show me something");
console.log("the first id" + this.id);
id = this.id;
console.log($(this).attr('value'));
console.log($(this).attr('id'));
$.ajax({
type: "POST",
url: runtime.handlerUrl(element, 'rate_hint'),
data: JSON.stringify({"rating": 1, "ansnum": $(this).attr('id')}),
success: finish
});})
$('#submit', element).click(function(eventObject) {
$(document).on('click', '.submitbutton', function(){ //upvote
console.log("submitbutton hit");
id = this.id;
console.log("this id " + $(this).attr('id'));
$('#submit' + id).append("<p><input type=\"text\" name=\"studentinput\" id=\"" + id + "\" class=\"math\" size=\"40\"><<input id=\"submit\" type=\"button\" class=\"button\" value=\"Submit Hint\"> </p>");})
$(document).on('click', '#submit', function(){
console.log("the other id thing" + this.id);
console.log("thisthing" + $(".math").attr('id'));
$.ajax({
type: "POST",
url: runtime.handlerUrl(element, 'give_hint'),
data: JSON.stringify({"submission": $('#answer').val()}), //give hin for first incorrect answer
data: JSON.stringify({"submission": $('#answer').val(), "id": $(".math").attr('id')}), //give hin for first incorrect answer
success: finish
});
$("#answer").val('');})
......@@ -64,28 +71,16 @@ function CrowdXBlock(runtime, element){
$("#studentsubmit").val('');
$("#answer").val('');})
function finish(){
$("#pair0").hide();
$("#pair3").hide();
$("#pair2").hide();
$("#pair1").hide();
$(".hintbutton").hide();
$('.Thankyou', element).text("Thankyou for your help!");
$('.correct', element).hide();
$(".hintansarea").hide();
}
function clearstates(){
$("#pair0").hide();
$("#pair3").hide();
$("#pair2").hide();
$("#pair1").hide();
$(".hintansarea").hide();
$(".hintbutton").hide();
$("#answer").hide();
$(".problem").hide();
$('.WrongAnswer0', element).text();
$('.HintUsed0', element).text();
$('.WrongAnswer1', element).text();
$('.HintUsed1', element).text();
$('.WrongAnswer2', element).text();
$('.HintUsed2', element).text();
$('.WrongAnswer3', element).text();
$('.HintUsed3', element).text();
}
function checkreply(result){
......
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