Linker Script

From SLIS Second Life Wiki

Jump to: navigation, search

A "linker script" is any script in the Sloodle module (i.e. installed into Moodle) which allows objects in Second Life to communicate with the Moodle site. Its purpose is two-way: getting data in, and getting data out.


Getting data into Moodle

This first task of a linker script to put data into Moodle. LSL scripts cannot fill-in web-forms like a human user would do, but it can do something similar by sending HTTP parameters (usually using the GET or POST method). We need to have scripts available which will accept those parameters, process them, and hand them over to Moodle (usually to be stored in the database).

For example, every time the Sloodle WebIntercom 'hears' somebody chatting a message in Second Life, it will send the message, along with the avatar's name and/or UUID, to the WebIntercom linker script. That linker will then process the parameters to find out which Moodle user the avatar represents, and it will put all of that information into the "chat_messages" table in the Moodle database. This processing in the linker script makes the WebIntercom compatible with the Moodle chatrooms.


Getting data from Moodle

Typically, a user will view Moodle through their web-browser (such as Internet Explore, or Mozilla Firefox). However, the usual Moodle web-pages are too complex and too big for LSL scripts in Second Life to handle. As such, all the irrelevant data needs to be removed, and everything else needs to be formatted carefully in a way that our LSL scripts can understand (see the Sloodle communications specification for more information on the format). HTTP parameters are sometimes used for this too, so that the LSL script can request data in the exact format that it is needed.

For example, the enrolment linker script provides various ways to query which courses are available. HTTP parameters can be provided to limit the query to a specific user, and/or to a specific category of courses. The course data is then formatted carefully to contain only the minimum of what is needed. There is no standard Moodle page which will do this.


See Also


This page is part of the Sloodle documentation
SloodleDocs Home | User Documentation | Administrator Documentation | Developer Documentation | Sloodle Wiki Home
Personal tools