Proper Format for Importing Items into a Glossary?

Proper Format for Importing Items into a Glossary?

Art Lader -
Vastausten määrä: 17
Sorry if I have missed this, but what is the proper format for a file that will be imported into a glossary? Is it perhaps a text file structured like this:

big, not small
thin, not fat
yes, not no
Arviointien keskiarvo: -
Vastaus Art Lader

Re: Proper Format for Importing Items into a Glossary?

Williams Castillo -
Nope.. surullinen CSV in not a valid format to import entries...

It has to be in XML. It accept a lot of fields but only a few of them are required.

Create a glossary, add an entry and the export the glossary. Check the format... It is the format... Replicate the "zone" where the entry is and it should have a valid file to be imported.

Will
Vastaus Williams Castillo

Re: Proper Format for Importing Items into a Glossary?

Art Lader -
Okay, thanks.

Odd thing, though. When I created the glossary I selected YES for the option "Automatically link glossary entries." And when I created the entry (wichtig: important), I checked "this entry should be automatically linked," but the word "wichtig" in forum posts is not linked to the definition in the glossary.

I guess I'll have to look closer at this.
Vastaus Art Lader

Re: Proper Format for Importing Items into a Glossary?

Martin Dougiamas -
Kuva: Core developers Kuva: Documentation writers Kuva: Moodle HQ Kuva: Particularly helpful Moodlers Kuva: Plugin developers Kuva: Testers
Glossary linking wasn't enabled for your site (but it is now).

I'm still a little worried about the performance aspects - let's keep an eye on it.
Vastaus Martin Dougiamas

Re: Proper Format for Importing Items into a Glossary?

Art Lader -
Thanks, Martin. It works. hymy

But here's some I don't quite get... When I export the glossary (to learn the format), the "wichtig" entry is not in the XML file and I get a message telling me that there are no data associated with the glossary. when I look in the glossary, though, it's there and the link DOES work.
Vastaus Art Lader

Re: Proper Format for Importing Items into a Glossary?

Williams Castillo -
Uhmm... :/

The glossary export the entries that you have previously selected... I know... there's nothing that warns the user about it (guilty, guilty!)...

Be sure that you have the entry selected before click on export (let say ALPHABET frame, ALL link).

If it does not work, and if you don't mind, allow me temporary teacher access to see what's wrong with the file and the process right in your installation.

Regards,
Will
Vastaus Williams Castillo

Re: Proper Format for Importing Items into a Glossary?

Runy Calmera -

Williams,

This didn't work for me. When I export a glossary (including some items) I don't get the xml records. No elements appear in  the glossary xml file, only the root tag of the xml.

Any clues?

I'm using moodle 1.3.

Runy

Vastaus Runy Calmera

Re: Proper Format for Importing Items into a Glossary?

Eloy Lafuente (stronk7) -
Kuva: Core developers Kuva: Documentation writers Kuva: Moodle HQ Kuva: Peer reviewers Kuva: Plugin developers Kuva: Testers
Hi Runny,

that's really very strange!! I've exported 4-5 glossaries without problem just now!!

Can you send me a backup (privately) of your glossary (without the rest of the activities in your course?). Then I'll test it here!!

Ciao hymy
Vastaus Williams Castillo

Re: Proper Format for Importing Items into a Glossary?

Tan M -

Hi Will,

I have exported the glossary, per your recommendation, and am guessing that the piece I need to add to is this:

- <ENTRIES>
- <ENTRY>
  <CONCEPT>instructor</CONCEPT>
  <DEFINITION>the instructor of this course</DEFINITION>
  <FORMAT>1</FORMAT>
  <USEDYNALINK>1</USEDYNALINK>
  <CASESENSITIVE>0</CASESENSITIVE>
  <FULLMATCH>0</FULLMATCH>
  <TEACHERENTRY>1</TEACHERENTRY>
  </ENTRY>
  </ENTRIES>
I just need to add a new <ENTRY> and then fill in my info, right?  Two questions on this:
1) I don't know what the format, usedynalink, and teacherentry tags mean.  I am guessing the others are all pretty self explanatory and maybe usedynalink is whether auto-linking is enabled for this entry or not?  Can you please enlighten me on what format and teacherentry are?  Should these settings be okay for every entry in my glossary or will I need to change them from time to time?
2) I have about 300 words I need to input -- am I going to have to copy paste them from my Word document one at a time into this format -- one chunk per word? Isn't there a better way?!?! (dramatic movie music)  smile
Thanks!
Tan
Vastaus Tan M

Re: Proper Format for Importing Items into a Glossary?

Paul Evans -
You want this discusion:

http://moodle.org/mod/forum/discuss.php?d=10570

or just do a forum search on 'import2'

I did 400 entries or so with it, it's quite painless.

In fact, I eventually renamed the original out of the way.

Vastaus Paul Evans

Re: Proper Format for Importing Items into a Glossary?

Lane Grann-Stahl -

Paul,  I'm going to try importing a glossary this way, too.  Could you clarify some things for me, please?

If my glossary is in html. then do I use the import2.html file instead of the php file?

I opened up the import2.htm file and it looks very strange to me.  Do I just create a text file with my terms and defs in the :concept def format and upload it in the Browse box?  Then save the file as import2.htm and import it into my glossary?

Once I do it it will probably seem incredibly simple.  But right now it doesn't.

Thanks,

Lane

Vastaus Lane Grann-Stahl

Re: Proper Format for Importing Items into a Glossary?

Paul Evans -
Hi Lane,

You need to copy both files from the zip archive into /mod/glossary.

The files are named import2.php and import2.html.

Quoting Maxi Picero:
'''To use these pages you have to unzip the attached file in the folder “…moodle/mod/glossary”. Then you go to the “Import entries” tab of some glossary, replace in the address bar “import.php” by “import2.php” and push Enter so you load the new page.'''

The file you choose to import needs to be plain text like something you would make with notepad *not* a webpage or something made with msword.

The format is a full colon followed directly by the key word you are defining then a new line followed by the definition (all on one line). example:

:diplopia
double vision, usually caused by a strabismus

Don't know what else I can add to help.

You can email me your glossary if you want me to convert it for you, so you'll see just what they need to look like: pevans@catholic.org

I liked it so much I replaced the original import files and use import2 exclusively.

Hope that helps.
Vastaus Paul Evans

Re: Proper Format for Importing Items into a Glossary?

Lane Grann-Stahl -

Thanks, Paul. Honestly, I'm not sure if this will help me or not.  I mayneed to find someone withmore experience with php, etc.  I'll fiddle with it on Monday.

Lane

Vastaus Williams Castillo

Re: Proper Format for Importing Items into a Glossary?

Lane Grann-Stahl -

I'm experimenting with glossary imports for the first time.

I did what Will said and exported a glossary with one definition and opened the file in Wordpad.  So all I need to do now is leave all the code as is except follow the format for the concept,definition fields, and name fields?

Do I save the text file as .xml?  Or do I save it as .htm or .php?  Or what?  Not sure about this part of the import process.

Any other useful suggestions?

Thanks,

Lane

Vastaus Art Lader

Re: Proper Format for Importing Items into a Glossary?

Martin Dougiamas -
Kuva: Core developers Kuva: Documentation writers Kuva: Moodle HQ Kuva: Particularly helpful Moodlers Kuva: Plugin developers Kuva: Testers
Will described his XML format which is definitely worth sticking with. Just a thought, though, if you have a lot of entries in CSV format already, there is probably some existing XML software out there that would make it easy to reformat CSV formats into XML ...
Vastaus Martin Dougiamas

Re: Proper Format for Importing Items into a Glossary?

koen roggemans -
Kuva: Core developers Kuva: Documentation writers Kuva: Moodle HQ Kuva: Particularly helpful Moodlers Kuva: Plugin developers Kuva: Translators
Interested in that too ! I have a lot definition=concept -files. Keep this discussion going.
Vastaus Martin Dougiamas

Re: Proper Format for Importing Items into a Glossary?

Timothy Takemoto -

It would be nice to be able to import really simple glossary files, of the type
term, definition

Tim