Help!! Glossary autolinking overdoing it...

Re: Help!! Glossary autolinking overdoing it...

by Eloy Lafuente (stronk7) -
Number of replies: 10
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Tim,

really something doesn't work as expected in the bug tracker! sad

Anyway, I've repackaged and attached it here.

Just install both files in their place, disable the glossary filter, enable this and try it!

It should be (if working for you) really faster than the standard one, because it uses some "per request" storage, reducing the number of DB accesses in a BIG magnitude (specially in pages being filtered against a lot of terms and having a lot of text boxes).

I can imagine using this "storage" in the standard glossary module too if everything works here. cool

Feedback (with PHP, OS, Web server... info) will be really welcome!

TIA & ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Help!! Glossary autolinking overdoing it...

by Timothy Takemoto -

Thanks for this Eloy. A faster glossary will make the world of difference for language teachers. I hope it is going into 1.5.
Tim

In reply to Eloy Lafuente (stronk7)

Re: Help!! Glossary autolinking overdoing it...

by Tim Allen -
Thanks a lot Eloy smile, I have downloaded the new files and tested it extensively on my site, which is the following: PHP 4.3.8, Fedora Core 1, Apache 2.0.50. MySQL 4.1.7, Moodle 1.4.2+ (2004083129).

I have tested this new filter with all standard features. It works in all resource types and all standard modules! big grin It doesn't work in a few non-standard modules such as dialogue, exercise and questionnaire (probably because filters don't work on them at all!) Also, it doesn't work on calendar events, but does work on other calendar items drawn from course activities (such as a workshop, etc.).

This is a great improvement Eloy, thanks so much for your work. approve I really hope this makes it into the standard moodle as an admin setting like "link all occurrences" or "link only the first occurrence" - maybe even on a per glossary basis?

By the way, I'm interested in another glossary feature, which I added to the bugtracker some time ago, namely I would like all students to see each other's grades so that they can learn from each other, just like in the forums. This is a very important pedagogical learning process, so I really hope the glossary can do it. Any chance of working your magic on this bug too? (if you are too busy please ignore my impertinence! blush).
In reply to Tim Allen

Re: Help!! Glossary autolinking overdoing it...

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Tim,

thanks for the feedback! It seems to be really positive! Both this feature and your Bug 2058 solution will be introduced in 1.5 (if I've enough time!). They cannot be done in 1.4, because it implies DB changes in some tables and we use to avoid DB changes between minor releases. And NO, it isn't an impertinence! wink

Ciao smile

PS: I would be very interested if you, moodlers, could test it against old versions of PHP (4.1.x and 4.2.x series) both in Win32 and Unix OSs. cool
In reply to Eloy Lafuente (stronk7)

Re: Help!! Glossary autolinking overdoing it...

by Timothy Takemoto -
Hi Eloy,

To test I will need 1.5? I could set up a test 1.5 on my own server.

By the way bug 2058 is not mine.

I have however taken the liberty of posting a "bug" on the glossary asking for integration of the sort of functionality that Paul Evan's hack provides allowing us to autolink to only certain modules (particularly, NOT the quiz module).

Tim 
In reply to Timothy Takemoto

Re: Help!! Glossary autolinking overdoing it...

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Tim Takemoto (there are really a lot of Tims in this discussion! tongueout),

the new glossary filter doesn't need 1.5 and it should work fine under 1.4. What I mainly need is some testing about it working in PHP 4.1.x and 4.2 installations (Win32 and Unix). Both PHP 4.3 (Unix) and PHP 5 (MacOS X and Win32) seems to be working fine. It's important for me to test it intensively under different PHP versions because it uses a PHP feature (hidden or at least, not documented) never used before (by me) and it's very important to check its behaviour under distinct versions.

About the ability to selectively mark the activities where filters work (bug 2284), I'm not pretty sure that, although working, using the $_SERVER['REQUEST_URI'] was the correct approach for an "official" solution. Anyway it has to be analysed to see what has to change in Moodle's core to be able to add such functionality in a proper way.

And I've to admit that, at least for now (and for me), it isn't one of my priorities (it's in the list but under a lot of tasks). sad Sorry to be sincere, but I think it's better, isn't it?

Ciao smile
In reply to Tim Allen

Re: Help!! Glossary autolinking overdoing it...

by W Page -
"This is a great improvement Eloy, thanks so much for your work. approve I really hope this makes it into the standard moodle as an admin setting like "link all occurrences" or "link only the first occurrence" - maybe even on a per glossary basis?" Tim Allen

...maybe even on a per glossary basis?...  This is a very needed feature.  It allows the teacher or site admin to fine tune the type of informatin they want to hightlight in a course.  Just wanted to put my non-coder vote in this ome. big grin

WP1

In reply to Eloy Lafuente (stronk7)

Re: Help!! Glossary autolinking overdoing it...

by Rod Spears -
Where do I install these files and what do I do to get it to work?
In reply to Rod Spears

Re: Help!! Glossary autolinking overdoing it...

by Tim Allen -
Hi Rod,

Install the files into the moodle/filter directory - the folder name when unzipped should be "glossary_only_first".

You also need to copy the glossary_only_first.php file into the moodle/lang/en folder.

These details are also at http://moodle.org/bugs/bug.php?op=show&bugid=2220 wink

Then from the site front page go to the administration block and click "configuration" then "filters". Then move the standard glossary filter "Glossary Autolinking" to the inactive column and the new filter "Glossary Only First" to the active column using the arrows on the right-hand side.

Hope this helps! smile
In reply to Tim Allen

Re: Help!! Glossary autolinking overdoing it...

by Rod Spears -
The Glossary Only First filter seems to be working now, since I updated to Moodle 1.4.3  I am using PHP Version 4.3.10 on Apache/1.3.29

I won't know if it solved my problem until I have all of my students in the computer lab again, trying to access the site at the same time.  My problem then was that my server was blocking access because the glossary auto linking overloaded the server.  They told me it was because the program was running too many scripts.
In reply to Rod Spears

Re: First word glossary

by Geoff Cox -
I succesfully got the first word only function working, but it seems to still link the first appearance of the word for each text (rather than for the course as a whole). 

It does, however, drastically reduce the task of nolinking the words that shouldn't be glossed as the course progresses.

Any suggestions?

Thanks,
Geoff