Difference between revisions of "Import glossary entries"

Jump to: navigation, search
m
(rewording, removing broken links)
Line 1: Line 1:
{{Glossary}}
+
{{Glossary}}Glossary entries can be exported and then imported into another glossary via an XML file.
 
 
It is possible to import glossary entries via an XML file. This page explains how:
 
  
 
==Importing  glossary entries==
 
==Importing  glossary entries==
  
#As an editing teacher, access your glossary.
+
*As an editing teacher, access your glossary
#Go to ''Settings > Glossary administration > Import entries''
+
*Go to ''Settings > Glossary administration > Import entries''
  
 
[[File:importglossaryentries.png]]
 
[[File:importglossaryentries.png]]
  
#Click the "Choose a file" button and browse for the exported entries XML file on your computer
+
*Click the "Choose a file" button and browse for the exported entries XML file on your computer
#Select the destination for the new entries: either the current glossary or a new one.
+
*Select the destination for the new entries: either the current glossary or a new one
 
+
*If you want to import category information, click the checkbox.
 
+
*Click the "Submit" button.  
#If you want to import category information, click the checkbox.
 
#Click the "Submit" button.  
 
  
 
[[File:xmlimportscreen.png]]
 
[[File:xmlimportscreen.png]]
Line 21: Line 17:
 
You'll then see a report of the entries and categories added to the glossary. If you enabled duplicate entries when you created the glossary, the import process will add all of the new definitions. Otherwise, it will not allow you to import any duplicate entries.
 
You'll then see a report of the entries and categories added to the glossary. If you enabled duplicate entries when you created the glossary, the import process will add all of the new definitions. Otherwise, it will not allow you to import any duplicate entries.
  
 +
You will be listed as author of all the entries.
  
 
== Troubleshooting ==
 
== Troubleshooting ==
Line 32: Line 29:
 
* Warnings like <code>Warning: exec() has been disabled for security reasons in /moodle/lib/uploadlib.php on line 603</code> may not be the problem when importing but may distract one from dealing with problems with the format of the XML file.
 
* Warnings like <code>Warning: exec() has been disabled for security reasons in /moodle/lib/uploadlib.php on line 603</code> may not be the problem when importing but may distract one from dealing with problems with the format of the XML file.
 
* HTML and XHTML tags written within CONCEPT or DEFINITION elements will fail on import, showing "Array" instead of the desired content. To remedy this, try writing the (X)HTML tags within <![CDATA[ ]]> markup.
 
* HTML and XHTML tags written within CONCEPT or DEFINITION elements will fail on import, showing "Array" instead of the desired content. To remedy this, try writing the (X)HTML tags within <![CDATA[ ]]> markup.
* If the glossary entries contain images, image paths will need amending in order for the images to be displayed when the file is imported. A search and replace in the XML file before importing is one option, another is to use the [[Search and replace]] feature within Moodle.
+
* If the glossary entries contain images, image paths will need amending by doing a search and replace in the XML file in order for the images to be displayed when the file is imported.
 
 
==Restoring a course backup==
 
 
 
An alternative method of importing glossary entries is to restore a Moodle course backup file containing a glossary. This method includes categories, images and attachments within glossary entries.
 
 
 
== Importing tools ==
 
* [http://www.irpens.co.uk/moodle/MoodleExcelToGlossary.xls David Fountain's Excel macro] An Excel workbook with macros to create an XML file.
 
* [http://moodle.org/mod/forum/discuss.php?d=91224&parent=489666 Yasu Imao's Moodle glossaryXMLconverter_html 4] A JavaScript based converter, works directly in your browser.
 
:(Both above methods are detailed [http://moodle.org/mod/forum/discuss.php?d=79120#p536148 in this discussion].)
 
* [http://moodle.site5.com online Moodle converter ] Allows to easily create glossary online. Supports different formats of entries - Excel, concept: definition, concept - definition and others. Also can re-convert  from XML to text. 
 
* [http://moodle.org/mod/forum/discuss.php?d=123277 Importing into Moodle] contains an explanation of how to manually create an XML file from an Excel spreadsheet.
 
  
== Importing glossaries in WebCT format ==
+
==Restoring a glossary activity backup==
  
See this [http://moodle.org/mod/forum/discuss.php?d=10570 Using Moodle forum discussion]
+
An alternative method of importing glossary entries is to restore a glossary [[Activity backup|activity backup]] containing enrolled users. This method includes categories, images and attachments within glossary entries. When the glossary is restored, the authors of the entries will be the same as in the original glossary.  
  
 
== See also ==
 
== See also ==
Line 55: Line 41:
 
* [[XML FAQ]]
 
* [[XML FAQ]]
  
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=142346 Backup a glossary] forum discussion
+
Using Moodle forum discussions:
 +
*[http://moodle.org/mod/forum/discuss.php?d=79120 Excel to Glossaries]
 +
*[http://moodle.org/mod/forum/discuss.php?d=142346 Backup a glossary]
 +
*[http://moodle.org/mod/forum/discuss.php?d=123277 Importing into Moodle] contains an explanation of how to manually create an XML file from an Excel spreadsheet
  
[[cs:Import slovníkových položek]]
 
 
[[de:Glossareinträge_importieren]]
 
[[de:Glossareinträge_importieren]]
 
[[fr:Importer/exporter un glossaire]]
 
[[fr:Importer/exporter un glossaire]]

Revision as of 17:05, 8 February 2012

Glossary entries can be exported and then imported into another glossary via an XML file.

Importing glossary entries

  • As an editing teacher, access your glossary
  • Go to Settings > Glossary administration > Import entries

importglossaryentries.png

  • Click the "Choose a file" button and browse for the exported entries XML file on your computer
  • Select the destination for the new entries: either the current glossary or a new one
  • If you want to import category information, click the checkbox.
  • Click the "Submit" button.

xmlimportscreen.png

You'll then see a report of the entries and categories added to the glossary. If you enabled duplicate entries when you created the glossary, the import process will add all of the new definitions. Otherwise, it will not allow you to import any duplicate entries.

You will be listed as author of all the entries.

Troubleshooting

Possible causes of problems importing entries:

  • If there are mistakes in the XML file such as the <entries> tag being missing or the <info> tag being in the wrong place. May happen if you have constructed the XML file manually or with some sort of tool like mailmerge in Word and your template is wrong.
  • If there are top bit set characters in the text of the entities like concepts, definitions or keywords. Replace things like & with &amp;
  • If there are tabs or spaces between entries. Not sure if spaces cause problems but best to remove any between the end of one tag and start of the next. e.g. Search and replace > < with >< via a text editor.
  • In most cases the import is halted if any of these errors occur.
  • Duplicates in the entries which clash with entries already when merging a glossary is usually not a problem.
  • Warnings like
    Warning: exec() has been disabled for security reasons in /moodle/lib/uploadlib.php on line 603
    may not be the problem when importing but may distract one from dealing with problems with the format of the XML file.
  • HTML and XHTML tags written within CONCEPT or DEFINITION elements will fail on import, showing "Array" instead of the desired content. To remedy this, try writing the (X)HTML tags within <![CDATA[ ]]> markup.
  • If the glossary entries contain images, image paths will need amending by doing a search and replace in the XML file in order for the images to be displayed when the file is imported.

Restoring a glossary activity backup

An alternative method of importing glossary entries is to restore a glossary activity backup containing enrolled users. This method includes categories, images and attachments within glossary entries. When the glossary is restored, the authors of the entries will be the same as in the original glossary.

See also

Using Moodle forum discussions: