Extension:MoodleGlossary

Problem Statement
We have a Moodle site and a Mediawiki-powered wiki. People create glossary entries in Moodle and articles in wiki. If the words in those articles are present in Moodle Glossary, it would be nice to highlight them and provide the definition on mouseover.

This extension does that and it's based on the Glossary Extension created by Benjamin Kahn.

Major Update for MW 1.11
A minor change is done in the extension to make it compatible with MW 1.11 (which necessiates the functions to retun a value). I'm replacing the old code with the new one. This is tested with MW 1.9.3, 1.10.2 and 1.11.0

Installation
1. Create the file:

extensions/MoodleGlossary.php
2. Add the following to the end of: (right above the "?>" at the end)

LocalSettings.php
require_once("$IP/extensions/MoodleGlossary.php"); $wgMoodleTablePrefix='mdl_'; //Your Moodle table prefix. $wgMoodleDBServer='localhost'; //YOUR_DB_SERVER $wgMoodleDBName='YOUR_MOODLE_DATABASE_NAME'; $wgMoodleDBUser='YOUR_DB_USER_NAME'; $wgMoodleDBPassword='YOUR_DB_PASSWORD';

Known issues

 * 1) The code is now not respecting the wiki links. i.e. if you have a wiki word in the Glossary, that will be highlighted and displayed with the brackets as wiki word.


 * 1) This extension defines (unintentionally?) a &lt;tooltip&gt; tag and may conflict with Extension:Tooltip.


 * Resolved now.
 * --Jackeapen 12:27, 25 September 2007 (UTC)

Disclaimer
I'm not an expert programmer. So i'm unaware of the security holes in this. So please try at your own risk. I'm using this in a non-threatening intranet environment. So not much bothered about SQL injection vulnerabilities or similar stuff :) . Feel free to modify the code in the spirit of open source.