I want to create a moodle glossary XML file from another dictionary format. Probably I will do it using XSLT. I have already taken a look at an example glossary, but unfortunately and most of it is self-explanatory. But there are some elements I don't really know the meaning of.
I was not yet able to find a DTD or Schema file. Does something like that exist? Where do I get it? Or is there at least a description of the different elements?
Thanks in advance for any help!
I've attached a schema for moodle glossary. Use at own risk!
All the best,
That's great! Thanks a lot!
Do you know if there is also a description of the fields? I guess, a value "1" means "true" and "0" means "false". But I'm not entirely sure what the implications of the elements "defaultapproval", "casesensitive" and "fullmatch" are. And is the "alias" the place to save synonyms?
Also, I need to know if the "category" has a connection with the courses the glossary is used in or if it is just an additional information for the user.
I think that's about it. Can you give me a hint where to look for answers?
Glad to know you liked the schema. To know exactly what all these elements stand for, I would suggest the following. Create your own glossary, make a note of all the various choices you make for the parameters. Then create one or two categories, create half a dozen entries, trying each time to change the parameters offered. Finally, export your glossary and look at the generated XML file. You can easily deduct from your choice of parameters the value that is required for each field. Also, the schema I posted will help you understand what kind of value is required (numerical, text) and whether the fields are required or optional, etc. But you really have to familiarize yourself with the workings of the Moodle glossary first of all.
|Students can add entries:||<xsd:element name="STUDENTCANPOST" type="xsd:int" />
|Duplicated entries allowed:||<xsd:element name="ALLOWDUPLICATEDENTRIES" type="xsd:int" />
|for each entry
||<xsd:element maxOccurs="unbounded" name="ENTRY">
|Concept:||<xsd:element name="CONCEPT" type="xsd:string" />
|Definition:||<xsd:element name="DEFINITION" type="xsd:string" />
|This entry should be automatically linked (tick box = 1; not ticked = 0)
||<xsd:element name="USEDYNALINK" type="xsd:int" />
Thanks again for your help. Although I must admit, I was hoping to hear that there's a description of the different fields somewhere. But of course I will be able to try out the possibilities your way.
So you created the schema yourself? Are you one of the people behind moodle? I'm relatively new to the system and only using the forum part of an installation for a university project.