'Simple' solution sought

'Simple' solution sought

por ian lake -
Número de respuestas: 4
We are using Moodle 1.6.4+. Many of our departments have used 'courses' as repositories of information i.e. worksheets, course details, assignment sheets etc. resulting in 'courses' containing huge list of semi-organised, difficult to search for content. In many cases it was necessary to know where the content was before you could search for it.

These 'courses' were not for student consumption but for tutor reference purposes. After completing an exercise to create a searchable glossary of the NLN material (UK based 'SCORM' content), I began to realise the potential of glossaries and started to suggest that tutors use glossaries to create searchable 'repositories'. A number of tutors then contacted me, passed me the information and asked me to create glossaries, using the excellent spreadsheet supplied by David Fountain.

At this point I should note that I am aware of the database module but I seem to have some sort of mental block when creating tables as I cannot visualise their appearance from the set up page.

It has now become obvious to me that creating glossaries for this type of resource is useless without attaching or linking to the 'document' that is the subject of the glossary entry. Using the view source option in browsers I have been able to recover the 'addresses' of the resources but cannot find a way to use this information - my knowledge is sadly lacking, it comes from being self-taught - and not too well at that.

So far I am only able to create these links manually and it is 'mind-numbingly' tedious and prone to errors. Is there to anyone's knowledge a way of automating this process?

Although I have been an administrator for over a year, what I know about php, xml, macros and scripting would fit on the head of a pin, so please be gentle.

ian
Promedio de valuaciones (ratings): -
En respuesta a ian lake

Re: 'Simple' solution sought

por Mark Berthelemy -
Hi Ian,

Yes - one of Moodle's current limitations is in the way it handles content.

I've done a similar thing to you, in using glossaries to act as mini content management systems. They offer a searchable database of the resources.

In the long term I would suggest moving to a "proper" content management system. But in the short term, it sounds like the situation is this:

- You have content sitting as resources inside the courses
- You have one or more glossaries which act as the gateway to those resources.

I don't know a way of automating the resource collection. I'm sure it can be done, by reading the course's XML file (in the backup) and creating a glossary from it. But, like you, this is beyond my current abilities (and time to learn).

The quickest (and safest) manual way of getting the resource's URL (address) is by right-clicking on the link to it in the course, and copying that into the "insert link" dialogue box in the glossary entry. It's easier than trying to find the URL using view source.

Or have I misunderstood what you're trying to do?

Cheers,

Mark
En respuesta a Mark Berthelemy

Re: 'Simple' solution sought

por ian lake -

Thanks for this, it was the constant clicking that was getting on my nerves. I had hoped that there was a way of adding <a href>http://etc.etc</a> to the .xml import for the glossary.

This morning I tried and failed, the xml import was created with the information in the right places but when I imported it, the entry just showed 'array' in place of the relevant data.

So its back to the manual method for now.

ian

En respuesta a ian lake

Re: 'Simple' solution sought

por David Fountain -

Hi Ian

You've provoked some thoughts that may, or may not, be useful.

I think the problem with the import of html is the < > tagging. To get around this you could replace the '<' and '>' with a piece of text that will *never* be found in your glossary (eg thisisalessthantag and thisisagreaterthantag), import them and then using the mysql plugin http://moodle.org/mod/data/view.php?d=13&rid=448 do a SQL substring replacement to get the < and >'s into the record.

The table you need to look at is mdl_glossary_entries (unless you changed the prefix)

En respuesta a David Fountain

Re: 'Simple' solution sought

por David Fountain -

The replace function in MySQL (for me) is:

update `mdl_glossary_entries` set `definition`= replace(`definition`, "thisisalessthantag", "<") where glossaryid=3;

The glossaryid being the value given to the glossary you are altering - this is NOT the id value given in the links to the glossary, I haven't tracked down how that relates to the table but found it simple enough to import my text and find the glossaryid value by browsing the mdl_glossary_entries table for the new entries.

A corresponding replace for the > is also required.