If anyone is interested, here's how I did it:
- I used the jQuery library as it is lightweight and provides smaller syntax for selecting DOM elements than others, I included my copy of the library within moodle/theme/yourtheme/header.html (you could include it only in the specific file but I'm using jQuery for further development so I stuck it in the header).
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
- Create a file to house the script that removes the glossary links. I called mine "disableglossary.js" and placed it in /moodle/lib/yourlibs/
This script simply iterates over the a elements with .glossary and .autolink classes, replacing the links with the text content inside.$(document).ready(function() { // when the dom is ready
$("a.glossary, a.autolink").each(function(i, term) { // replace linked terms with content
$(term).replaceWith($(term).html());
});
}); - I included the file within /moodle/mod/quiz/attempt.php near the bottom:
include("../../lib/yourlib/disableglossary.js");
Note: If you're interested you can test the script from #2 by opening firebug and executing it on a quiz attempt in which you have glossary terms. You'll see the terms get removed live.
Hope this is of some use to someone