glossary import: XML structure?

glossary import: XML structure?

by NN NN -
Number of replies: 7
Hi,

Can someone pls enlighten me as to what the structure of the xml file should look like? I've been searching all over but could find nothing about what the XML structure should look like.


Average of ratings: -
In reply to NN NN

Re: glossary import: XML structure?

by David Fountain -
Hi Julian
You could do what I did when I created an Excel spreadsheet to create the XML file;
  1. Create a glossary
  2. Export it
  3. Have a look.
Or take a peak at the spreadsheet, it's a simple VBA and should point you in the right direction.

Dave
Average of ratings: Useful (1)
In reply to David Fountain

Re: glossary import: XML structure?

by NN NN -
Doh!

Sometimes I can be such a dork, lol

Thanks, David.
In reply to David Fountain

Re: glossary import: XML structure?

by trish sutherland -
thanks for posting that David, It really helped me import a glossary.

I have a further question. The glossary i want to import has concept, definition, and then an example, which we'd decided would be put in the 'keywords' section. Can i import the keywords along with the concept and definition or do i have to add them in manually - the spreadsheet you posted had nothing for keywords, don't know if i'm missing something!

In reply to trish sutherland

Re: glossary import: XML structure?

by trish sutherland -
doh! the power of posting!!! I've figured it out now - the keyword is the alias.

thanks for the spreadsheet thing, it's a real help
In reply to trish sutherland

Re: glossary import: XML structure?

by David Fountain -

Yes lol big grin 

Often been the case with my postings...my record is 2 minutes after posting!

In reply to David Fountain

Re: glossary import: XML structure?

by jeff ciaccio -

Sorry - I guess I'm a little slower than most.  Can you please help me understand the xml macro?  I see the headings, but what goes in each of these?

  • Definition
  • Format
  • Usedynalink
  • Casesensitive
  • fullmatch
  • Category

 I have a spreadsheet with question (string), answer (float), and I would like to set the tolerace to 0.005. 

Don't I need to know the headings Moodle is expecting? 

Can this be used to generate calculated questions, shared/private datasets, etc?

For example, it I wanted to create 50 questions like the following, what would I need to do?

Question: If you travel {dist} m in {time} s, what is your average speed in m/s?
category = "simple speed calculations".
{dist}: 20.0 to 200.0, 1 decimal, private dataset, 50 new values
{time}: 20.0to 200.0, 1 decimal, public dataset, 50 shared values 
answer: {dist}/{time}
tolerance: 0.005
answer shows: 3 significant figures

In reply to jeff ciaccio

Re: glossary import: XML structure?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Jeff,
You posted your question to the wrong forum.sad Please re-post to the Quiz module forum, where you have just posted your other questions related to Quiz and Questions.
Joseph