Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-18213

suggested hack to display glossary definitions as tooltip in resources

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9.4, 2.4
    • Fix Version/s: DEV backlog
    • Component/s: Glossary
    • Labels:
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_24_STABLE

      Description

      Version 1.3 timestamp 10:39 11/02/2009

      Installation (for moodle 1.9.4)

      WARNING: this hack is only intended for people who know what they are doing, at own risk, not to be done on a production server but only on a test server...

      copy file filter.php instead of existing moodle/mod/glossary/filter.php
      copy folder tooltip to you moodle/mod/glossary/formats
      copy file glossary.php to your moodledata/lang/en_utf8_local

      NOTE.- If you know how to do it and prefer that solution you can patch your existing filter.php by using patch file glossarypatchjr.txt.

      HOW TO USE

      For the Gloossary that you wish to display its definitions in a tooltip instead of a link to a popup window as in standard moodle behavior, go to Update this glossary and in Display format select Tooltip definitions display.

      WARNING

      1- Because this display system puts into memory not only the Concepts but also the whole definitions, you should not use the Tooltip setting for longish glossaries nor for longish definitions, other wise you might notice a slowing-down of your moodle site. Please experiment.

      2- In MSIE 6 and 7 and in FireFox 3 the tooltip definitions are completely displayed, but they are truncated in FireFox 2.

      3- When you install this hack you can modify the filter.php file which gives you a choice between 2 kinds of "tooltip display".
      a) simple "TITLE" tooltip display
      b) more elaborated tooltip display based on the OVERLIB library (standard in Moodle distributions).
      The advantage of using the OVERLIB library is that it displays everything in the definition: text formatting, images, etc. However it may refuse to display some "complex" or longish definitions; again, you'll have to experiment and select the type which is best suited to your needs.

      If moodlers wish so, I might provide for 2 different formats, to provide easy choice for end-user between display a) and b).

      To switch between the 2 kinds of tooltip displays, in file filter.php locate lines 180-190 and comment out the type you do not want to use. Note that the filter.php file (and the patch file) are distributed with the simple TITLE tooltip enabled by default.

      WARNING

      If you "play" with the settings you will have to completely empty your moodle cache to see the new display take effetc!!!

      post remarks here or contact moodle@rezeau.org

        Attachments

        1. rezeau_glossary.zip
          9 kB
        2. screenshot-1.jpg
          screenshot-1.jpg
          15 kB
        3. screenshot-2.jpg
          screenshot-2.jpg
          29 kB
        4. screenshot-3 .jpg
          screenshot-3 .jpg
          92 kB

          Activity

            People

            Assignee:
            rezeau Joseph Rézeau
            Reporter:
            rezeau Joseph Rézeau
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            19 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated: