Skip to content

Instantly share code, notes, and snippets.

@goldhat
Created February 18, 2017 17:24
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 goldhat/84d7f197d0fe4dc21d698f0b7785f657 to your computer and use it in GitHub Desktop.
Save goldhat/84d7f197d0fe4dc21d698f0b7785f657 to your computer and use it in GitHub Desktop.
QuizMaster Access Code Processing Functions
/* Global Scope (Not On Ready) */
function quizmasterProcessAccessCode( codeEntered, code ) {
if( codeEntered == code ) {
console.log("code is correct");
quizmasterGrantAccessByCode();
} else {
quizmasterDenyAccessByCode();
}
}
function quizmasterGrantAccessByCode() {
jQuery('.quizmaster-access-code-error').hide();
console.log('starting quiz!');
//globalElements.quizStartPage.show();
jQuery('.quizMaster_startOnlyAccessCode').hide();
jQuery('.quizMaster_text').show();
}
function quizmasterDenyAccessByCode() {
console.log('code is wrong');
jQuery('.quizmaster-access-code-error').show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment