Save category description in Moodle XML import/export: Difference between revisions
From MoodleDocs
No edit summary |
|||
Line 1: | Line 1: | ||
== What is not saved? == | == What is not saved? == | ||
Some things are not saved | Some things are not saved at this format of import/expor: | ||
1. description of the exported category, | 1. description of the exported category, | ||
2. description of parent category | 2. description of parent category, | ||
== Current XML structure == | == Current XML structure == | ||
<code xml> | |||
< | |||
<question type="category"> | <question type="category"> | ||
<category> | |||
<text>{<Assignment>}/{<Category>}[/<Subcategory>]...</text> | |||
</category> | |||
</question> | </question> | ||
</ | </code> | ||
Assignment can have one of two values: | |||
#$course$ - сategory refers to the course, | |||
#$system$ - Category refers to the system. | |||
Category and Subcategory - name of category and subcategory. | |||
== Proposed XML structure == | == Proposed XML structure == | ||
<question type="category"> | <question type="category"> | ||
<name> | |||
<text>{<Category>}</text> | |||
</name> | |||
<description> | |||
<text>{<Description>}</text> | |||
</description> | |||
<parent type={<"category">|<"assignment">}> | |||
<name> | |||
<text>{<Category>|<Assignment>}</text> | |||
</name> | |||
</parent> | |||
</question> | </question> | ||
== Old export compatibility problem == | == Old export compatibility problem == | ||
Revision as of 14:58, 11 November 2014
What is not saved?
Some things are not saved at this format of import/expor:
1. description of the exported category,
2. description of parent category,
Current XML structure
<question type="category">
<category>
<text>{<Assignment>}/{<Category>}[/<Subcategory>]...</text>
</category>
</question>
Assignment can have one of two values:
- $course$ - сategory refers to the course,
- $system$ - Category refers to the system.
Category and Subcategory - name of category and subcategory.
Proposed XML structure
<question type="category"> <name> <text>{<Category>}</text> </name> <description> <text>{<Description>}</text> </description> <parent type={<"category">|<"assignment">}> <name> <text>{<Category>|<Assignment>}</text> </name> </parent> </question>