Mouse-overs for the glossary?

Mouse-overs for the glossary?

by Fernando Oliveira -
Number of replies: 9
Picture of Plugin developers

I'm in the process of creating a glossary for my course and I was wondering if anyone has considered incorporating a mouse-over feature (not sure what it's actually called) into the glossary module. See this site for an example.

Regards,

Fernando

Average of ratings: -
In reply to Fernando Oliveira

Re: Mouse-overs for the glossary?

by steve cody -

Thats a great idea...

Have you figured out how to do it with the glossary module?

In reply to steve cody

Re: Mouse-overs for the glossary?

by Jan Dierckx -
I am trying to implement the mouseovers from this discussion as a glossary filter.
However I run into some problems.
If someone more experienced could help me with that, I will post the mouseover filter here.

My problem:
To display it correctly, the glossary definition needs to be passed to the function format_text() (just like all other texts inside Moodle).
This function however also uses the filters to display things. It seems using format_text() inside a filter ends up in an endless loop.
Is there a way to use format_text() without passing its arguments through the filter?


In reply to Fernando Oliveira

Re: Mouse-overs for the glossary?

by N Hansen -
That's pretty cool. But what they are doing on that site is somewhat different-there is the mouseover for the short definition, and then clicking for a longer page. I really really like this idea but my only concern is it might bog down the page loading time perhaps? Since all the glossary definitions are included in the source code of the page.
In reply to N Hansen

Mouse-overs for the glossary? How about this...

by Jan Dierckx -
Newer browsers (don't know which exactly) offer the opportunity to send new information from the server without page reloading.
To try out some things I have implemented this in a new resource type. (as there are already way too much modules and blocks, but I think it might also work as a filter for the whole moodle site)
It works like this:
  • Students can doubleclick (or select) words they don't understand.
  • If the word is already in the glossary, the definition is shown.
  • If it is not, the student is invited to enter his definition in the glossary. As a starter some online references are shown.

You can have a look here... (login with username student1/password student1) Let me know if it works for your browser...

I see some advantages in making students double click words rather then having explanations popup automatically for them (or highlighting the words which are in the glossary)
  • it would be possible to log which words seem difficult to students (even if lookups in the glossary would be logged, there is no way of knowing which other words need explanation)
  • students learn how to use online references (look up names in one of the wikipedia, not in a dictionary)
  • it makes it easier for students to add their definition to the course's glossary by linking to a prefilled glossary form.
  • and it was easier for me to code it that way tongueout
In reply to Jan Dierckx

Re: Mouse-overs for the glossary? How about this...

by N Hansen -
I liked this idea.

Here's a couple observations I had:

I was trying this on dialup, and it seemed to be a bit slow.

After entering a new definition, it took me to the definition, rather than back to the page I was reading before, which seems like it would be preferable.

I was able to select just part of a word, and it opened up a new entry with just that part of the word, "degger." This might be ok to have when there are plural forms of a word and people just want to enter the singular form.


In reply to N Hansen

Re: Mouse-overs for the glossary? How about this...

by W Page -
Hi Jan and N!

Jan, This is a nice idea. I agree with you it cuts down on "refresh" time. Also the ability to search other reference tools and dictionaries is really cool!
  • I do agree with N that the "pop over" is slow [Both on FF and NS6 - on DSL].
  • Also, it would be better to return to the activity/resource after adding a definition in the glossary than the glossary itself. Or, maybe a return to the glossary would be OK if there was some type of link or button that would take a student back to the activity/resource they were originally at.
  • I also wonder if students or site participants should have the ability to determine if added words
    • should be automatically linked to glossary entries
    • should be case sensitive
    • should only undergo whole word matches

QUESTION:

Can the "pop overs" also handle images??

I hope this is helpful.

WP1


In reply to W Page

Re: Mouse-overs for the glossary? How about this...

by Jan Dierckx -
Popovers can handle images but be aware that it will even more slow down the loading of the popover.
The ability to make words autolink, casesensitiveness, etc... are handled by the glossary module. AFAIK there is no way to turn this off...
I agree there should be a way to take students automatically back to the text they were annotating. Unfortunately this also involves changes to the glossary module. I already had to make a small one (the one which prefills the concept formfield with the word a student selected) and I don't think there is a Moodle standard way of telling to another module which module it should return the student to (something like $fromdiscussion in the forum module)

In reply to Jan Dierckx

Re: Mouse-overs for the glossary? How about this...

by Hans de Zwart -

I have tried it at my school using IE6 and it works perfect for me. Not slow at all.

It is a great idea and certainly something I would turn on if it was a filter. You seem to have come a long way in PHP-programming in the last half year or so.

Time to get back to photoframe? tongueout

In reply to Hans de Zwart

Re: Mouse-overs for the glossary? How about this...

by Jan Dierckx -
Hans,
N,
WP,
Speed difference could be caused by the location from which you are viewing the site.The code is exactly the same as the code used for displaying a glossary but because the popup doesn't refresh the page (using xml-http-request) the student might have the idea that nothing is happening. I am trying to add code to change the mouse pointer to an hourglass pointer to assure the user something is really happening, but the javascript is rather difficult.

The easiest thing for me would be to package this thing as a small block (with just a small note: double click a word to search for it's meaning), this way one can install it in a simple way (instead of having to change lines of code / add snippets of codes in different files) . I believe Jon is working on the possibility to add blocks to all Moodle pages.

I could also turn this into a filter if I could just find a good way to include a javascript file on every page. Right now I could tell you to add it to the header file in your theme, but this is of course not the preferred way. Where do I place javascript files that need to be included in every page?