From: pkiddie <pk...@us...> - 2005-08-10 03:36:20
|
Update of /cvsroot/stack/stack-1-0/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31794/schemas Added Files: Tag: development_xmlrqp stack_question-1.0.xsd stack_quiz-1.0.xsd Removed Files: Tag: development_xmlrqp stack_question_metadata-1.0.xsd stack_quiz_metadata-1.0.xsd Log Message: Changed file name of schemas Writing out quiz XML files --- stack_quiz_metadata-1.0.xsd DELETED --- --- NEW FILE: stack_quiz-1.0.xsd --- <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2" version="1.0"> <xs:import namespace="http://purl.org/dc/elements/1.1/" schemaLocation="dc.xsd" /> <xs:import namespace="http://www.imsglobal.org/xsd/imsmd_v1p2" schemaLocation="imsmd_v1p2.xsd" /> <xs:element name="dublincore" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element ref="dc:identifier" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>This is a globally unique identifer for the question.</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:title" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>The name of the question.</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:description" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>The description the question.</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:creator" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Shows who edited the question last.</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:publisher" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>The server URL responsible for making the question available. Internal variable</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:type" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Nature of genre of content of resource. Internal variable: most likely text for question</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:format" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Digital manifestation of resource. Internal variable: most likely stackQuestion/(version number)</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:language" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>language of content of resource. User defined, maybe default to users current Windows/Linux language setting</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:rights" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Rights management statement for the resource, or reference to a service providing such information</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:date" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>An automatic time stamp showing when the question was last edited.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="lom" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element ref="lom:keyword" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Keywords, for searching over banks of questions. Note that any question with the keyword 'demo' will appear as a demo question for guest users and students to try and edit.</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="lom:context" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Describes the educational context of the intended target audience of the resource. User defined list type</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="lom:difficulty" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>How difficult it is to work through the resource for the given target audience. Percieved difficulty, user defined list type</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="lom:typicallearningtime" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>An approximate time it takes to work with the resource. User defined, list type</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="stack" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="competency" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>Mathematical competancies a resource trains. User defined, list type</xs:documentation> </xs:annotation> </xs:element> <xs:element name="competencylevel" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>Mathematical skills a resource requires/trains. User defined, list type</xs:documentation> </xs:annotation> </xs:element> <xs:element name="excercisetype" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>Type of interactive elements used in the context of the excercise. User defined, list type</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="question" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="questionVarsRaw" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This field is a string which contains a list of assignments of the form <br /> <tt> key = value </tt><br /> where each <tt>key</tt> is the name of a variable local to the question, and <tt>value</tt> is an expression in Maxima's language. When a question is instantiated, this list is passed to the CAS, and evaluated in order. The value obtained for each <tt>key</tt> will be stored and used later, for example in the question marking routines. The keys need not be unique, although only the last value will be available for use later. <p><b>Maxima's assignments <tt>a:3</tt></b><br /> Computer algebra systems each use a different syntax to denote the assignment of a value to a variable. For example, Maple and Derive use <tt>:=</tt>. Mathematica uses <tt>=</tt> or <tt>:=</tt>, depending on when the assignment is to take place. Maxima uses the form <tt>key:value</tt>, which is unusual and not intuitive. Maxima reserves <tt>:=</tt> to denote <em>function</em> definition, eg <tt>f(x):=x^2</tt>. Hence, in STACK we add an abstraction layer to enforce a syntax where every expression must be of the form <tt> key = value </tt>.</p> <p>Examples are included in the authoring guide.</p> <p><b>Notes</b> <ul> <li>Items are separated by either a newline or ;</li> <li>If you type a string not in the form <tt> key = value</tt>, a variable name such as <tt>dumvar3</tt> will be assigned automatically to keep track of the command in the list of question variables.</li> <li>These raw values are internalized as a PHP array, in this case stored in <tt>questionVars</tt>. Hence, the field may change when you edit the question.</li> <li>If a student uses a variable which has been assigned a value, the value will be used instead during the marking procedure. Hence, if you ask the student for an expression such as <tt>x^2-n</tt> in a question, it would be better not to use <tt>n</tt> here in case a student literally types this expression. </ul></p></xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionVars" minOccurs="0" maxOccurs="1" type="keyval"> <xs:annotation> <xs:documentation>This field is an array which holds the actual parsed values of the text given in the field <tt>questionVarsRaw</tt>. Internally in PHP this is stored as a numbered array, each entry of which is of the form <tt>array('key' => $var_name, 'value' => $value)</tt>.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionStem" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This is the string, ie the question, which the student actually sees. This is of the nominal data type <tt>castext</tt>, so that it may depend on the <tt>questionVars</tt>. The student will of course see the instantiated versions.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionAns" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>Each question must have a non-empty answer, whether or not this is actually used by the various marking schemes. This answer must be a CAS specific string, ie. it is assumed to be of type <tt>casstring</tt>. If you want the answer to be a string, use quotes, for example <tt>"hello world"</tt></xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionAnsKey" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>If there are any <tt>questionPotResp</tt> in the question, which is to say a list of potential responses. This field will be used. When generating feedback to a question, based upon the student's answer, we have to refer to the student's answer using a variable name. This field allows such a local variable name to be set. All fields of the <tt>questionPotResp</tt> and the <tt>questionAnsVars</tt> may refer to this. The <tt>questionSol</tt>, that is the worked solution, may <em>not</em> refer to the student's answer. This field is required, and a default value is assigned to a blank question. This will only appear when potential responses are added.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionAnsVarsRaw" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This field is treated in exactly the same way as the <tt>questionVarsRaw</tt> field above. When a student has responded to a question, this list of variables will be processed. They may depend on <ol> <li> The <tt>questionVarsInst</tt>, that is to say the instantiated question variables.</li> <li> The <tt>questionAnsKey</tt>, so that feedback may be given in terms of the student's answer.</li> </ol></xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionAnsVars" minOccurs="0" maxOccurs="1" type="keyval"> <xs:annotation> <xs:documentation>See <tt>questionVars</tt>.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionSol" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This castext is only displayed when the student asks to see the worked solution to a question. Note: the Worked solution may not depend on the <tt>questionAnsVars</tt> field</xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionNote" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This allows a teacher to leave an intelligent "note to self" about which instances of variables a student has been given. The whole list of variables can be inspected, but some will only be intermediates. This is useful for giving the student a hint, or for analysis of incorrect answers.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:simpleType name="insertstars"> <xs:restriction base="xs:string"> <xs:enumeration value="TRUE" /> <xs:enumeration value="FALSE" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="informalsyntax"> <xs:restriction base="xs:string"> <xs:enumeration value="TRUE" /> <xs:enumeration value="FALSE" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="allowinputtool"> <xs:restriction base="xs:string"> <xs:enumeration value="Form box" /> <xs:enumeration value="Form box + JOME" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="display"> <xs:restriction base="xs:string"> <xs:enumeration value="String" /> <xs:enumeration value="LaTeX" /> <xs:enumeration value="MathML" /> <xs:enumeration value="LaTeX Source" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="language"> <xs:restriction base="xs:string"> <xs:enumeration value="en" /> <xs:enumeration value="es" /> <xs:enumeration value="nl" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="markmodmethod"> <xs:restriction base="xs:string"> <xs:enumeration value="Penalty" /> <xs:enumeration value="Last Answer" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="anstest"> <xs:restriction base="xs:string"> <xs:enumeration value="AlgEquiv" /> <xs:enumeration value="CASEqual" /> <xs:enumeration value="Num_tol_relative" /> <xs:enumeration value="Num_tol_absolute" /> <xs:enumeration value="String" /> <xs:enumeration value="StringSloppy" /> <xs:enumeration value="RegExp" /> <xs:enumeration value="FacForm" /> <xs:enumeration value="SA_factored" /> <xs:enumeration value="SA_expanded" /> <xs:enumeration value="PartFrac" /> <xs:enumeration value="Diff" /> <xs:enumeration value="Int" /> <xs:enumeration value="SA_True" /> <xs:enumeration value="True" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="showsol"> <xs:restriction base="xs:string"> <xs:enumeration value="Always" /> <xs:enumeration value="Never" /> <xs:enumeration value="On request" /> <xs:enumeration value="After correct answer" /> </xs:restriction> </xs:simpleType> <xs:element name="questionOptions" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="InsertStars" minOccurs="0" maxOccurs="1" type="insertstars"> <xs:annotation> <xs:documentation>If set to TRUE, the system will automatically insert *'s into a student's answer, (actually any casstring) when it is validated. So, for example <tt>2(1-4x)</tt> will be changed to <tt>2*(1-4*x)</tt>.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="InformalSyntax" minOccurs="0" maxOccurs="1" type="informalsyntax"> <xs:annotation> <xs:documentation>If set to TRUE, the system will automatically insert *'s into a student's answer, (actually any casstring) and it will not throw an error. Note however, that this is actually very hard to define robustly, since <tt> x(x+1) </tt> means apply the function <tt>x</tt> to the argument </tt>(x+1)</tt>, whereas <tt>sin(x)</tt> would be fine. How does one distinguish between the two? The system currently assumes a single letter is a variable, and otherwise this is a function to be applied. So <tt> tx(x-1) </tt> will not mean <tt> t*x*(x-1)</tt></xs:documentation> </xs:annotation> </xs:element> <xs:element name="AllowInputTool" minOccurs="0" maxOccurs="1" type="allowinputtool"> <xs:annotation> <xs:documentation>The default is just to have a form box for the student's entry. If set to 'Form box + JOME, the system will allow the use of the JOME mathematical input tool, to help student enter their answers. There are a variety of such tools, and others could easily be substituted, although it is likely an implementation needs only one. Furthermore, there will need to be javascript in the page, and so on. Hence, the file <tt>inputtool.inc</tt> and the function <tt>stack_question_inst_try_formfrag</tt> allow this to be integrated into the system. More than one input tool per implementation is not supported.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="SyntaxHint" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>A syntax hint allows the teacher to give the student a pro-forma in the input box. This can include '?' characters (which the CAS treats as the special variable <tt>qmchar</tt>). The syntax hint will appear in the answer box, whenever this is left blank by the student. For example, rather than having to type <pre>matrix([1,2],[3,4])</pre> the teacher may want to provide an answer box which already contains the string <pre>matrix([?,?],[?,?])</pre> instead. The student then need only to edit this, to replace ?'s with their values. This helps reduce syntax error problems with more difficult syntax issues. The ? may also be used to give partial credit. Of course it could also be used for general expressions such as <pre>x^2+?*x+1</pre> </xs:documentation> </xs:annotation> </xs:element> <xs:element name="Display" minOccurs="0" maxOccurs="1" type="display"> <xs:annotation> <xs:documentation>This determines how strings are displayed by the system. The <tt>String</tt> representation is exactly the CAS string. LaTeX uses the CAS's tex() function, and then passes the result through TTH. MathML is not implemented in all CAS systems. The "LaTeX Source" option generates LaTeX code, but does not process it. This can be cut and pasted into other LaTeX documents.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="Language" minOccurs="0" maxOccurs="1" type="language"> <xs:annotation> <xs:documentation>This determines the language used for STACK.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="QuVal" minOccurs="0" maxOccurs="1" type="xs:float"> <xs:annotation> <xs:documentation>This is the number of marks available for the question.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="MarkModMethod" minOccurs="0" maxOccurs="1" type="markmodmethod"> <xs:annotation> <xs:documentation>This allows the teacher to specify how different marks for repeated attempts at this question are treated. The mark modification method is a function which applies to the list of raw marks, and returns a mark for this attempt. There are two mark modification methods. <ul> <li><b>Penalty</b><br /> This is the default method, which has been tried for many years using the AiM system. For each incorrect attempt, which is valid and the student asks to be marked, a penalty is accumulated. The AttemptMark is the AccumulatedPenalty for that attempt, subtracted from the RawMark. The mark for this attempt is the maximum AttemptMark. Thus a mark cannot 'go down'. This prevents a student for being penalized for continuing to try to gain credit. </li> <li><b>Last Answer</b><br /> This is the RawMark for this attempt, and disregards all penalties and previous answers. Note, this is different from setting the penalty to be zero, and using the penalty scheme above. With this method if a student leaves an incorrect answer in place they will not be given credit for any previous correct attempt. </li> </ul></xs:documentation> </xs:annotation> </xs:element> <xs:element name="Penalty" minOccurs="0" maxOccurs="1" type="xs:float"> <xs:annotation> <xs:documentation>This is the penalty applied to each different incorrect attempt, which is valid, and which the student has asked to be marked. This is subtracted from the basic question value of 1, and so must lie within the range 0 to 1, to make any sense.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="Forbid" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This is a comma separated list of text strings which are forbidden in a student's answer. If one of these strings is present then the student's attempt will be considered invalid, and no penalties will be given. The Forbid option works in a slightly different way from other options. The "default" values are <em>added</em> to the options entered at the question level, not over-written. So to forbid <tt>diff</tt> for a whole quiz, just set it at the quiz level. And so on. To allow a word forbidden at a higher level, use Allow.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="Allow" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>See Forbid above.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="AnsTest" minOccurs="0" maxOccurs="1" type="anstest"> <xs:annotation> <xs:documentation>This determines which answer test will be applied to the pair consisting of the student's and teacher's answers. See the specific documentation.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="AnsTestOpt" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This allows an option to be passed to the <tt>AnswerTest</tt>. Not all <tt>AnswerTest</tt>'s require one. See the specific documentation. This option is considered to be a CASString, and so if non-empty must be a valid CASString.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="TeacherEmail" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This is the email address that appears on the page for students to email help</xs:documentation> </xs:annotation> </xs:element> <xs:element name="FeedBackGenericCorrect" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This is the string displayed to the student when their answer gets full marks, in addition to anything from the response processing tree or answer tests.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="FeedBackGenericIncorrect" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This is the string displayed to the student when their answer gets full marks, in addition to anything from the response processing tree or answer tests.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="FeedBackGenericPCorrect" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This is the string displayed to the student when their answer gets full marks, in addition to anything from the response processing tree or answer tests.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="ShowSol" minOccurs="0" maxOccurs="1" type="showsol"> <xs:annotation> <xs:documentation>This determines when any worked solution is available.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:simpleType name="anstest"> <xs:restriction base="xs:string"> <xs:enumeration value="AlgEquiv" /> <xs:enumeration value="CASEqual" /> <xs:enumeration value="Num_tol_relative" /> <xs:enumeration value="Num_tol_absolute" /> <xs:enumeration value="String" /> <xs:enumeration value="StringSloppy" /> <xs:enumeration value="RegExp" /> <xs:enumeration value="FacForm" /> <xs:enumeration value="SA_factored" /> <xs:enumeration value="SA_expanded" /> <xs:enumeration value="PartFrac" /> <xs:enumeration value="Diff" /> <xs:enumeration value="Int" /> <xs:enumeration value="SA_True" /> <xs:enumeration value="True" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="rawmarkmod"> <xs:restriction base="xs:string"> <xs:enumeration value="=" /> <xs:enumeration value="+" /> <xs:enumeration value="-" /> <xs:enumeration value="=AT" /> </xs:restriction> </xs:simpleType> <xs:element name="questionPotResp" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="SAns" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This is a CAS expression which we consider nominally to be the response of the student. The default value of this is the field <tt><font color="orange">questionAnsKey</font></tt>. The AnswerTest will be applied with this against the value in <tt><font color="orange">TAns</font></tt>.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="TAns" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This is a CAS expression which we consider nominally to be the response of the teacher. Of course, it could be the answer or a common mistake. The default value of this is the field <tt>questionAns</tt>. The AnswerTest will be applied with this against the value in <tt><font color="orange">SAns</font></tt>.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="AnsTest" minOccurs="0" maxOccurs="1" type="anstest"> <xs:annotation> <xs:documentation>The AnswerTest to be applied to this response.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="AnsTestOpt" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>The AnswerTest Options, for this AnswerTest.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="true" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="RawMarkMod" minOccurs="0" maxOccurs="1" type="rawmarkmod"> <xs:annotation> <xs:documentation>The way in which the <tt><font color="orange">RawMark</font></tt> for this branch of the potential response is used to affect the RawMark for the attempt as a whole. It must be one of the values, =, +, - or =AT. The latter assigns the mark to be that returned by the AnswerTest, in the case where partial credit is returned.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="RawMark" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>The mark applied for this attempt, should be between 0 and 1, although does not need to be.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="Penalty" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>The penalty applied for this attempt, if this branch is activated. The last such modified penalty is used. If nothing is set, then the normal penalty scheme for the question as a whole is used. This value should be either (i) between 0 and 1, (although does not need to be), or (ii) the string '' or 'default'. Basically this is a way to make sure a specific penalty is set, regardless of the mark. Useful for removing a penalty in the case of a common and silly slip.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="FeedBack" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This castext is only generated if this branch of the distracter is activated. The context in which this is evaluated is as follows: <ol> <li> <tt>questionVarsInst</tt> </li> <li> <tt>questionAnsInst</tt>, using the name given by <tt>questionAnsKey</tt> </li> <li> <tt>questionAnsVarsInst</tt> </li> </ol> This castext is then concatenated to form the FeedBack for this attempt.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="AnswerNote" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This string is added to the AnswerNote for the attempt at this question.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="ApLat" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This literally asks "Apply which later test?". It must be the number of an existing potential response. This will allow branching and the construction of tree like flow charts for the execution of feedback or partial credit. There are two provisos: <ul><li> No potential response is executed more than once. If this happens, the marking scheme bails out and takes no further action. This is to prevent loops.</li> <li> If the value of this field does not correspond to a legitimate Potential response, then the marking scheme bails out and takes no further action.</li></ul> This latter can be used to advantage by assigning the field a value of -1 to indicate the end of the process. <p> The default blank potential responses do not jump, but finish the process.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="false" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="RawMarkMod" minOccurs="0" maxOccurs="1" type="rawmarkmod"> <xs:annotation> <xs:documentation>The way in which the <tt><font color="orange">RawMark</font></tt> for this branch of the potential response is used to affect the RawMark for the attempt as a whole. It must be one of the values, =, +, - or =AT. The latter assigns the mark to be that returned by the AnswerTest, in the case where partial credit is returned.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="RawMark" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>The mark applied for this attempt, should be between 0 and 1, although does not need to be.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="Penalty" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>The penalty applied for this attempt, if this branch is activated. The last such modified penalty is used. If nothing is set, then the normal penalty scheme for the question as a whole is used. This value should be either (i) between 0 and 1, (although does not need to be), or (ii) the string '' or 'default'. Basically this is a way to make sure a specific penalty is set, regardless of the mark. Useful for removing a penalty in the case of a common and silly slip.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="FeedBack" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This castext is only generated if this branch of the distracter is activated. The context in which this is evaluated is as follows: <ol> <li> <tt>questionVarsInst</tt> </li> <li> <tt>questionAnsInst</tt>, using the name given by <tt>questionAnsKey</tt> </li> <li> <tt>questionAnsVarsInst</tt> </li> </ol> This castext is then concatenated to form the FeedBack for this attempt.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="AnswerNote" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This string is added to the AnswerNote for the attempt at this question.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="ApLat" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This literally asks "Apply which later test?". It must be the number of an existing potential response. This will allow branching and the construction of tree like flow charts for the execution of feedback or partial credit. There are two provisos: <ul><li> No potential response is executed more than once. If this happens, the marking scheme bails out and takes no further action. This is to prevent loops.</li> <li> If the value of this field does not correspond to a legitimate Potential response, then the marking scheme bails out and takes no further action.</li></ul> This latter can be used to advantage by assigning the field a value of -1 to indicate the end of the process. <p> The default blank potential responses do not jump, but finish the process.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="keyval"> <xs:sequence> <xs:element name="key" type="xs:string" /> <xs:element name="val" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:element name="assessmentItem"> <xs:complexType> <xs:all> <xs:element ref="dublincore" /> <xs:element ref="lom" /> <xs:element ref="stack" /> <xs:element ref="question" /> <xs:element ref="questionOptions" /> <xs:element ref="questionPotResp" /> </xs:all> </xs:complexType> </xs:element> <xs:element name="mathQuiz"> <xs:complexType> <xs:all> <xs:element ref="dublincore" /> <xs:element ref="lom" /> <xs:element ref="stack" /> <xs:element ref="assessmentItem" /> </xs:all> <xs:attribute name="version" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:pattern value="[1-9]+[0-9]*\.[0-9]+" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:schema> --- NEW FILE: stack_question-1.0.xsd --- <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2" version="1.0"> <xs:import namespace="http://purl.org/dc/elements/1.1/" schemaLocation="dc.xsd" /> <xs:import namespace="http://www.imsglobal.org/xsd/imsmd_v1p2" schemaLocation="imsmd_v1p2.xsd" /> <xs:element name="dublincore" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element ref="dc:identifier" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>This is a globally unique identifer for the question.</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:title" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>The name of the question.</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:description" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>The description the question.</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:creator" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Shows who edited the question last.</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:publisher" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>The server URL responsible for making the question available. Internal variable</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:type" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Nature of genre of content of resource. Internal variable: most likely text for question</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:format" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Digital manifestation of resource. Internal variable: most likely stackQuestion/(version number)</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:language" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>language of content of resource. User defined, maybe default to users current Windows/Linux language setting</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:rights" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Rights management statement for the resource, or reference to a service providing such information</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="dc:date" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>An automatic time stamp showing when the question was last edited.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="lom" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element ref="lom:keyword" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Keywords, for searching over banks of questions. Note that any question with the keyword 'demo' will appear as a demo question for guest users and students to try and edit.</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="lom:context" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>Describes the educational context of the intended target audience of the resource. User defined list type</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="lom:difficulty" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>How difficult it is to work through the resource for the given target audience. Percieved difficulty, user defined list type</xs:documentation> </xs:annotation> </xs:element> <xs:element ref="lom:typicallearningtime" minOccurs="0" maxOccurs="1"> <xs:annotation> <xs:documentation>An approximate time it takes to work with the resource. User defined, list type</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="stack" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="competency" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>Mathematical competancies a resource trains. User defined, list type</xs:documentation> </xs:annotation> </xs:element> <xs:element name="competencylevel" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>Mathematical skills a resource requires/trains. User defined, list type</xs:documentation> </xs:annotation> </xs:element> <xs:element name="excercisetype" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>Type of interactive elements used in the context of the excercise. User defined, list type</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="question" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="questionVarsRaw" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This field is a string which contains a list of assignments of the form <br /> <tt> key = value </tt><br /> where each <tt>key</tt> is the name of a variable local to the question, and <tt>value</tt> is an expression in Maxima's language. When a question is instantiated, this list is passed to the CAS, and evaluated in order. The value obtained for each <tt>key</tt> will be stored and used later, for example in the question marking routines. The keys need not be unique, although only the last value will be available for use later. <p><b>Maxima's assignments <tt>a:3</tt></b><br /> Computer algebra systems each use a different syntax to denote the assignment of a value to a variable. For example, Maple and Derive use <tt>:=</tt>. Mathematica uses <tt>=</tt> or <tt>:=</tt>, depending on when the assignment is to take place. Maxima uses the form <tt>key:value</tt>, which is unusual and not intuitive. Maxima reserves <tt>:=</tt> to denote <em>function</em> definition, eg <tt>f(x):=x^2</tt>. Hence, in STACK we add an abstraction layer to enforce a syntax where every expression must be of the form <tt> key = value </tt>.</p> <p>Examples are included in the authoring guide.</p> <p><b>Notes</b> <ul> <li>Items are separated by either a newline or ;</li> <li>If you type a string not in the form <tt> key = value</tt>, a variable name such as <tt>dumvar3</tt> will be assigned automatically to keep track of the command in the list of question variables.</li> <li>These raw values are internalized as a PHP array, in this case stored in <tt>questionVars</tt>. Hence, the field may change when you edit the question.</li> <li>If a student uses a variable which has been assigned a value, the value will be used instead during the marking procedure. Hence, if you ask the student for an expression such as <tt>x^2-n</tt> in a question, it would be better not to use <tt>n</tt> here in case a student literally types this expression. </ul></p></xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionVars" minOccurs="0" maxOccurs="1" type="keyval"> <xs:annotation> <xs:documentation>This field is an array which holds the actual parsed values of the text given in the field <tt>questionVarsRaw</tt>. Internally in PHP this is stored as a numbered array, each entry of which is of the form <tt>array('key' => $var_name, 'value' => $value)</tt>.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionStem" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This is the string, ie the question, which the student actually sees. This is of the nominal data type <tt>castext</tt>, so that it may depend on the <tt>questionVars</tt>. The student will of course see the instantiated versions.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionAns" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>Each question must have a non-empty answer, whether or not this is actually used by the various marking schemes. This answer must be a CAS specific string, ie. it is assumed to be of type <tt>casstring</tt>. If you want the answer to be a string, use quotes, for example <tt>"hello world"</tt></xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionAnsKey" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>If there are any <tt>questionPotResp</tt> in the question, which is to say a list of potential responses. This field will be used. When generating feedback to a question, based upon the student's answer, we have to refer to the student's answer using a variable name. This field allows such a local variable name to be set. All fields of the <tt>questionPotResp</tt> and the <tt>questionAnsVars</tt> may refer to this. The <tt>questionSol</tt>, that is the worked solution, may <em>not</em> refer to the student's answer. This field is required, and a default value is assigned to a blank question. This will only appear when potential responses are added.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionAnsVarsRaw" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This field is treated in exactly the same way as the <tt>questionVarsRaw</tt> field above. When a student has responded to a question, this list of variables will be processed. They may depend on <ol> <li> The <tt>questionVarsInst</tt>, that is to say the instantiated question variables.</li> <li> The <tt>questionAnsKey</tt>, so that feedback may be given in terms of the student's answer.</li> </ol></xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionAnsVars" minOccurs="0" maxOccurs="1" type="keyval"> <xs:annotation> <xs:documentation>See <tt>questionVars</tt>.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionSol" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This castext is only displayed when the student asks to see the worked solution to a question. Note: the Worked solution may not depend on the <tt>questionAnsVars</tt> field</xs:documentation> </xs:annotation> </xs:element> <xs:element name="questionNote" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>This allows a teacher to leave an intelligent "note to self" about which instances of variables a student has been given. The whole list of variables can be inspected, but some will only be intermediates. This is useful for giving the student a hint, or for analysis of incorrect answers.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:simpleType name="insertstars"> <xs:restriction base="xs:string"> <xs:enumeration value="TRUE" /> <xs:enumeration value="FALSE" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="informalsyntax"> <xs:restriction base="xs:string"> <xs:enumeration value="TRUE" /> <xs:enumeration value="FALSE" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="allowinputtool"> <xs:restriction base="xs:string"> <xs:enumeration value="Form box" /> <xs:enumeration value="Form box + JOME" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="display"> <xs:restriction base="xs:string"> <xs:enumeration value="String" /> <xs:enumeration value="LaTeX" /> <xs:enumeration value="MathML" /> <xs:enumeration value="LaTeX Source" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="language"> <xs:restriction base="xs:string"> <xs:enumeration value="en" /> <xs:enumeration value="es" /> <xs:enumeration value="nl" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="markmodmethod"> <xs:restriction base="xs:string"> <xs:enumeration value="Penalty" /> <xs:enumeration value="Last Answer" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="anstest"> <xs:restriction base="xs:string"> <xs:enumeration value="AlgEquiv" /> <xs:enumeration value="CASEqual" /> <xs:enumeration value="Num_tol_relative" /> <xs:enumeration value="Num_tol_absolute" /> <xs:enumeration value="String" /> <xs:enumeration value="StringSloppy" /> <xs:enumeration value="RegExp" /> <xs:enumeration value="FacForm" /> <xs:enumeration value="SA_factored" /> <xs:enumeration value="SA_expanded" /> <xs:enumeration value="PartFrac" /> <xs:enumeration value="Diff" /> <xs:enumeration value="Int" /> <xs:enumeration value="SA_True" /> <xs:enumeration value="True" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="showsol"> <xs:restriction base="xs:string"> <xs:enumeration value="Always" /> <xs:enumeration value="Never" /> <xs:enumeration value="On request" /> <xs:enumeration value="After correct answer" /> </xs:restriction> </xs:simpleType> <xs:element name="questionOptions" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="InsertStars" minOccurs="0" maxOccurs="1" type="insertstars"> <xs:annotation> <xs:documentation>If set to TRUE, the system will automatically insert *'s into a student's answer, (actually any casstring) when it is validated. So, for example <tt>2(1-4x)</tt> will be changed to <tt>2*(1-4*x)</tt>.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="InformalSyntax" minOccurs="0" maxOccurs="1" type="informalsyntax"> <xs:annotation> <xs:documentation>If set to TRUE, the system will automatically insert *'s into a student's answer, (actually any casstring) and it will not throw an error. Note however, that this is actually very hard to define robustly, since <tt> x(x+1) </tt> means apply the function <tt>x</tt> to the argument </tt>(x+1)</tt>, whereas <tt>sin(x)</tt> would be fine. How does one distinguish between the two? The system currently assumes a single letter is a variable, and otherwise this is a function to be applied. So <tt> tx(x-1) </tt> will not mean <tt> t*x*(x-1)</tt></xs:documentation> </xs:annotation> </xs:element> <xs:element name="AllowInputTool" minOccurs="0" maxOccurs="1" type="allowinputtool"> <xs:annotation> <xs:documentation>The default is just to have a form box for the student's entry. If set to 'Form box + JOME, the system will allow the use of the JOME mathematical input tool, to help student enter their answers. There are a variety of such tools, and others could easily be substituted, although it is likely an implementation needs only one. Furthermore, there will need to be javascript in the page, and so on. Hence, the file <tt>inputtool.inc</tt> and the function <tt>stack_question_inst_try_formfrag</tt> allow this to be integrated into the system. More than one input tool per implementation is not supported.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="SyntaxHint" minOccurs="0" maxOccurs="1" type="xs:string"> <xs:annotation> <xs:documentation>A syntax hint allows the teacher to give the student a pro-forma in the input box. This ... [truncated message content] |