"A Proud Gentoo User"
Business picture



To support my online book, Linux Sea, I wanted to create some online Questions and Answers which allowed visitors to see if they read the book well (or, in general, know enough of Linux). I fiddled around with XSL/XML (for storage) and JavaScript (for validation of the questions) and got a workable result: Quizzer.

Quizzer allows you to structure questions/answers in categories (so the questions aren't in a big messy all-in-one page) and subcategories (with "unlimited" depth).

For each question, you enter:

  • It's title (main question)
  • Some additional information (the body)
  • The type of answer you request:
    • Single-choice
    • Multiple choice
    • String answer (which is a regular expression), supporting:
      • Case sensitive or case insensitive
      • Multiple answers (yielding multiple input fields)
      • Multiple correct answers (single input field, but multiple possible answers)
      • Pre- and post text captions for the answer field
  • An explanation for the answer.

If you want to question yourself, you can loop over the questions using the navigation, which supports:

  • Previous/next question
  • Show answer (if you're lazy ;-)
  • Random question in category or entire set

The randomizer isn't truely random: it first "randomly" picks a category, and then "randomly" picks a question. If you have two categories, one with 100 questions and one with 1 question, the single question of the second category will - on average - be shown 50% of the time.

You can download the fileset together with a few example entries, or view the example immediately.

Another advantage of the fileset is that you only need Firefox / Internet Explorer to run it - no need for additional libraries such as XSL parsers or scripting languages. Also, you don't need to run it from a web server - you can load it in your browser from your local disk.