LAMS Integrations
LAMS 2.0 has been integrated with:
In this document, we present a technical overview on how these integrations are implemented. Although each 3rd party applications are different (even they are in different programming languages) the principles that we follow are essentially the same.
LAMS 2.0 Side
The following diagrams give the overview and the details of the LAMS 2.x/3rd party app SingleSignOn implementation:


User Information
Every time a LMS user attempts to access LAMS, LAMS will check to see if the user exists in its database. If the user has not been created in LAMS, LAMS will make a call to the external application to retrieve user information and create the user on the fly. Therefore you will need to set up a user information servlet on the LMS side that will return user information to LAMS.
Request format
The user information url is defined in the LAMS System Administration page and contains three parameters: username, timestamp and hash.
For example, the url for moodle is given by:
http://localhost/moodle/mod/lamstwo/userinfo.php?ts=%timestamp%&un=%username%&hs=%hash%
The hash value is generated using the SHA1 algorithm on the following (all in lower case)
[ timestamp + username + serverID + serverKey ]
Response Format
The response from the external application is a comma seperated list of 14 values
<Title>,<First name>,<Last name>,<Address>,<City>,<State>,<Postcode>,<Country>,<Day time number>,<Mobile number>,<Fax number>,<Email>,<Locale language>,<Locale country>
External calls to LAMS
Login Requests
Request for author, learner and monitor are directed through the LoginRequest servlet. For example:
http://localhost/lams/LoginRequest?....
The parameters are:
- uid - the username on the external system
- method - either author, monitor or learner
- ts - timestamp
- sid - serverID
- hash - SHA1 hash of [ts + uid + method + serverID + serverKey] (Note: all lower case)
- courseid - the id of the course from the LMS
- country - country component of locale
- lang - language component of locale
- requestSrc - string to identify who is making the call, this is only used in authoring to display on the close button.
- notifyCloseURL - callback URL to refresh the page after a sequences has been added.
- lsid - This is used for monitor and learner to tell LAMS the learning session id you want to open.
Getting Learning Designs
You will need to get a List of existing learning designs so the LMS user can choose which ones they wish to start.
You can get a list of learning designs by making a request to the LearningDesignRepository servlet on the LAMS side. For example:
http://localhost/lams/services/xml/LearningDesignRepository?
The parameters are:
- username - the username of the current user
- datetime - timestamp
- serverId - the server id
- hashValue - SHA1 hash of [timestamp + username + serverID + serverKey] (Note: all lower case)
- courseId - the id of the course from the LMS
- country - country component of locale
- lang - language component of locale
- mode - "1" returns all learning designs being monitored by the current user, "2" returns all learning designs authored by the user
Starting, Stopping or Scheduling a Lesson
To start, stop or schedule a lesson in LAMS you need request another servlet:
http://localhost/lams/services/xml/LessonManager?
The parameters are:
- username - the username of the current user
- serverId - the server id
- datetime - timestamp
- hashValue - SHA1 hash of [timestamp + username + serverID + serverKey] (Note: all lower case)
- courseId - the id of the course from the LMS
- country - country component of locale
- lang - language component of locale
- ldId - the id of the learning design (for starting or scheduling)
- lsId - the id of the learning session (fro stopping)
- method - "start", "stop" or "schedule"
- title - the title of the lesson, for starting and scheduling
- desc - the description of the lesson, for starting and scheduling
This servlet returns an xml response depending on the method ('start', 'schedule' or 'stop').
- Start - An xml node called "Lesson" with an attribute "lessonId" which contains the learning session id.
- Schedule - An xml node called "Lesson" with an attribute "lessonId" which contains the learning session id.
- Stop - An xml node called "Lesson" with an attribute "deleted" which informs you whether the lesson was successfully deleted in LAMS
3rd party application modules
Moodle (integrated with LAMS 1.0.2 and LAMS 2.0)
mod.html: a form to setup/update a module instance
version.php: defines some meta-info and provides upgrading code
icon.gif: a 16x16 icon for the module
db/mysql.sql: an SQL dump of all the required db tables and data
index.php: a page to list all instances in a course
view.php: a page to view a particular instance
userinfo.php: a script to return user data to lams server
lib.php: any/all functions defined by the module should be in here.
constants should be defined using MODULENAME_xxxxxx
functions should be defined using modulename_xxxxxx
There are a number of standard functions:
modulename_add_instance()
modulename_update_instance()
modulename_delete_instance()
modulename_user_complete()
modulename_user_outline()
modulename_cron()
modulename_print_recent_activity()
- data model

mdl_config stores lams configuration info such as server_url, server_id and server_key.
mdl_lamstwo stores lams module instances (moodle activity). It has a foreign key relationship to mdl_course.
use nusoap
rpc style
implemented in lib.php
as "country" and "lang" columns in mdl_user table
or "country" and "lang" properties in user object
a customized tigra tree menu used to display workspace folders and sequences
Yahoo! calendar UI widget used for user to pick a date to schedule a LAMS lesson
WebCT 4 (LAMS@MQ, integrated with LAMS 1.0.2)
lams
|___sql
| |__[DDLs]
|___[perl programs]
templates
|___lams
|__entry.html (index page containing links to main features)
|__mod.html (page to create lams learning session)
|__groupingman.html (page to manage grouping and groups)
|__sessionman.html (page to manage created lams learning sessions)
|__groups.html (page for teacher to select a group to enter)
- data model

enrollmentsettings and datafeed_students are webct tables, while others are lams specific ones.
use SOAP:Lite
implemented in list.pl (getAllLearningDesigns)
genurl.pl (createLearningSession)
rmsession.pl (deleteLearningSession)
None
detailed comments in code