Remove link to glossary in pop-up window

Remove link to glossary in pop-up window

by Matt Bury -
Number of replies: 2
Picture of Plugin developers

Hi,

My question is regarding Moodle 1.9.17 and the Glossary module when automatic linking is activated, when users click on a link to a glossary entry and a pop-up window of the relevant glossary item appears.

I was wondering if it's possible to remove the link to the glossary instance that appears at the bottom right of the glossary item pop-up so that users can't navigate to the glossary instance itself.

Thanks in advance.

Average of ratings: -
In reply to Matt Bury

Re: Remove link to glossary in pop-up window

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

Hi Matt,

When I used to use Moodle 1.9 I always thought that the glossary popup window was un-necessarily cluttered with useless elements, in its header and footer sections. The new glossary popup window in Moodle 2 has gone to the extreme inverse.

Anyway, you can easily remove the links by removing the footer section of the popup window. In file <yourmoodle>mod/glossary/lib.php, simply remove or comment out lines 779-781:

if (isset($entry->footer)) {   // Unparsed footer info
        $text .= $entry->footer;
    }

Joseph

PS If you are also interested in removing the header in that popup, tell me.

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

Re: Remove link to glossary in pop-up window

by Matt Bury -
Picture of Plugin developers

Thanks Joseph,

That's good to know. So I guess that there isn't a built-in setting anywhere to do it without hacking the code. I can add a parameter to the settings.php file and in the relevant functions that print the pop-ups. I'm surprised that nobody has added this option to the core code.

Thanks again for your help.