Thanks in advanced!
Tips as to reliable software for producing an xml file that the glossary will accept would be much appreciated. Similar to Zane, I too have a few hundred terms/acronyms I need to take from printed learning manuals and input to a glossary.
It's going to be a lot of cutting and pasting and doing it online with all the screen refreshes is going to be a major pain in the proverbial. Tried doing a "mail merge" that will get the data into the xml structure but does not get recognised as such even after then cutting and pasting it into html kit and saving as xml

There must be an easy way of doing this . . . isn't there!

I put Moodle on my desktop (about zero refresh as a localhost). Build my lessons on it and upload them to the production moodle site. I immediately knocked off 80 pages in less than 40 minutes with almost zero error rate. Just a trick to use incase the easy way can not be found.
Best wishes with XML. Chris
Not a solution as such to the underlying problem but will help a lot
H
Is there somewhere I can alter this limit? Surely there must be a csv style import routine we could use?
I've now tried XML Fox, XML Converter,Cookbook and two others to try to restore my glossary. It worked for a long time but I cannot get it restored when I changed my website address. This is an extraordinary waste of my time and the documentation in Moodle is either primitive or misleading.
In Excel 2003, I use an excel spreadsheet with seperated concepts and definitions, then go to Data - XML - XML Source - XML Maps - Add.
I'll then browse to an exported Moodle glossary and click okay. This opens up a window that gives me the schema. I drag the concept tag to the top of the terms column, and the definition tag to the top of the definititions column. I then save this as XML Data.
I then import this into my glossary.
This works fine on both of my 1.6 production sites. It gives me an error on my 1.6 test site, saying "Can't insert record" for every one of the concepts.
All sites are on the same server. The Moodle and glossary versions are exactly the same. Ownerships and permissions to the folders and databases are exactly the same.
So why does this work on my production site and not my test site?
i have done all this, but still "Can't insert record"....
any ideas?
thanx...
Put your terms and definitions in a spreadsheet. Your first column should contain all the terms, the second all the definitions. The headers should be named “term” and “definition”.
Make a dummy glossary entry in Moodle and export the glossary to your desktop. You will use this as your master XML Glossary file template. Open up the XML file in an HTML editor such as Frontpage or Dreamweaver (I used Frontpage at work – I’m sure Dreamweaver would work as well, I'll try when I get home). Minimize this; we’ll come back to it later.
Open a new Word document, save as .txt file. (Important)
Start a mail merge: Tools > Letters and Mailings > Mail Merge
Choose the Directory option in Select document type (Step 1 of 6 in the merge wizard)
Use the ENTRY item template below to set up your merge. We are interested in getting the items into the proper format for the XML file. This is NOT the complete file, just the inner ENTRY items.
<ENTRY>
<CONCEPT>«term»</CONCEPT>
<DEFINITION>«definition»</DEFINITION>
<FORMAT>1</FORMAT>
<USEDYNALINK>0</USEDYNALINK>
<CASESENSITIVE>0</CASESENSITIVE>
<FULLMATCH>0</FULLMATCH>
<TEACHERENTRY>1</TEACHERENTRY>
</ENTRY>
Use the current document as the starting document (Step 2 of 6)
Use and existing list (Step 3 of 6) Select your spreadsheet with your terms and definitions
Arrange your directory (Step 4 of 6)
Insert the term and definition merge fields by selecting “More items…”
Preview your directory (Step 5 of 6) You only see the first record. Don’t worry.
Complete the merge (Step 6 of 6) All your entries are now nicely XML formatted.
Select all of the resultant “directory” and paste it into the full Glossary XML file that you opened in Dreamweaver or Frontpage, making sure you paste it between the <ENTRIES> and </ENTRIES> tags. You may have the option in your editor to “cleanup the XML formatting” – go ahead and use it.
Save your work and Import it to your Moodle Glossary. Moodle will automatically skip any duplicates.
Kristi,
I made it through a few pages on these forums, with lots of people talking about solutions to this problem, and yours was the first one that looked like I could do it. I was very surprised no one had replied to your suggestion. But here I am, 7 years later, trying this method in Moodle 2.4 and finding that it works very nicely, even for someone who was not even aware of Mail Merge inside Word.
To clarify her directions, for anyone who might like to try this in the future, during the Mail Merge process, you copy and paste the XML code that she has into your document. If you have named the column titles in your spreadsheet "term" and "definition" as she suggests, you do not need to do step 4 of 6 because the "merge fields" she speaks of are the items "<<term>>" and "<<definition>>" that are included in the XML you copied in. Step 4 is just necessary to create those two text strings, so that Word knows to insert one item from the "term" column where <<term>> is in the Word file, and same with definition. If you've titled your columns in your spreadsheet something else, you need to replace <<term>> with <<whatever your title is>> and same with <<definition>>.
Thanks again, Kristi!
Hi Matt,
Seven years is a long time in our "computer age". I'm glad you found Kristi's directions useful. Sadly she will probably never read your thanks, since she is no longer enrolled in this "course" (as you would have found out if you had clicked on the link to her profile).
Again I'm glad her solution worked for you. However I must say I am not a great fan of solutions which involve the use of proprietary software such as MS Word.
ATB
Joseph
I may not have clicked her name (and I'm not sure why I would have, as I was posting to a public forum, with the hope that all who read would benefit from my experience, despite the salutation at the front of the message which is, I would think, common courtesy), but I do know how to Google "open office" and "mail merge":
http://www.openoffice.org/documentation/HOW_TO/word_processing/writer2_EN.html
"Open office", that sounds better. Does this mean that you managed to adapt Kristi's instructions to Open office (rather than to the original MS Word)? If so, that's great.
Joseph
PS.- Sorry if my remark about not clicking Kristi's name sounded flippant. I just wanted to bring to your attention the fact that that user was no longer registered on this moodle.org course and therefore would probably never read your message thanking her, which is a pity. Better to "thank in vain" than to forget to thank, of course.
I have made an Excel spreadsheet that takes two columns, Concept and Definition, and creates a xml file that can be imported into an existing glossary. (Setting up a new glossary to accept the input is not too onerous)
Enter your concepts/definitions in columns A and B and run the macro "PrepareSheetForMoodle".
Not perfect, it will not accept HTML code in the definition and some of the defaults are hard-coded to those we use, but should be easy to change in the macro code if you desire.
Hope this helps.
Dave
Re: Anyone have a script for converting to xml?
Did you have to do anyhting special to the .xml file prior to importing it into moodle? I've created what I thought was the correct format file to import, but I guess I'm just out of energy. Any insight would be delightful!
I've attached the xml file.
Evan
ian
Re: Anyone have a script for converting to xml?
Hi Dave,
I'm trying to use this spreadsheet to import a glossary and I'm having problems with it - it seems that it doesn't encode some punctuation properly - some of the descriptions I'm trying to import have quotation marks - which result in "can't insert record" in moodle.
So I manually edited the quotation marks and changed them to single ticks and the import then gets further, but now its getting stuck on another character. The only non alphabetic characters in the field are commas and hyphens.
Any suggestions ?
Regards,
Simon
[ ] { } ` ¦ ¬ ^ & / \ | " - (hyphens need to be replaced with minus signs)
and those were just a few of them, how they arrived in the document i was processing i have no idea, but they were there never-the-less. I was eventually forced to process the file, open the xml file scroll down 'til i found an error, open the excel file trace the text correct it rerun the macro and start all over again.
There now some 1700 entries in the glossary. I am looking for a way to add categories using this macro - any ideas? what i know about vb, c, c++, php etc etc would fit on the head of a pin.
if you would like you could send me the offending file and i'll see what i can find.
ian
I'm using moodle 1.5.4 but have also tested it with moodle 1.7.2 so hopefully it will work on most versions.
Many thanks for this David, it is a fine piece of work
ian
I see Ian has had some suggestions for you, I don't think I can add anything to his comments, but if you are still having trouble please let me know and I will look again.
Once you have the columns A and B (Concept and definition) as you want them do a replace search that swaps " for " and another that replaces & with & (not forgetting the ; as I do sometimes). I have found that the various brackets and braces are accepted by the import but ¬ does give me problems and I am not sure what 'code' replaces it.
Where I have found something that stops the import, I type it into an empty glossary and then hit the export button to see what it wants in its place.
Dave
Hi Dave,
Thanks for replying. I've been busy on other things recently but I'm back looking at this again - I have a Glossary which has 189 entires in a table in a word document, I'm doing a search and replace to deal with & " < and >. The only one which is actually in the document is ". I'm then pasting that into the spreadsheet and exporting it.
The result I get is:
Total entries: | 26 |
Imported entries: | 23 (Rejected entries: 3) |
Rejection Report | |
--- | No concept or definition found. |
--- | No concept or definition found. |
consideration | Can't insert record |
So moodle is telling me it's importing 23 of 26 entries when there are 189 entries in the file
If I open the XML file in Internet Explorer it reports a syntax error part way down, but doesn't give any meaningful information on exactly where in the file it is.
Opening the XML file in Firefox (which is usually good for checking valid XML) reports no syntax errors...
The only thing I can think of is that some non-printable characters such as control codes have found their way into the original document, so somehow I need to screen those out...
Will keep working on it.
Regards,
Simon
I suggest you have a look at it in a plain text editor like Notepad, Word can hide a number of gremlins.
After the paste from Word save it as a csv, close it and open in Notepad (ignore any " at this point as they are used to delimit text cells) and this should reveal any strange codes.
Swapping &'s and " s, of course you should replace the &'s first otherwise you will end up with some very strange combinations...eg
& "
could become
& &quot
instead of
& "

By that, I suppose you mean "a standard computer"?

I have the same problem with spanish accented characters (á é í ó ú)
If you solve the problem, please let me know
Hellmuth has found a solution for accented characters: http://moodle.org/mod/forum/discuss.php?d=79120#p442126
Fantastic tool, David. Thanks a lot!
I'm going to add the glossaries I create with it to the glossary exchange - http://moodle.org/mod/glossary/view.php?id=2739
Thanks Dave! Worked a treat.
David, worked like a charm. You saved me hours of data entry time. Thank you!