Imported Glossary Autolink Problem and can you Highlight only the First Instance?

Imported Glossary Autolink Problem and can you Highlight only the First Instance?

by Alex Vanden Bosch -
Number of replies: 5
Question #1.- I've got just under 600 glossary terms that I've imported with no problems. I was wondering how to get them to autolink without having to go into each individual entry to tick the box? As you can imagine, with 600 entries that would take a while.

Question #2.- The other question I had was is it possible to highlight only the first instance of the word in the text. In other words, if I have a page with 10 instances of the word 'Hello' on it, is it possible to just have the first hello highlighted? Otherwise the page may look a bit... 'highlighty'.

(Edited by Joseph Rézeau - original submission Thursday, 4 February 2010, 02:37 PM - Please only post one question per post or number them.wink)

Average of ratings: -
In reply to Alex Vanden Bosch

Re: Imported Glossary Autolink Problem and can you Highlight only the First Instance?

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

Question #2. That is a site-wide setting and you'll have to ask your Moodle site admin to enable it for you.

Administration ► Modules ► Filters ► Manage filters

Common settings
Filter match once per page
Default: No
Automatic linking filters will only generate a single link for the first matching text instance found on the complete page. All others are ignored.
Filter match once per text
Default: No
Automatic linking filters will only generate a single link for the first matching text instance found in each item of text (e.g., resource, block) on the page. All others are ignored. This setting is ignored if the one per page setting is yes.

Hope that helps,
Joseph
In reply to Joseph Rézeau

Re: Imported Glossary Autolink Problem and can you Highlight only the First Instance?

by Alex Vanden Bosch -
That did indeed help, thanks Joseph!
In reply to Alex Vanden Bosch

Re: Imported Glossary Autolink Problem and can you Highlight only the First Instance?

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

Question #1.- Which method did you use to import those entries? What was the structure of the xml file that you imported entries from? If that xml file had all entries set as non-linked (<USEDYNALINK>0</USEDYNALINK>) you should have edited it with a simple text editor and replaced all <USEDYNALINK>0</USEDYNALINK> occurrences with <USEDYNALINK>1</USEDYNALINK> et voila!

Maybe it is not too late... Please provide more info.

Joseph


In reply to Joseph Rézeau

Re: Imported Glossary Autolink Problem and can you Highlight only the First Instance?

by Alex Vanden Bosch -
Joseph, you're a genius. Worked like a charm! Only problem I have now is that its highlighting half words. i.e. I have a glossary entry called 'ion' and now in the text its highlighting the 'ion' part of a word, such as admission. Does that make sense? I think I've seen another thread on here about it so will check that out now before I burden you again smile

edit: found it! Just changed the XML file. it had <FULLMATCH>0</FULLMATCH> which has been changed now to <FULLMATCH>1</FULLMATCH>.
Thanks for all your help, its much appreciated!!
In reply to Alex Vanden Bosch

Re: Imported Glossary Autolink Problem and can you Highlight only the First Instance?

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

Joseph, you're a genius. blush

In your xml import file, change <FULLMATCH>0</FULLMATCH> to <FULLMATCH>1</FULLMATCH>.