<< Chapter < Page Chapter >> Page >

Example

<problemset id="homework1"><item . . .></item></problemset>

Item

The next tag is the item tag, which contains the question, response options, and so forth. Each item tag must contain anid attribute and a type attribute. Ideally, the id attribute should be unique; no two items you write should have the sameattribute. How you do this is up to you.

The type attribute determines the type of question you are asking. It must be one of the following:

  • single-response
  • multiple-response
  • ordered-response
  • text-response

Finally, it is important to note that an item must contain one question tag. It may also contain zero or more answer tags, andzero or one key tags. However, the existence or non-existence, as well as the contents of these last two tags, may be slightlydifferent depending on the type of question. Items may also contain one or more resource tags and hint tags, and one generalfeedback tag.

Single-response

Single-response items are items for which there is one and only one correct answer to be selected from the providedanswers. Examples are multiple-choice (select only one) and Likert scale items.

Multiple-response

Multiple-response items are items which require more than one selected response option for a correct answer. Examples aremultiple-choice items where the user must select two or more responses to each item.

Ordered-response

Ordered-response items are multiple-response items for which the order of the selected response is important. An exampleis an item that asks the user to select the instructions for performing a procedure in their proper order.

Text-response

Text-response items are items which require a textual or numeric response. Examples are short-answer questions andsupply-the-answer math questions.

Example

An example for a single-response question:<item id="item1" type="single-response"><question>Are bananas a fruit or a vegetable?</question><resource uri="http://bananas.com/bananas.csv" /><answer id="fruit">. .</answer><answer id="vegetable">. .</answer><hint>Bananas grow on trees.</hint><feedback>Bananas are a fruit.</feedback><key answer="fruit" /></item>

Question

The question tag contains the question you are asking of the user. It can be written in plain text, or using markup fromanother language (such as HTML, which allows you to include pictures and graphs as well as text). Be aware that thestylesheets for the Connexions project currently only allow plain text and CNXML (with and without MathML) within questiontags. If you use CNXML (with or without MathML) within a QML tag, the first tag must be a section tag, which may contain anyof the tags a CNXML section tag is allowed to contain.

Example

<question>Are bananas a fruit or a vegetable?</question>

Resource

The resource tag allows you to provide a URI attribute (file location, web address, etc. ) for a particular item. For example, if you had the necessary software, you coulduse the resource tag to attach a reference to a dataset and generate question and answer values from that dataset. At thepresent time, Connexions has no software to do this, and the resource tag is ignored by our stylesheets.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Cnxml tutorial. OpenStax CNX. Jul 08, 2009 Download for free at http://cnx.org/content/col10121/1.10
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Cnxml tutorial' conversation and receive update notifications?

Ask