Created
November 26, 2010 09:25
-
-
Save scallopedllama/716453 to your computer and use it in GitHub Desktop.
quizzy diff to turn off answer checking.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/quizzy.js b/quizzy.js | |
index bded165..086d1a4 100644 | |
--- a/quizzy.js | |
+++ b/quizzy.js | |
@@ -161,6 +161,16 @@ function requestNextQuestion() | |
//add the click event to the check and next buttons | |
$('#quizzy_q' + curQuestion + '_foot_chk').click(checkQuestion); | |
$('#quizzy_q' + curQuestion + '_foot_nxt').click(function (){ | |
+ //make sure the user selected one | |
+ if( $('.quizzy_q_opt_b:checked').length == 0 ) | |
+ return; | |
+ $.get('quizzy/serveExplanation.php', {quizFile: quizFile, quizIndex: quizIndex, questNo: curQuestion, selOpt: selOpt}, function(data) { | |
+ //have the data returned by that ajax query, set the proper div info | |
+ $('#quizzy_q' + curQuestion + '_exp').html(data); | |
+ //that should have set the correctOpt and addScore variables | |
+ score += addScore; | |
+ }); | |
+ | |
$('#quizzy').loading(true); | |
$(this).unbind(); | |
requestNextQuestion(); | |
@@ -174,7 +184,7 @@ function requestNextQuestion() | |
$('.quizzy_q_opt_b').attr('checked', false); | |
//fade in the check button | |
- $('#quizzy_q' + curQuestion + '_foot_chk').attr('disabled', false).fadeIn(fadeSpeed); | |
+ $('#quizzy_q' + curQuestion + '_foot_nxt').attr('disabled', false).fadeIn(fadeSpeed); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment