Modifying glossary filter so tooltips display definition instead of concept name.

Modifying glossary filter so tooltips display definition instead of concept name.

- Tim Redman の投稿
返信数: 14
Is there anyway to tweak the auto-linking glossary tooltips to display glossary definitions as opposed to just the category and concept name? So that users don't have to click to see what a words definition is but simply mouseover instead?

I think it may be possible to tweak the file glossary/filter.php but I wanted to check if anyone had any easier thoughts or suggestions before I attempt this!
Tim Redman への返信

Tárgy: Modifying glossary filter so tooltips display definition instead of concept name.

- Deni Nagy の投稿
Hello Tim,

This is the problem I can't solve either. Do you get to know the answer by now? I would really appreciate if you shared your experience with me on this field!

Thanks in advance!
Deni
Deni Nagy への返信

Re: Tárgy: Modifying glossary filter so tooltips display definition instead of concept name.

- Joseph Rézeau の投稿
画像 Core developers 画像 Particularly helpful Moodlers 画像 Plugin developers 画像 Testers 画像 Translators
This is not a trivial problem. Displaying longer texts, which may have images, hyperlinks in them, in a balloon tooltip involves a lot of programming (usually Javascript) and is rarely satisfactory. Maybe some moodle users want this because for them a glossary definition consists of just a few words which can easily be displayed within the confines of a tooltip. But for many other users (including myself), Glossary definitions are complex pages which could certainly not be displayed within the limited confines of a tooltip.
Joseph
Joseph Rézeau への返信

Tárgy: Re: Tárgy: Modifying glossary filter so tooltips display definition instead of concept name.

- Deni Nagy の投稿
Sure. I'm not saying the recent popup makes no sense, only for me - for the reason you mentioned, that I have only a few words in the glossary - the definition would be more useful. Do you know the solution, what to change in the code?

Thanks! Deni
Deni Nagy への返信

Re: Tárgy: Re: Tárgy: Modifying glossary filter so tooltips display definition instead of concept name.

- Joseph Rézeau の投稿
画像 Core developers 画像 Particularly helpful Moodlers 画像 Plugin developers 画像 Testers 画像 Translators
Sorry I do not know the solution. As I said it would be a massive change to the way autolinking to Glossary works in Moodle at the moment.
Joseph
Joseph Rézeau への返信

Tárgy: Re: Tárgy: Re: Tárgy: Modifying glossary filter so tooltips display definition instead of concept name.

- Deni Nagy の投稿
I am very happy that you react so fast! 笑顔
I see. OK, thanks. Maybe we will add some mp3s to the Glossaries so as they gave more info in the big window. Oh, one more thing. Do you know how can I specify a size parametre for glossary window? It is too big and I can not get it to open smaller automatically in a smaller window. It is resizeable manually but it would be much better to specify a size.

Thanks! Deni
Deni Nagy への返信

Re: Modifying glossary filter so tooltips display definition instead of concept name.

- Joseph Rézeau の投稿
画像 Core developers 画像 Particularly helpful Moodlers 画像 Plugin developers 画像 Testers 画像 Translators

Deni,

If you are willing to hack your moodle core files this is where you will find the glossary popup window size parameters (for Moodle 1.8). In file mod/glossary/filter.php line 137 etc.

$href_tag_begin = '<a class="glossary autolink glossaryid'.$concept->glossaryid.'" title="'.$title.'" '. 'href="'.$CFG->wwwroot.'/mod/glossary/showentry.php?courseid='.$courseid.
 '&amp;concept='.$encodedconcept.'" '.
 'onclick="return openpopup(\'/mod/glossary/showentry.php?courseid='.$courseid.
 '\&amp;concept='.$encodedconcept.'\', \'entry\', '.
 '\'menubar=0,location=0,scrollbars,resizable,width=600,height=450\', 0);">';

replace width and height with your preferred values.

Joseph

Joseph Rézeau への返信

Tárgy: Re: Modifying glossary filter so tooltips display definition instead of concept name.

- Deni Nagy の投稿
Fantastic! I'll do it tomorrow! Sure, I can do such simple hacks...
(I use 1.9.)

Thank you!

(BTW. I have written some notes to Adriane's Drag & Drop ordering and matching questions. I need help in installation. Can you help me?) Sorry for mentioning here but writing here seems to worth a lot! ;)


Thanks!
Deni
Deni Nagy への返信

Re: Tárgy: Re: Modifying glossary filter so tooltips display definition instead of concept name.

- Leticia Maimann-Roland の投稿

Does it work, guys?

It looks like a smart and useful changing...

Showing the definition instead of the concept would save students time, so they have it over there.

I have a dictionary glossary, where this functionality would fits so perfectly.

Hugs, Leticia.

Tim Redman への返信

Ang: Modifying glossary filter so tooltips display definition instead of concept name.

- Bente Olsen の投稿
Finally I managed to test your hack, Joseph, it is superb! It fits our correction key as if that were the original purpose. In the meanwhile filter.php has been slightly modified, I am no hacker, but I managed to deal with the change too, so currently it works perfect on my testserver. Now I am really tempted to use it at our production site, I know you do not recommend that, but... will it be that risky?
Bente Olsen への返信

Re: Ang: Modifying glossary filter so tooltips display definition instead of concept name.

- Lezlie Harris の投稿
I believe the glossary will already do this. We use Moodle 1.9. My linked glossary definitions used to appear with a mouse-over without the need to open in a new window. I recently must have changed a setting because now I just get the entry word. sad Does anyone know what setting I changed?
Lezlie Harris への返信

Re: Ang: Modifying glossary filter so tooltips display definition instead of concept name.

- Joseph Rézeau の投稿
画像 Core developers 画像 Particularly helpful Moodlers 画像 Plugin developers 画像 Testers 画像 Translators

Lezlie: "I believe the glossary will already do this. We use Moodle 1.9. My linked glossary definitions used to appear with a mouse-over without the need to open in a new window."

As fas as I can remember this is not true. The standard behavior of glossary auto-links is for the user to click the hyperlinked word, which opens up the relevant glossary definition in a popup window. There is not setting to show the definition on mouse hover, this is why I proposed a hack in MDL-18213.

Joseph

Tim Redman への返信

Optional display

- Mark Penny の投稿

This is a bit like the Great Blog Debate that smouldered for years. The problem is often that the developer sees the module being used one way while other users would like to use it another. Michael Dougiamas used to insist that blogs in Moodle should on no account allow comments, because blogging would distract students from activities and there were other modules, such as forums, which kept blog-style interaction in the learning context. That may have been true for many installations, but for many others, Moodle blogs would have held benefits. Now I see comments can be enabled if desired. From the user end, that's a simple solution to the problem of whether blogging should be allowed or not.

I suggest the question of whether definitions display in pop-ups or tooltips is a similar issue. When the developers have time to put in the code, users should have the option of displaying definitions in pop-ups or tooltips.