ZedAI XForms QTI Example 8

From zedwiki

Jump to: navigation, search

Example 8

Image:Example8.jpg

XForms

<html xmlns="http://www.w3.org/2002/06/xhtml2/" 
  xmlns:xforms="http://www.w3.org/2002/xforms" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:ev="http://www.w3.org/2001/xml-events" 
  xmlns:my="SYSTEM">
  <head>
    <title>XHTML2 + XForms Example 08</title>
    <xforms:model>
      <xforms:instance>
        <my:worksheet>
          <my:questions>
            <!--The question answer is pre-entered in the model.-->
            <my:q1>A</my:q1>
          </my:questions>
        </my:worksheet>
      </xforms:instance>
      <!--Since the correct answer is part of a teacher's edition, the model is set to read only-->
      <xforms:bind nodeset="//my:q1" readonly="true()"/>
      <xforms:submission action="page000.xml" method="put" ref="/my:worksheet" />
    </xforms:model>
  </head>
  <body>
    <h>Example 8</h>
    <ol>
      <li>
        <xforms:select1 ref="my:worksheet/my:questions/my:q1">
          <xforms:label>Which is a characteristic of a stable 
            environment?</xforms:label>
          <xforms:item>
            <xforms:label>A. It usually contains only one type of 
              producer.</xforms:label>
            <xforms:value>A</xforms:value>
          </xforms:item>
          <xforms:item>
            <xforms:label>B. It usually contains a great diversity of 
              species.</xforms:label>
            <xforms:value>B</xforms:value>
          </xforms:item>
          <xforms:item>
            <xforms:label>C. It contains simple food chains that have 
              more consumers than producers.</xforms:label>
            <xforms:value>C</xforms:value>
          </xforms:item>
          <xforms:item>
            <xforms:label>D. It contains complex food webs that have more 
              heterotrophs than autotrophs.</xforms:label>
            <xforms:value>D</xforms:value>
          </xforms:item>
        </xforms:select1>
      </li>
    </ol>
  </body>
</html>

QTI

<html xmlns="http://www.w3.org/2002/06/xhtml2/" 
  xmlns:qti="http://www.imsglobal.org/xsd/imsqti_v2p0" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:ev="http://www.w3.org/2001/xml-events" 
  xmlns:my="SYSTEM">
  <head>
    <title>XHTML2 + QTI Example 08</title>
  </head>
  <body>
    <h>Example 8</h>
    <ol>
      <li>
        <qti:assessmentItem identifier="choice" title="Question 8" adaptive="false"
          timeDependent="false">
          <qti:responseDeclaration identifier="q8" cardinality="single">
            <qti:correctResponse>
              <qti:value>A</qti:value>
            </qti:correctResponse>
          </qti:responseDeclaration>
          <qti:itemBody>
            <qti:choiceInteraction responseIdentifier="q8" shuffle="false"
              maxChoices="1">
              <qti:prompt>Which is a characteristic of a stable 
                environment?</qti:prompt>
              <qti:simpleChoice identifier="A">It usually contains only one 
                type of producer.</qti:simpleChoice>
              <qti:simpleChoice identifier="B">It usually contains a great 
                diversity of species.</qti:simpleChoice>
              <qti:simpleChoice identifier="C">It contains simple food chains 
                that have more consumers than producers.</qti:simpleChoice>
              <qti:simpleChoice identifier="D">It contains complex food webs 
                that have more heterotrophs than autotrophs.
                </qti:simpleChoice>
            </qti:choiceInteraction>
          </qti:itemBody>
        </qti:assessmentItem>
      </li>
    </ol>
  </body>
</html>
Personal tools