Quizzer quiz file


By Stuart Marshall

updated over 1 year ago

The actual content for the quiz (questions, answers, feedback etc) is not created within RapidWeaver. Instead, a separate file (in JSON format) is used and you link the stack to that. The file can sit in your RapidWeaver Resources folder or you can add it to an online folder somewhere and then link to it there. The latter option means that you are effectively 'warehousing' your quiz file and allows you (or others) to edit and update the content outside of RapidWeaver.

You can either create the required file by creating (or editing) your quiz file in a code editor or use our quiz code generator.

The JSON Quiz file code generator

We have a great way for you to create your quiz files. Our online code generator lets you use a simple web interface to add all of your questions and answers. You can then download the quiz file and link this to Quizzer. You can also use the code generator to edit existing quiz code or to view and edit some sample quizzes. This is the recommended approach for creating your quiz files. Quiz Code Generator

The JSON Quiz file

Although the recommended approach for creating your quiz file is to use the quiz code generator (which doesn't require you to use any code!) it is useful to understand how the JSON file works. This section details how the JSON quiz file is structured and how it can be created / edited. A JSON template is provided with the stack and can be edited in any plain text editor (e.g. TextEdit) or code editor (e.g. Brackets or Atom). Probably the easiest way to create your JSON quiz files though is by using an online JSON editor such as JSONeditoronline . Simply paste the example JSON text in there, edit and then download the JSON file to your computer. This particular tool has the added benefit of allowing you to drag and drop sections of the text to let you more easily change the order of questions etc.

The JSON files for the examples used on quizzer web page can be downloaded below.

The Quiz file is made up of 2 components 'Info' and 'Questions'. The best way to see how this works is to simply look at the file / structure and cross-reference it with the quiz object. You can download the JSON file used for the RapidWeaver example quiz (from above) using the button below.


The info part allows you to add some information about the quiz, such as title and description. It is also where you can set up some of your feedback for display at the end of the quiz (i.e. results and the ranking levels).


The questions section of the JSON file contains as many questions as you wish. Each containing (as a minimum) what you can see in the image below: A question ('q'), an array of possible answers ('a') and feedback text for correct and incorrect. The text that is added to the <span> parts of the feedback text will show in the colours that you set in the stack settings (e.g. green for correct and red for incorrect).

Questions - Additional Options

In addition to these basic options for creating questions. You can also style the text (bold, italics etc) and add images. There is also a method available to allow a question to be marked as correct if any of the correct responses have been selected (as opposed to the default of needing them all to be selected). Likewise, where a question has only one correct answer you can set the question to show checkboxes (as opposed the default of using radio buttons).

This may look tricky or sound complicated (if you are not used to working with files such as this) but all you really need to do to make your quiz is simply edit any of the template quiz files that come with this stack and replace the existing text for the text that you want. If you need more questions simply copy and paste an existing question.

A detailed guide about the JSON Quiz file structure can be downloaded here.

You can view a full Quizzer tutorial. The tutorial contains a few videos about creating the JSON quiz file and also about some of the styling and functionality settings that Quizzer stack offers and even though there is now a quiz code generator available, it is well worth understanding how the JSON file works.

Did this answer your question?