Glossary and Theme links

Glossary and Theme links

by Brian Yare -
Number of replies: 10

Using Moodle 2.5.2, I would like the words that are linked in a document (course section, etc., to not have any attributes changed to indicate when there is a glossary link. My teachers use colour and attributes of their own within their courses and I have to turn the glossary off as it pre-empts their choice of colour, size etc.

I would keep an attribute (color=red) for only the hover function.

Any suggestions of what changes I need to make to either the glossary module or the theme?

As we use multiple themes, a solution by changing the glossary module would probably be best.

Thanks in advance.

Average of ratings: -
In reply to Brian Yare

Re: Glossary and Theme links

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

You'll find this rule in moodle/theme/standard/style/core.css

a.autolink {color:#000000;background: #DDDDDD;}

remove the background rule.

If the themes used on your moodle site are based on standard, then you should be OK.

Joseph

In reply to Joseph Rézeau

Re: Glossary and Theme links

by Brian Yare -

Joseph my themes are based on such as arialist,  serenity ...

Arialist is built on canvas and base.

Serenity is built on canvas.

I will look to see if your suggestion helps. In the mean time, thanks.

A debug from my browser shows that I should be looking at

<a title="General Glossary: Chronology" class="glossary autolink concept glossaryid1" href="http://my_site/moodle/mod/glossary/showentry.php?courseid=32&eid=3&displayformat=dictionary">

In reply to Brian Yare

Re: Glossary and Theme links

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

Tested and works with arialist & serinity.

In moodle/mod/glossary/styles.css add the following CSS rules:

a.autolink.glossary {color:inherit; background: inherit;}
a.glossary:hover {color:red;}

Of course, when you upgrade your moodle site, you may have to re-do that hack in the mod/glossary/styles.css file.

Joseph

PS.- One interesting question, though, how will your students find out that some of the words in their moodle course resources do have a link to a glossary entry if the autolink does not show?

Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: Glossary and Theme links

by Brian Yare -

Thanks for trying, but it did not work for me. I have tried adding your two lines two lines to either the top or the bottom of your mod/glossary/styles.css

I have switched to standard serenity theme. I've purged caches both in moodle and in IE. I've booted another computer. But the text that links to the glossary is still being displayed in a color chosen by serenity.

I hope that you have some further ideas. This would have been a neat solution had it worked!

Best wishes

Brian Yare

In reply to Brian Yare

Re: Glossary and Theme links

by Brian Yare -

I also have commented out the line from the Standard theme mentioned above, but this also made no difference.

Brian

In reply to Brian Yare

Re: Glossary and Theme links

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

The hack does work for me, tested on Moodle 2.5 in Firefox and MSIE10. See screenshot. I see no reason why it should not work. Are you sure you have purged ALL the Moodle caches?

Joseph

screenshot #1

Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: Glossary and Theme links

by Brian Yare -

Joseph

Thank you. I had another look – I had added a comment to the CSS but using // instead of /* */

I don’t us this stuff very often and get very quickly confused by a mixture of php, html, css, javascript as well as the languages that I used to use at work years ago. I have double-checked, and it also works (as it should) with my own themes, and in a course using both local and global glossaries.

Job well done, thanks.

Brian

p.s., there is still one problem - I copy all sections into one book for the entire course. This appears to go well, until I go to "Print a Chapter" or "Print Entire book". At this point the hack is failing.

I am looking to see if I can spot how the CSS differs here, but if you have a suggestion it would save me a lot of time.

In reply to Brian Yare

Re: Glossary and Theme links

by Brian Yare -

I've asked a question over on the Books forum. It appears that: 1) the filters in books (to suppress autolinking) do not work on Moodele 2.5.2 2) books are not printed through the normal themes, but have a special file: mod | book | tools | print | print.css to control the output.

I can hack that file, but it is a pain in the butt to remove the autolinks and associated highlighting by editing each chapter rather than by using the filter.

Any other suggestions?