Importing glossaries in WebCT format

Importing glossaries in WebCT format

by Maxi Pecero -
Number of replies: 12

Hello!

 

I attach a zip file that includes two pages to import glossaries in WebCT format. This format is very easy. In a text plain file, the entries are like this:

 

:concept_1

definition_1

:concept_2

definition_2

 

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 the some glossary, replace in the address bar import.php by import2.php and push Enter so you load the new page.

 

I think this feature could be included in a new version of the glossary module.

 

Thank you and sorry about my English,

Maxi.

Average of ratings: Useful (2)
In reply to Maxi Pecero

Re: Importing glossaries in WebCT format

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thank you Maxi for providing a very useful import facility for ex WebCT users...

Unfortunately I have found your proposed module to be a little buggy. Here is the workaround I have found. I do hope you'll be able to fix the bugs and that your module will be integrated in version 1.4 soon.

Tested in Moodle 1.3 and 1.4
Current version is a little buggy, and only works (for me) using the following steps:

NOTE: if you want to ADD imported entries to an existing Glossary, go to 2

1- if you want to put all imported entries into a NEW Glossary, create a new one in Moodle (Add ... Glossary in version 1.3 or Add an activity... Glossary in version 1.4DEV)
2- Go to an existing Glossary
3- Click on the Import entries hyperlink
4- in the address bar replace import.php with import2.php...
5- ... and press RETURN key on your keyboard (or click OK button in IE navigator) DO NOT CLICK ON the Save Changes button

6- you'll get 2 error messages: "You must specify the file to import and define the criteria of the process."
"Submit your request and review the results."
7- in the File to import window enter address of .txt file to import (AGAIN!)
8- NOW click on the Save Changes button... et voila!
NOTE: some of your original imported glossary may be rejected and those rejections will be reported on screen... I have not yet found out why some of my WebCT original glossary had been rejected during import.

All the best,

Joseph_R

In reply to Joseph Rézeau

Re: Importing glossaries in WebCT format

by Maxi Pecero -

Hope this help. Regards,

Maxi.

Average of ratings: Useful (1)
In reply to Maxi Pecero

Re: Importing glossaries in WebCT format

by Lane Grann-Stahl -

Hi Maxi,  Something very basic isn't clear to me.  Do I create a .txt file using the

:concept_1

:definition_1

format and upload that into my glossary?  Or do I upload the import2.php file? I'm confused.  Also, do I use the php file or the htm file?  (My glossary is in html)

I KNOW this is easy (or at least it will be).  But I could use your guidance.

Thanks,

Lane

In reply to Lane Grann-Stahl

Re: Importing glossaries in WebCT format

by Maxi Pecero -

Hi Lane,

The correct format is

:concep

definition

You should upload the .txt file using the import2.php file in your browser.

Copy import2.php and import2.htm in the forlder ".../moodle/mod/glossary". Then go to "your_site/mod/glossary/import2.php?id=your_glossary_number" with your browser and upload the .txt file using the form of the page.

I hope to be on time and hope this help you.

In reply to Maxi Pecero

Re: Importing glossaries in WebCT format

by Maggie Lattuca -

Hi Maxi and fellow moodlers,

I'm new to Moodle and while I've managed to figure out the workings of most activities, the glossary remains a mystery.

I'm trying to import a text file formatted for WebCT. I've tried to follow the instructions you and others have kindly provided, but have not been successful. I'm not sure why, and  I don't completely understand when you say:

Copy import2.php and import2.htm in the forlder ".../moodle/mod/glossary". Then go to "your_site/mod/glossary/import2.php?id=your_glossary_number" with your browser and upload the .txt file using the form of the page.

Step-by-step instructions, from the beginning to the end, would be *very* helpful. Also:

1. if not formatted for WebCT, how should a text file be formatted?

2. how should an xml file be formatted?

3. does Moodle accept one or the other (txt or xml)?

If there is a help file somewhere that someone can point me to, or sharing detailed instructions on the process, I would be extremely grateful!!

Many thanks,
Maggie

In reply to Joseph Rézeau

Re: Importing glossaries in WebCT format: "MOODLE THE CANNIBAL"

by Ger Tielemans -

You set a new trend: Instead of importing a complete "Elephant" course, you cut it into pieces and import the usefull parts piece by piece...

Nice, very nice: It willgive Moodle a new name: "The Cannibal"

In reply to Maxi Pecero

Re: Importing glossaries in WebCT format

by Timothy Takemoto -

Maxi Pecero,
Thank you very much for your WebCT glossary import tool. It was just what I needed.

I agree that this should be included in Moodle. 

The WebCT format  is very close to a simple list. I am not using Web CT but it will be easy enough for me to get my two column list into the above format, but rather difficult to merge it with the wonderful Williams Castillo XML.

Yes, it worked fine for me and I did not need the second set of instructions provided by Joseph, above, it worked fine as Maxi described, for me.

I had an excel file in two columns, concepts and defintions.

1) I pased that to a word file as text
2) I replaced ^p with ^p: (where ^p is a carriage return) and this put colons before my concepts.
3) I replaced ^t with ^p (where ^t is a tag) and this put the definitions on their own line.
4) I imported as according to Maxi's instructions (some 79 terms, would have taken me all night)
5) As Joseph pointed out, in my case one concept was rejected.It is not clear why.

Great script.

Tim

 

In reply to Timothy Takemoto

Re: Importing glossaries in WebCT format

by Jim Edgar -

Maxi,

A BIG thanks for the script to import a WebCT glossary into Moodle. It works great!

Jim

In reply to Maxi Pecero

Re: Importing glossaries in WebCT format

by Zane Edwards -
Hi Maxi,

I have imported the webct glossary, but the problem is, it does not do well with the Eastern European character set. The file is DOS, UTF-8, but it does not import correctly. Any ideas? Maybe its my server set up?

Zane
In reply to Maxi Pecero

Re: Importing glossaries... Moodle 1.6.06 compatible?

by Michal Blazke -

Hi, thanx for the great feature importing plain text file entries,

but I have a serious problem in Moodle 1.6. - when pointing the browser to the moodle/mod/glossary/import2.php?id=N

I always get the A required parameter was missing message sad

(FYI no "standard" site header is displayed, only the above message and the "standard" site footer)

Any idea what to be improved?

Micky

In reply to Maxi Pecero

Re: Importing glossaries in WebCT format

by James Scully -
Hi,

I've been investigating importing glossaries from WebCT CE format and found your script.

As I have 1.8 here ~I found the same problem as Michal Blazke found two years ago.

I have combined your code with the current 1.8 XML import code and the script appears to work. (I imported a few glossaries on my Mac installation of 1.8).

It seems to find one more glossary entry than is actually in the glossary and unsurprisingly fails to import it.

It will preserve html, which was a key feature for me. However <object> tags do get stripped even though my installation has this feature turned off. I've probably missed another location where I have to turn the "stripper" off.

What I really want is a modification of Dan Stowell's whole course import which will import glossaries in html format (as here) and with any files referred to in the entries (which are in the XML exported from WebCT). Dan's scripts appear to bring text entries across well but html entries have code characters converted to &lt; and so on.

This is beyond me in scripting terms - anyone out there still converting from WebCT now they're not supporting CE any more> - offers?

James
Average of ratings: Useful (1)
In reply to James Scully

Re: Importing glossaries in WebCT format

by Matt Jenner -
This script above is really very useful and works really well. Thank you!