Improve this page

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:

Content management

The quiz folder contains:

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:

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:

The content of the questionPage is the list of answers, which can be of various types:

my answer
 - 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>

sideVisual

page

Describes a simple page to display with either text or image:

<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:

Some possible formats are:

<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.

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>

labelSliderPage

imageSliderPage

This type offers the same functionality as the previous labelSliderPage but using images for predefined values.

<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 :

<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 and tags and add the `title` and `scoreMax` attributes as in the following example:

<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>

scoreResultPage

documentPage

Displays a link to open a document in the Compositeur Digital.

<documentPage label="Your documents:" document="Documents A"/>

orderPage

Displays a lists of values to be ordered by the user.

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.