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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + trimP(obj.AnswerAExp) + "</div>";
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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + trimP(obj.AnswerBExp) + "</div>";
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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + trimP(obj.AnswerCExp) + "</div>";
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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + trimP(obj.AnswerDExp) + "</div>";
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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + trimP(obj.AnswerEExp) + "</div>";
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' : '5px solid #000'
'border' : '0px solid #000'
})
})
}).mouseout(function () {
}).mouseout(function () {
$(this).css({
$(this).css({
'border' : '5px solid #FFF'
'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("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Correct:</b> ");
                               } else {
                               } else {
                                       $(this).prepend("<b>Incorrect:</b> ");
                                       $(this).prepend("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Incorrect:</b> ");
                               }
                               }
                 });
                 });

Revision as of 19:13, 27 February 2014