Moodle QUESTION_CATEGORIES Element Example

    <!-- QUESTION_CATEGORIES defines a "question pool" for this course. So far, haven't seen a multi-category
         extract, but haven't tried very hard yet. 

         Gotcha: 1.5.3+ archives contain numeric values in /MOODLE_BACKUP/COURSE/QUESTION_CATEGORIES/QUESTION_CATEGORY/QUESTION/QTYPE,
         whereas the 1.6.1 example we've seen contains human-readable names. For example:
           - 1 == [shortanswer] (haven't seen a 1.6.1 example to be sure of mapping)
           - 2 == [truefalse] (haven't seen a 1.6.1 example to be sure of mapping)
           - 3 == multichoice

         QUESTIONS defined here are organized into assessments by 'quiz' modules (/MOODLE_BACKUP/COURSE/MODULES/MOD[MODTYPE = 'quiz'])
   -->
    <QUESTION_CATEGORIES>
      <QUESTION_CATEGORY>

        <!-- First, some category attributes -->
        <ID>68</ID>  <!-- A key for the category -->
        <NAME>Default</NAME> <!-- We also see more cryptic values, e.g. "AIMS HS Math ADE 12.04" -->
        <INFO>The default category for questions.</INFO> <!-- We also see more cryptic values, e.g. "AIMS HS Math ADE 12.04". Haven't seen markup, yet. -->
        <PUBLISH>0</PUBLISH>  <!-- Semantics unclear. -->
        <STAMP>asset2.asu.iassessment.org+070913031840+YSCPcq</STAMP>  <!-- semantics unclear -->
        <PARENT>0</PARENT>  <!-- Presumably the ID of a containing category. Presumably 0 is a special value -->
        <SORTORDER>999</SORTORDER> <!-- Presumably for sorting categories. Also see '0' in single-category extracts -->

        <!-- A multiple-choice question -->
        <QUESTION>
          <ID>207</ID>
          <PARENT>0</PARENT> <!-- Presumably for question nesting. Presumably 0 is a special value. So far, have not seen nested questions. -->
          <NAME>1: HS Math 1.2.2</NAME>
          <QUESTIONTEXT>The Math Club purchased 150 calendars for $2.00 each. If the club sells the calendars for 
$5.00 each, what will be the total profit if all the calendars are sold?</QUESTIONTEXT>
          <QUESTIONTEXTFORMAT>0</QUESTIONTEXTFORMAT>  <!-- Semantics unclear. -->
          <IMAGE></IMAGE>  <!-- See next QUESTION example for usage -->
          <DEFAULTGRADE>1</DEFAULTGRADE>  <!-- Semantics unclear -->
          <PENALTY>0.1</PENALTY>  <!-- Semantics unclear -->
          <QTYPE>multichoice</QTYPE> <!-- Question type, obviously. Contents vary between Moodle versions. See QUESTION_CATEGORIES comments above. -->
          <LENGTH>1</LENGTH>  <!-- Semantics unclear -->
          <STAMP>secure.pvusd.k12.az.us+050102162730+05v2pV</STAMP>  <!-- Semantics unclear -->
          <VERSION>3</VERSION>  <!-- The version of the question, presumably -->
          <HIDDEN>0</HIDDEN>  <!-- Semantics unclear -->
          <MULTICHOICE>  <!-- Question type-specific configuration -->
            <LAYOUT>0</LAYOUT>  <!-- Semantics unclear -->
            <ANSWERS>785,786,787,788</ANSWERS>  <!-- Seem to reference ../../ANSWERS/ANSWER/ID. Presumably a subset thereof. -->
            <SINGLE>1</SINGLE>  <!-- Semantics unclear. Single answer, perhaps? -->
            <SHUFFLEANSWERS>1</SHUFFLEANSWERS>  <!-- Randomize answers on delivery? -->
          </MULTICHOICE>
          <ANSWERS>  <!-- Presumably there can be more answers than have been selected for delivery by ../MULTICHOICE/ANSWERS -->
            <ANSWER>
              <ID>785</ID>  <!-- A key for this answer -->
              <ANSWER_TEXT>$750.00</ANSWER_TEXT>  <!-- Haven't seen markup -->
              <FRACTION>0</FRACTION>  <!-- Semantics unclear. So far, have seen 1 and 0 -->
              <FEEDBACK></FEEDBACK>  <!-- Haven't seen examples, yet -->
            </ANSWER>
            <ANSWER>
              <ID>786</ID>
              <ANSWER_TEXT>$450.00</ANSWER_TEXT>
              <FRACTION>1</FRACTION>
              <FEEDBACK></FEEDBACK>
            </ANSWER>
            <ANSWER>
              <ID>787</ID>
              <ANSWER_TEXT>$300.00</ANSWER_TEXT>
              <FRACTION>0</FRACTION>
              <FEEDBACK></FEEDBACK>
            </ANSWER>
            <ANSWER>
              <ID>788</ID>
              <ANSWER_TEXT>$3.00</ANSWER_TEXT>
              <FRACTION>0</FRACTION>
              <FEEDBACK></FEEDBACK>
            </ANSWER>
          </ANSWERS>
        </QUESTION>

        <!-- Multiple-choice question where the question is expressed as an image rather than a string -->
        <QUESTION>
          <ID>234</ID>
          <PARENT>0</PARENT>
          <NAME>28: HS Math 3.4.2</NAME>
          <QUESTIONTEXT></QUESTIONTEXT> <!-- Image referenced below contains the question text -->
          <QUESTIONTEXTFORMAT>0</QUESTIONTEXTFORMAT> <!-- has the same format (0) as the textual example -->
          <IMAGE>HS_Math_Example_1/1_HS_Math_28.gif</IMAGE> <!-- Note that this is _not_ defined by a "module" entry, although
                                                                 modules may reference other files in the same directory.
                                                                 In-archive path: /course_files/HS_Math_Example_1/1_HS_Math_28.gif -->
          
          <!-- following elements effectively identical to previous example until ANSWERS -->
          <DEFAULTGRADE>1</DEFAULTGRADE>
          <PENALTY>0.1</PENALTY>
          <QTYPE>multichoice</QTYPE> <!-- Question type, obviously. Contents vary between Moodle versions. See QUESTION_CATEGORIES comments above. -->
          <LENGTH>1</LENGTH>
          <STAMP>secure.pvusd.k12.az.us+050102181455+2OzzCX</STAMP>
          <VERSION>1</VERSION>
          <HIDDEN>0</HIDDEN>
          <MULTICHOICE>
            <LAYOUT>0</LAYOUT>
            <ANSWERS>893,894,895,896</ANSWERS>  <!-- references to ../../ANSWERS/ANSWER/ID -->
            <SINGLE>1</SINGLE>
            <SHUFFLEANSWERS>1</SHUFFLEANSWERS>
          </MULTICHOICE>
  
          <!-- None of these answers have text! The .gif referenced above contains both the question and answer(s) text.-->
          <ANSWERS>
            <ANSWER>
              <ID>893</ID>
              <ANSWER_TEXT></ANSWER_TEXT>
              <FRACTION>0</FRACTION>
              <FEEDBACK></FEEDBACK>
            </ANSWER>
            <ANSWER>
              <ID>894</ID>
              <ANSWER_TEXT></ANSWER_TEXT>
              <FRACTION>0</FRACTION>
              <FEEDBACK></FEEDBACK>
            </ANSWER>
            <ANSWER>
              <ID>895</ID>
              <ANSWER_TEXT></ANSWER_TEXT>
              <FRACTION>1</FRACTION>
              <FEEDBACK></FEEDBACK>
            </ANSWER>
            <ANSWER>
              <ID>896</ID>
              <ANSWER_TEXT></ANSWER_TEXT>
              <FRACTION>0</FRACTION>
              <FEEDBACK></FEEDBACK>
            </ANSWER>
          </ANSWERS>
        </QUESTION>

        <!-- Short answer question -->
        <QUESTION>
          <ID>308</ID>
          <PARENT>0</PARENT>
          <NAME>Optional Question 1</NAME>
          <QUESTIONTEXT>&lt;span style=&quot;font-size: 12pt;&quot;&gt;I would like the
designer of this session to consider more:&lt;/span&gt;</QUESTIONTEXT>  <!-- note the use of markup -->
          <QUESTIONTEXTFORMAT>1</QUESTIONTEXTFORMAT> <!-- Was '0' in multi-choice examples. Still unsure of actual meaning -->
          <IMAGE></IMAGE>
          <DEFAULTGRADE>1</DEFAULTGRADE>
          <PENALTY>0.1</PENALTY>
          <QTYPE>1</QTYPE> <!-- This is a 1.5.3+ example. 1.6.1 examples have names rather than numbers. 
                                See QUESTION_CATEGORIES comments above. -->
          <LENGTH>1</LENGTH>
          <STAMP>asset2.asu.iassessment.org+070913033720+oyS2dQ</STAMP>
          <VERSION>2</VERSION>
          <HIDDEN>0</HIDDEN>
          <SHORTANSWER>
            <ANSWERS>1067</ANSWERS> <!-- reference to ../../ANSWERS/ANSWER/ID -->
            <USECASE>0</USECASE> <!-- ??? -->
          </SHORTANSWER>
          <ANSWERS>
            <ANSWER>
              <ID>1067</ID>
              <ANSWER_TEXT>Optional Comments</ANSWER_TEXT>
              <FRACTION>0</FRACTION>
              <FEEDBACK></FEEDBACK>
            </ANSWER>
          </ANSWERS>
        </QUESTION>

        <!-- true/false question -->
        <QUESTION>
          <ID>168</ID>
          <PARENT>0</PARENT>
          <NAME>tropopause</NAME>
          <QUESTIONTEXT>The tropopause is highest at the north and south poles.</QUESTIONTEXT>
          <QUESTIONTEXTFORMAT>0</QUESTIONTEXTFORMAT>
          <IMAGE></IMAGE>
          <DEFAULTGRADE>1</DEFAULTGRADE>
          <PENALTY>0.1</PENALTY>
          <QTYPE>2</QTYPE> <!-- This is a 1.5.3+ example. 1.6.1 examples have names rather than numbers. 
                                See QUESTION_CATEGORIES comments above. -->
          <LENGTH>1</LENGTH>
          <STAMP>asset2.asu.iassessment.org+070306212746+xz0h0P</STAMP>
          <VERSION>1</VERSION>
          <HIDDEN>1</HIDDEN> <!-- We only see 1's and 0's. Presumably to be treated as boolean -->
          <TRUEFALSE>
            <TRUEANSWER>268</TRUEANSWER>  <!-- As with type-specific data, is reference to ../../ANSWERS/ANSWER/ID -->
            <FALSEANSWER>269</FALSEANSWER> <!-- As with type-specific data, is reference to ../../ANSWERS/ANSWER/ID -->
          </TRUEFALSE>
          <ANSWERS>
            <ANSWER>
              <ID>268</ID>
              <ANSWER_TEXT>True</ANSWER_TEXT>
              <FRACTION>0</FRACTION>
              <FEEDBACK></FEEDBACK>
            </ANSWER>
            <ANSWER>
              <ID>269</ID>
              <ANSWER_TEXT>False</ANSWER_TEXT>
              <FRACTION>1</FRACTION> <!-- Still don't understand the purpose of this field -->
              <FEEDBACK></FEEDBACK>
            </ANSWER>
          </ANSWERS>
        </QUESTION>

        <!-- Need more examples of question types -->

      </QUESTION_CATEGORY>
    </QUESTION_CATEGORIES>