Example Quiz Topic
This example shows the underlying structure of a Paligo quiz topic called "Quiz - Creating Content in Paligo". It contains multiple choice questions with single correct answers, multiple choice questions with several correct answers, a trick multiple choice question, and a numerical question too.
By looking at the code, you can see the valid structure for the quiz and the various question types. If you have problems setting up your own quiz, referring to this example may help you spot any structural problems.
Note
We have removed the database IDs to make the code simpler, but in your topics the IDs will be included in the code, for example, xinfo:text="1169436".
The following source code shows the structure for a valid quiz.
<?xml version="1.0"?> <section xmlns="http://docbook.org/ns/docbook" xmlns:xinfo="http://ns.expertinfo.se/cms/xmlns/1.0" version="5.0" xinfo:resource="UUID-9921a762-7cd2-093a-3583-c1f8206fcf0d" xinfo:resource-id="1169399" xinfo:resource-type="component" xinfo:resource-title="Quiz - Creating Content in Paligo copy 1" xinfo:resource-titlelabel="" xinfo:version-major="1" xinfo:version-minor="0" role="quiz" xml:id="UUID-9921a762-7cd2-093a-3583-c1f8206fcf0d" xml:lang="en"> <title>Quiz - Creating Content in Paligo</title> <qandaset> <qandaentry> <question> <para>When you check out a topic in Paligo, can another Author edit that topic at the same time?</para> </question> <answer> <para>Yes, Paligo supports simultaneous editing by multiple authors.</para> </answer> <answer role="correct"> <para>No, the topic is locked for editing by others when it is checked out.</para> </answer> </qandaentry> <qandaentry> <question> <para>What is an informal topic?</para> </question> <answer> <para>A selection of content or images that must have a title</para> </answer> <answer role="correct"> <para>A selection of content or images that do not need a title</para> </answer> <answer> <para>A special type of admonition that the user can select to ignore</para> </answer> </qandaentry> <qandaentry> <question> <para>What is a fork?</para> </question> <answer> <para>A container where you organize your topics into a table of contents</para> </answer> <answer role="correct"> <para>A reference to a source topic, reused in a publication</para> </answer> <answer> <para>A building block for a section of content</para> </answer> </qandaentry> <qandaentry> <question> <para>What interface is shown when you open a publication?</para> </question> <answer> <para>The Editor View</para> </answer> <answer role="correct"> <para>The Structure View</para> </answer> </qandaentry> <qandaentry> <question> <para>To open a topic and work on it, which interface would you use?</para> </question> <answer role="correct"> <para>The Editor View</para> </answer> <answer> <para>The Structure View</para> </answer> </qandaentry> <qandaentry> <question role="multi-choice"> <para>What is a topic?</para> </question> <answer> <para>A container where you organize your topics into a table of contents</para> </answer> <answer> <para>A reference to a source topic, reused in a publication</para> </answer> <answer role="correct"> <para>A building block for a section of content</para> </answer> </qandaentry> <qandaentry> <question> <para>Which of the following statements are true?</para> <para>Topic-based authoring ...</para> </question> <answer> <para>... is similar to document writing and formatting in Microsoft Word</para> </answer> <answer role="correct"> <para>... encourages breaking down documents into smaller pieces of content</para> </answer> <answer role="correct"> <para>... makes it possible to reuse content as building blocks in multiple publications</para> </answer> <answer role="correct"> <para>... enables you to update content in one place, and the update applies wherever the content is used</para> </answer> <answer> <para>... does NOT encourage the reuse of content</para> </answer> </qandaentry> <qandaentry> <question> <para>What is the correct order (from largest to smallest, left to right) of the following Paligo structures?</para> </question> <answer> <para>Topic, Publication, Element, Section</para> </answer> <answer> <para>Section, Publication, Element, Topic</para> </answer> <answer role="correct"> <para>Publication, Topic, Section, Element</para> </answer> <answer> <para>Publication, Section, Topic, Element</para> </answer> </qandaentry> <qandaentry> <question> <para>How many floating content panels can you have open at once?</para> </question> <answer> <para>4</para> </answer> </qandaentry> </qandaset> </section>
Notice that:
-
The entire quiz is inside one
qandaset
element -
Each question is inside a
qandaentry
element -
Each question has a
question
element with apara
element for its text -
Each answer is in an
answer
element with apara
element for its text -
role="correct"
is added to the answer element for each correct answer. Paligo does this automatically when you give ananswer
element therole
attribute and set its value to correct. -
role="multi-choice"
is added to thequestion
element for a trick question. This tells Paligo to make this multiple choice question look like it has several correct answers (it presents the options as check boxes) but it actually only has one correct answer. Paligo applies this code when you give aquestion
element therole
attribute and set its value to multi-choice. -
The
answer
element for a numerical question contains the answer in thepara
element. Paligo detects that this is a numerical question/answer automatically. When you publish, the question will have a text box for the user to enter a number. They will not see the correct answer.