Monday, November 1, 2010

Display RSS feeds from Moodle Glossary to a prim in Opensim

I have modified Cnn-rss-feed.lsl which was contributed by Wietse Cassini (but is not credited in the scripts' header) so as to display Moodle glossary RSS feeds on a prim in OpenSim.

Moodle Glossary RSS feed displayed on a single prim in OpenSim


The script was tested on OpenSim 0.7.0.2 and Moodle 1.9.9+ (Build: 20101006). It requires AllowOSFunctions to be enabled in OpenSim.ini. Moodle settings are default.

You need to change the rss url on the script. And also I set llSetTimerEvent to 1 second during testing. Please adjust according to the level of activity in your Moodle site. Generally it should be longer.

One problem I encountered is that the Moodle RSS feed for glossary contains ISO-8859-1 characters (e.g.   , &amp:, etc.) which garbage up the prim texture. It also results in the link to not work in the viewer browser. So the code cleans up the rss feed. But the drawback is that this is hardcoded, i.e. if the format of the rss changes then the display will be messed up. It appears that the Moodle 1.9.9 rss format is different from older versions. I have included another script in the zipped file below that will deal with that.

I'm going to look into doing another for Moodle Forums feed.  Enjoy :-).

Downloads:

http://www.mediafire.com/file/3hc5d9q2wgqyhwq/mdl1.99_gloss_rss_feed.iar (121.09 KB)

http://www.mediafire.com/file/q3to35cafqp96v4/mdl_gloss_rss_feed.zip (4.23 KB) - this has two scripts, one for Moodle 1.9.9+ version and another for older versions. Check the RSS file format for deleted texts.




No comments:

 
Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.