I am wondering if there is an automated way to import information into moodle. I have a Glossary of about 750 terms in an excel document that I would like to input. Is there an automated way to insert these terms, (possibily a way for moodle to recognize the first column as the term and the second column as the definition). Any advice would be greatly appreciated.
You can import glossary terms into a Moodle glossary via XML file. If you create a glossary in Moodle and add a few entries, then try exporting them, an XML file will be created, which you can use to figure out the format of your XML file. Please see Import glossary entries for more details, and the Import and export FAQ for other ways of importing data into Moodle.
I have a XML file of some entries that I imputed manual, but I am unsure as to what to do now. Would I have to code all of the glossary entries into XML format, because if so it would probably take me longer than imputing them manually.
OR
Is there a way to import it automatically using XML.
Thank you Helen. You just saved me a bunch of work!!
Philip maybe this will work for you…..
I just set up and started using Moodle. I had 453 terms that need to be made into a glossary for my Biology students. I had the terms in an excel workbook. I am not a programmer. I don’t know XML, but using Helen’s suggestion I was able to do the import. Here’s how….
First, I exported a Moodle glossary with a few of the term as suggested.
Then I downloaded a free XML writer called XMLwriter2 (http://xmlwriter.net/ I couldn’t tell you anything about this program except it was free and cleared my virus software). I used this because attempts to import files which were saved as xml did not work.
Then I opened the Excel workbook file and deleted everything that was not a term or definition. This left one column with the term and another column with the definition.
I then opened up the exported Moodle glossary file using the XML writer to see how the terms and definitions were formatted.
Next, on the Excel worksheet I inserted column before the terms, and a column after the term. I then went back to the XML writer copied what was before the terms into column A in the spreadsheet (<ENTRY><CONCEPT>).
Now back to the XML writer and copied what was between the term and definition and pasted this into column C of the spreadsheet. (</CONCEPT><DEFINITION><p><font face="arial,helvetica,sans-serif">). Note: Column B has the term.
Finally I copied from XML writer what was after the definition into column E. (<FORMAT>1</FORMAT><USEDYNALINK>0</USEDYNALINK><CASESENSITIVE>0</CASESENSITIVE>
<FULLMATCH>0</FULLMATCH><TEACHERENTRY>1</TEACHERENTRY></ENTRY>)
Next, I copied all the columns and pasted them into a Word document. In Word the pasted material was in a table so I highlighted the table and then converted the table to text using paragraph marks.
Then I copied from XML writer the beginning part of the exported Moodle glossary into the top of the Word document. This part for my files was from the line “<?xml version="1.0" encoding="UTF-8"?>“ to the line which ended as <ENTRIES>. I copied the ending code from XML writer of the exported file which was </ENTRIES></INFO></GLOSSARY> to the end of the terms in the Word file. With all of the copying I made sure there were no spaces between the letters.
Next, I copied the entire Word file into a new XML file in the XML writer program and saved the file. This is the file I imported into the glossary. Only a couple of terms did not import.
Once I had figured this out, it only took me abou 20 minutes to do the import. Again, I am no tech and there is probably a cleaner way of doing this. Maybe it will work for you.
I'm sure it needs some refinement, but it might be a starting point.
hth
Frank
Joseph
If you have your XML code ready in Word I think you can leave out that last step (copying everything into XML writer). Instead you can just use Word's "Save as text" function to save your XML as plain text file. You just have to make sure the encoding is UTF-8 and you might change the file extension to .xml. (Word might also offer to save your document as XML, don't do that!).
hth
Frank
A very easy and elegant solution is Yasu Imao's Moodle glossaryXMLconverter_html (http://moodle.org/mod/forum/discuss.php?d=91224&parent=489666). It's a JavaScript based converter that works directly in your browser.
I added that link also to Import glossary entries.
Cheers,
Frank
I found that keeping things simple is the best solution.
I downloaded an XML plug-in for Excel. I had all the terms in Column A, and their corresponding definitons in column B.
Using the XML add-in, I converted a range into an XML list. From here the XML mapping is done automatically. I saved this file as XML and it worked like a charm.
I found i wasted ALOT of time trying to use the file that Moodle exported, and to play around with the mappings. This took a long time and led to no where.
***The one problem that I ran into was that my glossary had some characters that are not recognized by Moodle. One character in particular, a quesiton mark with a box around it. I found that I spent most of my time figuring out that this character was the problem. Unknowlingly, I thought that the problem lied in the XML mapping, however this was not the case***
So if you find that Moodle does not want to import your glossary please make sure that you do not have any strange characters in the file you want to upload!
Hi Phil,
Can you suggest a good XML plug-in for Excel. I have about 200 terms I want to import into a moodle glossary and anything that will make this process more efficient would be great.
Thanks
John Ivanac
(TAFE NSW Sydney Australia)
I used this XML add-in
Another thing you can do is manually insert a term or two into the glossary. Then export the glossary and save it to your computer. Then in Excel, go to the developer tab (if its not visible on your excel you can go into excel options and check the box that says "Show Developer Tab in the Ribbon"). In the developer tab click the "Source" button. This will open a toolbar on the right side of your screen. From there Click XML maps and select the file that moodle exported
I made a doc with screenshots to help you out!
http://www.mediafire.com/?sharekey=bd5675a572b14675aaca48175a79d1c3e04e75f6e8ebb871
I had to use mediafire, because Moodle has a very unforgiving 100KB limit....
You need:
- openoffice Calc
- Yasu Imao's Moodle glossaryXMLconverter_html
- MIcrosoft XML Notepad (free download but needs net2)
- Start openoffice Calc with an empty table
- Start glossaryXMLconverter_html in your Browser (Firefox/IE7 or whatever)
- Start MIcrosoft XML with an empty file
- Write your list into openoffice Calc columns A B (C D)*
- Select the entries and CTRL-C to copy the list
- Switch to the Browser
- Paste with CTRL-V the list into the left window
- Click CONVERT
- Copy the entire converted list in the right window with CTRL-A CTRL-C
- Switch to Microsoft XML Notepad
- Paste with CTRL-V the list into the right editor field
- Save the file (xxx.xml)