Composr Tutorial: Quizzes

Written by Chris Graham (ocProducts)
Image

Viewing a quiz

Viewing a quiz

(Click to enlarge)

There are three kinds of quiz:
  • surveys, which simply collect results (there are no correct answers)
  • tests, which people may pass or fail
  • competitions, which have results and possibly, a winner

All quizzes consist of a series of questions.

Quizzes are a very powerful tool for you to bring a level of interactive community that few other websites have, or for which other websites rely on the services of external websites for.


Managing quizzes

Image

Adding a quiz

Adding a quiz

(Click to enlarge)

Quizzes can be added/edited/deleted from Content Management > Quizzes.
You can delete a quiz from the bottom of its edit form.

Quiz results can be managed from Admin Zone > Audit > Quizzes.

Types of quiz

In summary:
  • Survey: collect results from entrants, no wrong answers
  • Test: entrants pass or fail
  • Competition: winners picked from those on top scores

Competitive

Competitions are entered by members and marked; winners may then be chosen from the Admin Zone.

Example:
The website of a computer games studio could run a competition asking questions about their latest game. The top entrant would win a tour of the games studio headquarters, and three runner ups could win a copy of any game of their choice from their back catalogue.

Tests

Tests are marked as they're completed, and the results sent out as a staff notification.

Example:
The Mensa website could run a quiz to help determine if candidates have a high enough IQ to join Mensa. The quizzes would be automatically marked and the result given to both the visitor and the Mensa staff.

Completed tests are shown on member profiles.

Surveys

Survey results are collected and available from the Admin Zone, and also staff notifications are sent. As survey results are stored in the database, experts may use SQL to make statistical calculations on data.

Example:
A teen community could make a survey to find out teen attitudes on various social issues, to help them write a report to the government lobbying for changes to policy.

Multiple-choice/single-choice inputs are collected under a statistics heading. Full responses (including free-input text fields) may be viewed individually.

Input syntax

The method of inputting quiz questions may seem a bit fiddly at first, but you'll find it is actually fairly straight-forward and makes it really quick to input new sets of questions.

The text should consist of question blocks, each question block having a blank line between it and the next. The first line of a question block is the question, and subsequent lines are a set of potential answers.

There are a few different types of question, indicated by a little tag after the question:
  • [MULTIPLECHOICE] – The user can pick any one answer from the answer set.
  • [MULTIMULTIPLE] – The user can pick multiple answers from the answer set.
  • [LONG] – A multi-line typed answer. the answer set will be ignored as it cannot be auto-marked.
  • [SHORT] – A single-line typed answer. If correct answers are provided then an inexact match is performed. The match is a case-insensitive punctuationless match for being within 75% closeness to the correct answer (25% of the characters may need to be added/removed/substituted) – the user needs to hit a valid answer, and miss all invalid answers.
  • [SHORT_STRICT] – A single-line typed answer. If correct answers are provided then a case-sensitive exact match will be performed.

If a question is followed by [REQUIRED] then Composr will force it to be filled in (unless you have set a timeout and the timeout is exceeded). This is not supported by the MULTIMULTIPLE question type.

You may put line(s) starting with a : immediately under the question, to provide a longer caption for the question.

You may also put line(s) starting with a : and followed by an explanation, below each answer to a question, which will be displayed at completion for the explanation as to specifically why the given answer was correct or incorrect. i.e. it is text given to the user if they selected that particular answer.
MULTIMULTIPLE is a special case, as the user is selecting multiple answers. For MULTIMULTIPLE the explanation text will be shown for any and all incorrect answers (separated by spaces).

There is support for marking. If an answer is followed by [*] then it is considered "correct" (this is very important for competitions and tests). If nothing is marked correct, the question will be considered as manually-marked (resulting in a quoted result range for the user, rather than a specific result), unless [UNMARKED] is put after the question, in which case it will be collected but not count towards marking.

Comcode is supported, so you could include images using code such as:

Code

[url="/example.png" target="_blank"][img]/example_thumb.png[/img][/url]

Time limits

You can set a time limit for a quiz, and also how frequently quizzes can be reattempted.

Note that if you change the time limit while someone is using the quiz then the limit will not properly be reflected for them unless they refresh their browser. Specifically:
  • If the limit is lengthened, JavaScript would not know and give an error too early.
  • If the limit is shortened, JavaScript would not know and give no error when it should have – but a server-side error would be given when submitting.

Accessing/linking quizzes

Quizzes may be accessed via the quiz module (site:quiz page-link, Content > Quizzes on the default menus).

If you don't have the default menus you may want to create a menu link direct to your quiz. To add your quiz to a menu, use the Sitemap tool within the menu editor. You will find your quiz is available as a link underneath Site\Quiz.

Scoring

There are a number of features for scoring and rewarding members, and for using quizzes as an educational tool.

You can mark which answers are correct (not applicable to surveys), and write out custom explanations for why incorrect responses are incorrect.

You can reward members with points for passing a test.

Questions that aren't multi-choice will be either:
  1. manually-marked
  2. unmarked

Manually marked questions result in a percentage range being shown to the user, as the system won't know the true percentage. There's no feature to put in the mark, the expectation would be that it would happen elsewhere (e.g. when picking a competition winner, when contacting the student manually, etc).

Unmarked questions just don't count toward anything. So if you had 5 questions and 1 was unmarked, it would be marked out of 4.

Security and difficulty

You can determine the level of security or difficulty on quizzes:
  • Restrict them only to newsletter subscribers
  • Restrict them by usergroup
  • Randomly shuffle questions and/or answers, to make copying from a cheat-sheet (or thoughtless answering) less likely
  • Time limits (explained above)
  • Limiting open time range
  • Validation (to hide quizzes that are not yet ready)

Quiz sets (advanced)

If you prefix quiz names with "Example: " then you can create quiz sets.

This is mainly just a convention and won't affect how the system works. However, for tests, it will result in running scoring/percentages for the whole test set, when viewing past results on a member's profile screen.

Often surveyors will want to create long multi-part questionnaires. You could link parts together in a chain by putting a follow-up link in each quizzes end-text. Use of the naming convention will help you (and users) intuitively recognise that particular quizzes are designed to go together.

Exporting to CSV

You can export quiz results to a CSV file which is very useful for data analysis purposes. In particular, if some test/competition questions need to be manually marked, doing so in spreadsheet software works well.

Many marketing agencies prefer to pick competition winners from raw CSV data, as well as processing the data for further marketing purposes.

Advanced quiz interfaces (advanced)

You may want quizzes that span multiple screens, or take the user in different directions as they answer questions.
It's not really feasible for us to allow the quiz system to build arbitrarily complex quiz systems. There would be too many assumptions / deviations between different project requirements, and such a system would be too complex to configure. Generally these will therefore require a programmer to construct. We do have a "decision tree" framework in Composr that can aid in building complex multi-screen form systems. It takes out most of the work of building the screens, the forms, the state management, and the UI – just leaving the programmer to declaratively specify the question structure and bind it to some actualiser code.

See also


Feedback

Please rate this tutorial:

Have a suggestion? Report an issue on the tracker.