Talk:Moodle XML format: Difference between revisions
Clay Burell (talk | contribs) mNo edit summary |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 9: | Line 9: | ||
---- | ---- | ||
MoodleXMLBuilder link at "Useful Utilities" section goes to a 404 Not Found page, fyi.--[[User:Clay Burell|Clay Burell]] ([[User talk:Clay Burell|talk]]) 00:43, 10 January 2014 (WST) | MoodleXMLBuilder link at "Useful Utilities" section goes to a 404 Not Found page, fyi.--[[User:Clay Burell|Clay Burell]] ([[User talk:Clay Burell|talk]]) 00:43, 10 January 2014 (WST) | ||
Thanks - I have removed the broken link.(If you see any more, feel free to remove them yourself ) --[[User:Mary Cooch|Mary Cooch]] ([[User talk:Mary Cooch|talk]]) 16:30, 10 January 2014 (WST) | |||
-------------------- | |||
In the example for an essay-type question it has an <answer fraction="0"> tag. From what I can tell it looks like that tag isn't used at all within the format. | |||
If I write a random question like this, | |||
<code php> | |||
<question type="essay"> | |||
<name> | |||
<text>Treaty of Versailles</text> | |||
</name> | |||
<answer fraction="0"> | |||
<text><![CDATA[<p>Write a short essay about <b>the Treaty of Versailles</b> and how its shortcomings helped Hitler come to power.</p> | |||
<p></p> | |||
<p><u>Requirements:</u></p> | |||
<p>- 3 to 5 paragraphs</p> | |||
<p>- Addresses at least <b>3</b> failings of the treaty</p>]]></text> | |||
</answer> | |||
</question></code> | |||
It doesn't work (obviously - because the text of the question is in an answer section, but that's how I interpreted the essay example.) | |||
If I make the question in Moodle and export it, it comes out like this: | |||
<code php> | |||
<question type="essay"> | |||
<name> | |||
<text>Treaty of Versailles</text> | |||
</name> | |||
<questiontext format="html"> | |||
<text><![CDATA[<p>Write a short essay about <b>the Treaty of Versailles</b> and how its shortcomings helped Hitler come to power.</p> | |||
<p></p> | |||
<p><span style="text-decoration: underline;">Requirements:</span></p> | |||
<p>- 3 to 5 paragraphs</p> | |||
<p>- Addresses at least <b>3</b> failings of the treaty</p>]]></text> | |||
</questiontext> | |||
<generalfeedback format="html"> | |||
<text></text> | |||
</generalfeedback> | |||
<defaultgrade>1.0000000</defaultgrade> | |||
<penalty>0.0000000</penalty> | |||
<hidden>0</hidden> | |||
<responseformat>editor</responseformat> | |||
<responserequired>1</responserequired> | |||
<responsefieldlines>15</responsefieldlines> | |||
<attachments>0</attachments> | |||
<attachmentsrequired>0</attachmentsrequired> | |||
<graderinfo format="html"> | |||
<text></text> | |||
</graderinfo> | |||
<responsetemplate format="html"> | |||
<text></text> | |||
</responsetemplate> | |||
</question> | |||
</code> | |||
The <answer> tag isn't used at all - and the question text goes in a regular question text section. Wouldn't a barebones example look more like this (as opposed to what's currently on the Moodle XML page)? | |||
<code php> | |||
<question type="essay"> | |||
<questiontext format="html"> | |||
<text></text> | |||
</questiontext> | |||
</question> | |||
</code> | |||
--[[User:Gene Smith-James|Gene Smith-James]] ([[User talk:Gene Smith-James|talk]]) 20:23, 5 June 2019 (UTC) |
Latest revision as of 20:25, 5 June 2019
Would it be clearer to name this page "Moodle Question XML format", since it only describes the XML format for questions, not for glossaries, courses, or SCORM? (Ideally the other XML formats would have separate pages, although I don't see much documentation for those formats.)
--Clif Kussmaul (talk) 18:54, 17 July 2013 (WST)
- Well, in the Moodle user interface, the format is called Moodle XML format, and has been for years. So, renaming this page will reduce some forms of confusion, but increase others.--Tim Hunt (talk) 19:37, 17 July 2013 (WST)
MoodleXMLBuilder link at "Useful Utilities" section goes to a 404 Not Found page, fyi.--Clay Burell (talk) 00:43, 10 January 2014 (WST)
Thanks - I have removed the broken link.(If you see any more, feel free to remove them yourself ) --Mary Cooch (talk) 16:30, 10 January 2014 (WST)
In the example for an essay-type question it has an <answer fraction="0"> tag. From what I can tell it looks like that tag isn't used at all within the format.
If I write a random question like this,
<question type="essay">
<name>
<text>Treaty of Versailles</text>
</name>
<answer fraction="0">
<text><![CDATA[
Write a short essay about the Treaty of Versailles and how its shortcomings helped Hitler come to power.
Requirements:
- 3 to 5 paragraphs
- Addresses at least 3 failings of the treaty
]]></text>
</answer>
</question>
It doesn't work (obviously - because the text of the question is in an answer section, but that's how I interpreted the essay example.)
If I make the question in Moodle and export it, it comes out like this:
<question type="essay">
<name>
<text>Treaty of Versailles</text>
</name>
<questiontext format="html">
<text><![CDATA[
Write a short essay about the Treaty of Versailles and how its shortcomings helped Hitler come to power.
Requirements:
- 3 to 5 paragraphs
- Addresses at least 3 failings of the treaty
]]></text>
</questiontext>
<generalfeedback format="html">
<text></text>
</generalfeedback>
<defaultgrade>1.0000000</defaultgrade>
<penalty>0.0000000</penalty>
<hidden>0</hidden>
<responseformat>editor</responseformat>
<responserequired>1</responserequired>
<responsefieldlines>15</responsefieldlines>
<attachments>0</attachments>
<attachmentsrequired>0</attachmentsrequired>
<graderinfo format="html">
<text></text>
</graderinfo>
<responsetemplate format="html">
<text></text>
</responsetemplate>
</question>
The <answer> tag isn't used at all - and the question text goes in a regular question text section. Wouldn't a barebones example look more like this (as opposed to what's currently on the Moodle XML page)?
<question type="essay">
<questiontext format="html">
<text></text>
</questiontext>
</question>
--Gene Smith-James (talk) 20:23, 5 June 2019 (UTC)