Hey everyone,
jQuizMe 2.0: Features a everything you need to make a javascript quiz online.
After a few months of programming I’ve finally finish jQuizMe. It took a some time to get done but it feels rewarding.
Anyhow, jQuizMe 2.0 is at code.google now.
http://code.google.com/p/jquizme/
What REALLY is Data Science? Told by a Data Scientist - By Joma Tech
Writing perfect code is a challenging process. That's where code reviews come in to help…
"The Next Leap: How A.I. will change the 3D industry - Andrew Price - Blender"
"Captain Disillusion: World's Greatest Blenderer - Live at the Blender Conference 2018 - CaptainDisillusion"
My 5 Favorite Linux Shell Tricks for SPEEEEEED (and efficiency) - By tutoriaLinux > What's…
View Comments
Hi great plugin. Is there a way for me to save the questions itself on the database if it was answered wrong?
Please refer the answer given to anishgiri.
Hi great plugin. Is there a way for me to save the questions itself on the database if it was answered wrong? So it means if 4 questions have been answered wrong these questions will be saved on a database to serve as a report or something..
Look into AJAX tutorials for a complete walk through.
Client Side:
- Send the user information when a question has been answered incorrectly.
options.statusUpdate can help you with this.
http://code.google.com/p/jquizme/wiki/statusUpdate
If might look something like this.
// Using the pre-release of jQuizMe 2.2.
// The following will send the indexes of answers that the user answered incorrectly.
options.statusUpdate = function( quizInfo, currQuiz ){
if( quizInfo.hasQuit ){
var i = quizInfo.problem.length;
var wrongProblemsIndex = [];
while( i-- ){
if( !quizInfo.problem[ i ].isCorrect ){
wrongProblemsIndex.push( i );
}
$.ajax({
url: "http://the-url.com/storeUserResult",
type: "POST",
data: { wrongAnswers: wrongProblemsIndex.join( ',' ) }
});
}
}
}
Server Side:
- Process the request and then send a request to store the information inside the database.
http://www.w3schools.com/php/php_ajax_database.asp
http://www.youtube.com/watch?v=v8HoVdenZFM
Database Server Side:
- Save the information to the appropriate table.
http://www.w3schools.com/php/php_mysql_insert.asp
I hope that helped.
-Larry Battle
if(quizInfo.hasQuit ){
$( "#score" ).html( "Score: "+ quizInfo.score );
$.ajax({
type: "POST"
, url: "save.php"
, data: "score"+quizInfo.score
});
}; }
Kindly correct this code. i m trying to post total score to next page but not succeeding . i am using ajax first time. i love JQuizMe plugin. so want to go in detail.
Post the issue here. https://github.com/LarryBattle/jQuizMe/issues
hiii battle,
how to show score for every question ..
cheers
Use the options.statusUpdate function.
Your code might look like this.
options.statusUpdate = function( quizInfo, $quiz ){
// The page will be redirect to a google if there is more than one question right on quit.
if( !quizInfo.hasQuit ){
$( "#score" ).text( "Score: "+ quizInfo.score );
}
};
Demo:
http://jsfiddle.net/ThDgL/
hiii larry,
how add levels to quiz
Read the source for "Learn those kana".
http://code.google.com/p/learn-those-kana/
You can to read main.js
http://www.bateru.com/jquery/learn-those-kana/js/main.js
Pay close attention to the functions makeQuiz, getQuizQues,
getQuizOptions, getLang.
Hi Larry,
It is amazing pllug-in.
In case of using symbols like theta (ϑ), pie (π) square root etc., in ans, even if the user chooses the correct one, it shows as wrong.
Dear All,
I got the solution.
If you use the hexa decimal code for the symbols, Jquizme works fine.
The hex codes are available in the following link
http://tlt.its.psu.edu/suggestions/international/bylanguage/greekchart.html
For ex, if you want to put ohms symbol, u03A9 use this. u has to be put in place of &#x.
regards.
M. Araoli
i have used Images as questions.. but it takes long time load question .. can u give me any suggestion
Preload the images.
http://stackoverflow.com/questions/476679/preloading-images-with-jquery
thanks.. its works charm
i have removed check it and next buttons.. now
How can i change to next question when click on options..
setCheckAndNextBtn = function(){
var isFlashCard = '';
$(".q-ans",currQuiz).click( function(){
//$("#wcharan",currQuiz).click( function(){
// alert("dfdsf")
now i used like tyhis to change to next question.. ie when click on answers div its go to next question....
Use the statusUpdate function. The object from the first parameter has a method called "nextQuestion". Call that when you want to change to the next function. http://code.google.com/p/jquizme/wiki/statusUpdate
Hi Larry. Amazing job!!!
I am trying to create a quiz that finish when you fail one question. How should I do it?
Use the `options.statusUpdate` function. The first parameter supplies a object that has the attribute `numOfWrong`.
`numOfWrong` is a numeric value that represents the amount of incorrect answers.
Try this.
var options = {};
options.statusUpdate = function( quizFuncs ){
if( quizFuncs.hasQuit ){
return;
}
if( 0 < quizFuncs.numOfWrong ){
alert( "You failed. Please try again." );
quizFuncs.quitQuiz();
}
};
$( "#quiz" ).jQuizMe( quiz, options );
Oh and you're right about the `nextQuestion` function not working.
Hey larrybattle. how i can submit score into database using php/sql. ? i got id #score which is contained by score i need to submit final score into database. Kindly put me on right way. :-) waiting? and can i change the positions of div suppose i want to keep help button beneath Quiz. how i can do ???? Please reply.
one thing more. when i want to display record from database . when i add question column then not display anymore. whats issue with this ?
// There was an extra comma at the end of multiList array.
$( function($){
var quizMulti = {
multiList: [
{
ques: "",//here issue ? no display when adding this.
ans: "",
ansSel: ["", ""],
ansInfo : "" // answer information.
},
]
};
options = {
help: "All the information required can be found in the Introductory Lesson. You can go through the lesson again if you struggle with this quiz.",
showHTML: true,
showAns: true,
animationType: 0,
showWrongAns: true,
score:true,
title: "Vocabulary Quiz"
};
options.statusUpdate = function( quizInfo, $quiz ){
// The page will be redirect to a google if there is more than one question right on quit.
if( !quizInfo.hasQuit ){
$( "#score" ).text( "Score: "+ quizInfo.score );
}
};
$("#quizArea").jQuizMe(quizMulti, options);
});
Please refer to the answer given to `anishgiri` and `Nathan B`
Thanks Larry :-) Appreciated. i want to show image after each question when question will be correct and if answer will wrong then i only want to show his wrong answer as well as discription . how i can do it . Sorry to disturbing you:-)
Thanks Larry. Would you tell me that How i Can show ansinfo when question is right ?? Please
Use `options.showAnsInfo`.
It's in the documentation at http://jquizme.googlecode.com/hg/releases/release%20jQuizMe%202.1.9/demo/Simple%20guide/jquizme-settings.html
If you have any more questions post it on stackoverflow.com or at https://github.com/LarryBattle/jQuizMe/issues