Skip to content

Instantly share code, notes, and snippets.

@scallopedllama
Created November 26, 2010 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scallopedllama/716453 to your computer and use it in GitHub Desktop.
Save scallopedllama/716453 to your computer and use it in GitHub Desktop.
quizzy diff to turn off answer checking.
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