Blog

Categories

Concerts(20)
Events(246)
Humor(41)
Miscellaneous(52)
My Website(46)
News(24)
Technology(16)
Thoughts(4)
Travel(30)
Web Findings(16)

Friday, March 3, 2006

Create your own on-line quiz!

Last night I put together a "quiz engine" which will allow you to create a quiz with your own multiple choice questions and answers. People will be able to take the quiz and have it graded. All you need to do is create a quiz definition file and upload it somewhere on a web.

Here is a sample contents of the quiz definition file:

quiz=["Sample Quiz",
"Question 1",
["Answer 1","Answer 2","Answer 3"], 0,
"Question 2",
["Answer 1","Answer 2","Answer 3"], 2
]

The quiz with the above definition file looks like this. The correct answer for "Question 1" is "Answer 1" and the correct answer for "Question 2" is "Answer 3".

This is the structure of the quiz definition file:

  • Start with quiz=[
  • Enter the title of the quiz in quotes followed by a comma. For example: "How well do you know Raphael?",
  • For each question you need to specify the following:
    • Question in quotes followed by a comma. For example: "Question 1",
    • A list of answers inside square brackets followed by a comma. Each answer must be in quotes and commas separating each answer. For example: ["Answer 1","Answer 2","Answer 3"],
    • Number of the correct answer in the list of answers starting with zero. For example if the correct answer in the example above is "Answer 2", the number should be 1. If there is another question after this one, put a comma after the number.
  • end with closing bracket ]

You must save the file with .js extension. Upload it to some place on the web. Then you can use this URL to see the quiz: http://raphaelpungin.com/quiz?q=[url to the file without ".js"]. For example if the URL to your file is http://members.aol.com/aoluser/myquiz.js, you would use this URL for the quiz:
http://raphaelpungin.com/quiz?q=http://members.aol.com/aoluser/myquiz

Note that if your questions or answers have quotes inside them, prefix them with a back slash (\). For example: Who wrote the book \"Moby Dick\"?

Ok so let's see some quizes here! Post a comment with the URLs to your quizes!

Here is a quiz that my co-worker put together!