Widget:Sandbox: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 490: | Line 490: | ||
} | } | ||
if (obj.AnswerAExp && obj.AnswerAExp.length > 0 && exam.examType === "Tutor") { | if (obj.AnswerAExp && obj.AnswerAExp.length > 0 && exam.examType === "Tutor") { | ||
htmlStuff += "<div class='answerExp explanationHide' id='Ae'> | htmlStuff += "<div class='answerExp explanationHide' id='Ae'>" + trimP(obj.AnswerAExp) + "</div>"; | ||
} | } | ||
if (obj.AnswerB && obj.AnswerB.length > 0) { | if (obj.AnswerB && obj.AnswerB.length > 0) { | ||
Line 496: | Line 496: | ||
} | } | ||
if (obj.AnswerBExp && obj.AnswerBExp.length > 0 && exam.examType === "Tutor") { | if (obj.AnswerBExp && obj.AnswerBExp.length > 0 && exam.examType === "Tutor") { | ||
htmlStuff += "<div class='answerExp explanationHide' id='Be'> | htmlStuff += "<div class='answerExp explanationHide' id='Be'>" + trimP(obj.AnswerBExp) + "</div>"; | ||
} | } | ||
if (obj.AnswerC && obj.AnswerC.length > 0) { | if (obj.AnswerC && obj.AnswerC.length > 0) { | ||
Line 502: | Line 502: | ||
} | } | ||
if (obj.AnswerCExp && obj.AnswerCExp.length > 0 && exam.examType === "Tutor") { | if (obj.AnswerCExp && obj.AnswerCExp.length > 0 && exam.examType === "Tutor") { | ||
htmlStuff += "<div class='answerExp explanationHide' id='Ce'> | htmlStuff += "<div class='answerExp explanationHide' id='Ce'>" + trimP(obj.AnswerCExp) + "</div>"; | ||
} | } | ||
if (obj.AnswerD && obj.AnswerD.length > 0) { | if (obj.AnswerD && obj.AnswerD.length > 0) { | ||
Line 508: | Line 508: | ||
} | } | ||
if (obj.AnswerDExp && obj.AnswerDExp.length > 0 && exam.examType === "Tutor") { | if (obj.AnswerDExp && obj.AnswerDExp.length > 0 && exam.examType === "Tutor") { | ||
htmlStuff += "<div class='answerExp explanationHide' id='De'> | htmlStuff += "<div class='answerExp explanationHide' id='De'>" + trimP(obj.AnswerDExp) + "</div>"; | ||
} | } | ||
if (obj.AnswerEExp && obj.AnswerE.length > 0) { | if (obj.AnswerEExp && obj.AnswerE.length > 0) { | ||
Line 514: | Line 514: | ||
} | } | ||
if (obj.AnswerEExp && obj.AnswerEExp.length > 0 && exam.examType === "Tutor") { | if (obj.AnswerEExp && obj.AnswerEExp.length > 0 && exam.examType === "Tutor") { | ||
htmlStuff += "<div class='answerExp explanationHide' id='Ee'> | htmlStuff += "<div class='answerExp explanationHide' id='Ee'>" + trimP(obj.AnswerEExp) + "</div>"; | ||
} | } | ||
$("#examSpace").html(htmlStuff); | $("#examSpace").html(htmlStuff); | ||
Line 522: | Line 522: | ||
$("div.answer").mouseover(function () { | $("div.answer").mouseover(function () { | ||
$(this).css({ | $(this).css({ | ||
'border' : ' | 'border' : '0px solid #000' | ||
}) | }) | ||
}).mouseout(function () { | }).mouseout(function () { | ||
$(this).css({ | $(this).css({ | ||
'border' : ' | 'border' : '0px solid #FFF' | ||
}) | }) | ||
}); | }); | ||
Line 655: | Line 655: | ||
$(".answerExp").each(function(){ | $(".answerExp").each(function(){ | ||
if($(this).attr('id') === event.data.examQuestions[event.data.currentQuestion].RightAnswer+"e"){ | if($(this).attr('id') === event.data.examQuestions[event.data.currentQuestion].RightAnswer+"e"){ | ||
$(this).prepend("<b>Correct:</b> "); | $(this).prepend(" <b>Correct:</b> "); | ||
} else { | } else { | ||
$(this).prepend("<b>Incorrect:</b> "); | $(this).prepend(" <b>Incorrect:</b> "); | ||
} | } | ||
}); | }); |