Quiz
Use this type of content to guide the discussion through a series of questions and save the answers.
Interaction in the Compositeur Digital
You can navigate to the previous and next page using the <
and >
arrows.
Depending on the type of page you can:
- check or uncheck a value
- select a numeric value using a slider
- fill in text boxes
- open a specific document
Content management
- Folder extension:
quiz
The quiz folder contains:
- Optional
_background
image file to customize the layout of the quiz - Optional documents required for the quiz
- A
_meta
folder containing all images required for the quiz - a configuration file:
_questions.xml
The configuration file specifies each page of the quiz. It is formatted in XML and can be edited using Notepad or any other text editing application.
You can download a sample quiz file by clicking here.
Configuration file structure
The Quiz file must contains two parts: sections
and pages
.
Generic file structure:
<quizz>
<sections>
list of sections
</sections>ˋ
<pages>
list of pages
</pages>
</quizz>
Each pages will describe a question. Sections will let you group pages that have the same section name.
Sections
Set the section display name in a section
tag and optionnaly define the id
attribute if you need to create a
reference to this section.
<section id="intro">1. INTRODUCTION</section>
Pages
You can create a quiz with different page types but all pages should have the following items in common:
- a
sectionId
attribute that assigns a page to a section. The section name will appear on top of the page. - an optional
id
attribute to be used as an identifier if a reference to that page is needed. - a
nextPageId
attribute: optional reference to the page that shoud be displayed next. If not set, the following page described in the file will be used.
Page order
The first page described in the list will always be the first page displayed.
The last page described will be by default the last page displayed,
To force a page to finish the quiz, set the nextPageId
attribute value to @end
.
Page types
questionPage
This type lets you create a question with multiple answers. Please note that an answer must be selected before going to the next page.
Here are the attributes for questionPage
:
label
: Question type. Superseeds thevisual
attribute.visual
: name of the question image file (without extension). The file must exist in the_meta
folder.allowMultiple
: set totrue
to allow the selection of multiple answer.
The content of the questionPage
is the list of answers, which can be of various types:
- texted answers, with the tag
answer
: ```xml
- visual answers, with the tag `imageAnswer`. Set the `visual` attribute to the name of the targeted image (without extension) in the `_meta` folder:
```xml
<imageAnswer visual="image 2"/>
optionally you can set a caption:
<imageAnswer visual="image 2">my caption</imageAnswer>
It is not possible to mix text answers with visual answers in the same question.
You can define conditional questions based on answers provided by the user. To do so, use the nextPageId
attribute to jump to a specific page for a given answer :
<questionPage id="Q1" sectionId="section 2" label="To which aquestion do you wish to answer ?" >
<answer>The next question</answer>
<answer nextPageId="Q1">This one again</answer>
<answer nextPageId="Q3">Skip one please</answer>
</questionPage>
<questionPage id="Q2" sectionId="section 3" label="The next question">
...
</questionPage>
<questionPage id="Q3" sectionId="section 3" label="The last question">
...
</questionPage>
It is also possible to illustrate a question by adding a photo using: sideVisual
:
<orderPage sectionId="section 1" sideVisual="House" label="Prioritize your projects" answerNumber="3">
<answer>Renovating</answer>
<answer>Buy a house</answer>
<answer nextPageId="tousLesBiens">Buy a car</answer>
<answer nextPageId="tousLesBiens">Prepare retirement</answer>
</orderPage>
page
Describes a simple page to display with either text or image:
label
: text to displayvisual
: name of the image file to display (no extension, file present in_meta
folder)
<page sectionId="intro" label="Ceci est un test"/>
infoPage
Displays a simple form in which the user can type in texted answers. Set the label
attribute of the info
tags to define a name for the text box.
<infoPage sectionId="intro" label="Please fill out your identity">
<info label="Name"/>
<info label="Surname"/>
</infoPage>
To use this information as an input for other documents or populate the profile info, use the valueKey
attribute of the info
tag (see shared data).
numericSliderPage
Displays a page with a single slider that lets the user choose a (rounded) numerical value:
label
: question text. Takes precedence overvisual
.visual
: name of the image file to display (no extension, file present in_meta
folder).min
: minimum selectable valuemax
: maximum selectable valueminLabel
: (optional) : specific display value for the minimum valuemaxLabel
: (optional) : specific display value for the maximum valuedefault
: (optional) preselected valuestepSize
: difference between two steps of the cursorformat
: changes the way the value is displayed
Some possible formats are:
N0
: rounded valueC0
: rounded monetary value according to the current regional setting (i.e. uses €, £, $, etc. where relevant)
<numericSliderPage id="funds" sectionId="section 3" label="Your available funds" min="0" max="5000000" stepSize="5000" format="C0" valueKey="finance.budget" />
To share this information with other documents or the profile info, use the valueKey
attribute of the info
tag (see shared data).
labelSliderPage
This displays a page with a slider with predefined values.
label
: le titre ou la question à afficher.
Add answer
tags to add predefined values, the fisrt being the minimum and the last being the maximum.
example :
<labelSliderPage sectionId="section1" label="Faites vous souvent des achats en ligne ?">
<answer>Jamais</answer>
<answer>Parfois</answer>
<answer>Souvent</answer>
<answer>Toujours</answer>
</labelSliderPage>
imageSliderPage
This type offers the same functionality as the previous labelSliderPage
but using images for predefined values.
label
: question text. Takes precedence overvisual
.visual
: name of the image file to display (no extension, file present in_meta
folder).leftVisual
: picture to the left of the cursor.rightVisual
: picture to the right of the cursor.stepQuantity
: the nomber of selectable steps (recommended value: 10)
<imageSliderPage sectionId="part 1" label="What characterizes you most:" leftVisual="image1" rightVisual="image2" stepQuantity="10"/>
videoPage
To put a video, add the tag video
which is given the name of it in the attribute content
.
This tag has 2 other attributes :
disableSkip
which will betrue
so as not to pass to the next or previous slides until the video is finished, otherwise it will befalse
endAction
there are 3 action options at the end of a video:GoToNextPage
: Go to next slideFadeToNextPage
: Passes to the next slide, with a fade effectNothing
: nothing happens at the end of the video
<videoPage content="presentation" disableSkip="true" endAction="FadeToNextPage">
</videoPage>
scoresResultPage
It is possible to add a score to the question and thus have a result page.
To do this, add the attribute score
to the answers and define a number.
For the result page, use the
<questionPage sectionId="section 1" sideVisual="rebebechat" label="Question">
<answer score="10">answer 1</answer>
<answer score="2">answer 2</answer>
<answer score="8">answer 3</answer>
<answer score="0">answer 4</answer>
</questionPage>
<scoresResultPage sectionId="section 2" sideVisual="key" label="Vous êtes">
<scoreResult title="An expert" scoreMax="11">100% good answers !!! Congratulations !!!</scoreResult>
<scoreResult title="Almost an expert" scoreMax="8">Another little effort, you're almost there</scoreResult>
<scoreResult title="Beginner" scoreMax="2">Take notes for the next time</scoreResult>
<scoreResult title="A robot" scoreMax="0">You have not read the questions</scoreResult>
</scoresResultPage>
documentPage
Displays a link to open a document in the Compositeur Digital.
label
: Title or question text.document
: name of the document, which must be available in the same folder as the quiz.
<documentPage label="Your documents:" document="Documents A"/>
orderPage
Displays a lists of values to be ordered by the user.
label
: titel or question text.answerNumber
: minimum number of answers to select.
Add a list of answer
or imageAnswer
for available choices. The two types cannot be mixed.
<orderPage sectionId="section 1" label="Prioritize your projects" answerNumber="3">
<answer>Renovating</answer>
<answer>Buy a house</answer>
<answer nextPageId="tousLesBiens">Buy a car</answer>
<answer nextPageId="tousLesBiens">Prepare retirement</answer>
</orderPage>
<orderPage sectionId="section 1" label="I would rather live in a" answerNumber="2">
<visualAnswer visual="house" visualChecked="test1">House</visualAnswer>
<visualAnswer visual="flat" visualChecked="test2">Flat</visualAnswer>
</orderPage>
Results
Results can be found in the Documents\Compositeur Digital Quiz
folder.
A new line is added in the result file each time the user reaches the last page of a quiz.