Glossary

Glossary Auto-Linking with MediaWiki Integration?

 
 
Picture of Dave Sherwin
Glossary Auto-Linking with MediaWiki Integration?
 

The Glossary currently auto-link to terms in the Moodle erfurt wiki.

We are planning to Integrate MediaWiki with Moodle, so I was wondering if there are settings to make the glossary terms auto-link with the MediaWiki?

Thanks…
…DBS

 
Average of ratings: -
Picture of Joseph Rézeau
Re: Glossary Auto-Linking with MediaWiki Integration?
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

Hi Dave,

Which "MediaWiki" do you mean? Is that a moodle 3rd party plugin? Which Moodle version are you using or planning to use in the near future?

Joseph

 
Average of ratings: -
Picture of Dave Sherwin
Re: Glossary Auto-Linking with MediaWiki Integration?
 

Hi Joseph,

Yes it would be the 3rd party wiki, mediawiki.org.  The same wiki that Moodle.org is using for it's own docs.moodle.org. We would like to make our mediawiki work seamlessly with our moodle. So that our glossary terms would auto-link with terms that would be in the 3rd party wiki.

Thanks...
...DBS

 
Average of ratings: -
Picture of Joseph Rézeau
Re: Glossary Auto-Linking with MediaWiki Integration?
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

Dave,

I'm afraid we have a terminology problem here. I asked you whether your wiki was a 3rd-party wiki plugin (such as can be found in the Modules & plugins database).

I'm afraid the wiki that moodle.org is using on docs.moodle.org is something totally different from a moodle site proper. What you want might be feasible, at the cost of some special development, but I would need more details. E.g. could you expand on "our glossary terms would auto-link with terms that would be in the 3rd party wiki"?

Joseph

 
Average of ratings: -
Picture of Dave Sherwin
Re: Glossary Auto-Linking with MediaWiki Integration?
 

Joseph - Sorry about the confussion with my terminology. Hopefully, I can be clearer if I try to give an example of what I want the glossary to auto-linking to do.

In our Moodle http://moodle.bismarckschools.org/ on the front page we have a main glossary "Common Core State Standards".  The standards are listed by their identifiers eg. ELA-05.RL.02 which auto-link in our Moodle. This will make it easy for when the teachers are creating courses they only have to put the Common Core Identifier that align to the lessons. That way the Common Core Standard will then open with the specific learning tasks needed for the students/parents and teachers to see what is being taught.

I now want to create a wiki to organize the Common Core with the wiki platform mediawiki <http://www.mediawiki.org/wiki/MediaWiki> like another school district Adams D50 Wiki. However since this wiki type is not an actual choice in activity types it would be seperate from Moodle.  However I was hoping that either the MediawikiSSO SSO Plugin or just the new functionality of Moodle 2.0 that maybe those glossary terms would open in this different wiki.

Occassionly, I will see some terms, auto-link in moodle.org and was wondering if those terms could also auto-link in the docs.moodle.org?

Thanks...
...DBS

 
Average of ratings: -
Frank Ralf
Re: Glossary Auto-Linking with MediaWiki Integration?
Group Documentation writers
Hi Dave,

Very interesting use case. Please have a look at Automate pronuciation guide using forvo or howjsay. This is a filter which "hijacks" Moodle glossary autolinks and re-directs them to any other URL of your choice.

hth
Frank
 
Average of ratings:Useful (2)
Picture of Joseph Rézeau
Re: Glossary Auto-Linking with MediaWiki Integration?
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

Thanks, Frank,

I expect a filter would be the answer to Dave's question.

Joseph

 
Average of ratings: -
Frank Ralf
Re: Glossary Auto-Linking with MediaWiki Integration?
Group Documentation writers
Here's screenshot of a proof of concept which links glossary terms to their respective entry on Moodle Docs.

You will have to change line 25 of the filter.php code to

'/(.+)\{searchterm\}(.*)/i',

(replacing the second "+" character by a "*" character to make the regex less rigid).

hth
Frank


You'll find the modified code at http://moodle.org/pluginfile.php/409/mod_forum/attachment/778423/forvo.zip

 
Average of ratings: -
Frank Ralf
Re: Glossary Auto-Linking with MediaWiki Integration?
Group Documentation writers
Here's a slightly updated version of the filter, more aptly re-named "Auto-link Hijacker" wink
I hope to find time to make this an official contributed plug-in soon.

Cheers,
Frank

PS
This version is for Moodle 1.9, haven't tested it with 2.0 yet. Might need some modifications.
 
Frank Ralf
Re: Glossary Auto-Linking with MediaWiki Integration?
Group Documentation writers
Ok, here's a first Moodle 2.0 version. It just needed renaming of the lang folder and some tweaking of the regex for replacing the URL because the glossary link pattern changed.

Frank
Picture of Dave Sherwin
Re: Glossary Auto-Linking with MediaWiki Integration?
 

Frank and Joesph - thanks for the information. This sounds exactly what we want to do is "hijack" the Moodle glossary autolinks and re-direct them to our seperate curriculum wiki. Just a couple of questions:

  • Will the regular Moodle glossary autolinks still function in Moodle?
  • Can we re-direct the Moodle glossary autolinks to two seperate URLs?

Thanks again...
...DBS

 
Average of ratings: -
Frank Ralf
Re: Glossary Auto-Linking with MediaWiki Integration?
Group Documentation writers
Hi Dave,

That's more of a mathematical question wink Any hyperlink (hijacked or not) can only have one destination. So the answer to both your questions is no, unfortunately.

However, you could try something really nifty and use the title attribute on the hyperlink to show the Moodle glossary definition when the mouse hovers over the link, while actually clicking the link would lead you to your external wiki. This might be quite confusing for your users, though.

hth
Frank



 
Average of ratings: -
Frank Ralf
Re: Glossary Auto-Linking with MediaWiki Integration?
Group Documentation writers
Here's a screenshot for illustrating that idea. It's just a hard-coded proof of concept.

Implementing this might be a bit tricky as the Moodle glossary data has to be fetched before being able to show it in the title attribute, e.g. using AJAX.

See Enhancing Tracker Links with Greasemonkey for an example of this technique.

hth
Frank

PS
The correct link to the title attribute documentation in the above post should have been http://reference.sitepoint.com/html/core-attributes/title

 
Average of ratings: -
Frank Ralf
Re: Glossary Auto-Linking with MediaWiki Integration?
Group Documentation writers
Come to think of it, of course you could keep the original link to the glossary and just add another link to your external wiki (making it actually two separate hyperlinks). That sounds more viable ...

Frank
 
Average of ratings: -
Frank Ralf
Re: Glossary Auto-Linking with MediaWiki Integration?
Group Documentation writers
JFTR

You'll find the most recent code at https://github.com/nakohdo/moodle-filter_autolinkhijacker This is still a work in progress, though.

Cheers,
Frank
 
Average of ratings: -
Frank Ralf
Re: Glossary Auto-Linking with MediaWiki Integration?
Group Documentation writers
Now also available from the Moodle plug-in database at http://moodle.org/mod/data/view.php?d=13&rid=4906&filter=1
 
Average of ratings: -