Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Intro

indent

This is a manual integration example that would hopefully help you to create an integration with LAMS quickly.

First, I created an integration server in LAMS (login as sysadmin and then go to the syadmin menu) with these settings:

Center

Obviously, change the URLS according to yours.

Open author

indent

Creates a user, the course, adds the user as author into it and then redirects the user directly to the Author UI

Prepare hash: [ts + uid + method + serverID + serverKey]
sha1(1roger01authorlmslms) = 2694cbe4a627b9798824453e65d0f13f8dc1f5e3

URL: http://lams-server/lams/LoginRequest?uid=roger01&ts=1&sid=lms&method=author&courseid=123&firstName=Roger&lastName=Moore&email=roger@gmail.com&country=AU&lang=en&hash=2694cbe4a627b9798824453e65d0f13f8dc1f5e3

Result:
open LAMS author, create a sequence called "Some sequence" and saved

Get learning designs for roger01

indent

Prepare hash: [timestamp + username + serverID + serverKey]

sha1(1roger01lmslms) = a8c722c31ac21e719145d15febf6df246ea16d16

URL:

http://lams-server/lams/services/xml/LearningDesignRepository?username=roger01&datetime=1&serverId=lms&courseId=123&courseName=lola&mode=2&firstName=Roger&lastName=Moore&email=roger@gmail.com&country=AU&lang=en&hashValue=a8c722c31ac21e719145d15febf6df246ea16d16

Result:

Shows me all the lessons available for Roger to create lessons. You can see "Some sequence" within Roger Moore's personal folder.

Code Block
languagehtml/xml
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>
<Folder name="My Workspace">
   <Folder name="Roger Moore">
      <LearningDesign name="Some sequence" resourceId="2173" />
   </Folder>
   <Folder name="My Courses">
      <Folder name="lms_lola">
         <Folder name="lms_lola Run Sequences" />
      </Folder>
   </Folder>
   <Folder name="Public Folder">
      <LearningDesign name="11" resourceId="264" />
      <LearningDesign name="bbb" resourceId="318" />
      <LearningDesign name="map_sequence" resourceId="2169" />
      <LearningDesign name="map_sequence_2" resourceId="2170" />
      <LearningDesign name="map_sequence_3" resourceId="2171" />
      <LearningDesign name="multiple leaders" resourceId="2065" />
      <LearningDesign name="Sample Activity" resourceId="2151" />
      <LearningDesign name="Test1" resourceId="1482" />
      <LearningDesign name="Τηλεδιάσεκεψη" resourceId="324" />
      <Folder name="ABC">
         <LearningDesign name="123" resourceId="203" />
         <LearningDesign name="44" resourceId="205" />
      </Folder>
   </Folder>
</Folder>

Start a lesson

indent

Prepare hash: [timestamp + username + serverID + serverKey]

sha1(1roger01lmslms) = a8c722c31ac21e719145d15febf6df246ea16d16

URL:

http://lams-server/lams/services/xml/LessonManager?username=roger01&serverId=lms&datetime=1&courseId=123&ldId=2173&method=start&title=Lesson01&desc=somedesc&hashValue=a8c722c31ac21e719145d15febf6df246ea16d16

Returns:

The lessonId ready to be used

Code Block
languagehtml/xml
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>
<Lesson lessonId="1537" />

Jump into monitor to this lesson

indent

Prepare hash:

sha1(1roger01monitorlmslms) = 81079e7430329662ba19050e6d5d80395a7fab53

URL:

http://lams-server/lams/LoginRequest?uid=roger01&ts=1&sid=lms&method=monitor&courseid=123&firstName=Roger&lastName=Moore&email=roger@gmail.com&country=AU&lang=en&hash=81079e7430329662ba19050e6d5d80395a7fab53&lsid=1537

Result:

Opens Monitor UI for that lesson

Jump into this lesson as learner (using learnerStrictAuth method)

indent

Roger goes into the lesson as learner. Note that learnerStrictAuth is only available for LAMS 2.5+

Prepare hash: [ts + uid + method + lsId +serverID + serverKey]

sha1(1roger01learnerstrictauth1537lmslms) = 109cf9886c6fcb926a29a6d10d217de7c524016d

URL:

http://lams-server/lams/LoginRequest?uid=roger01&ts=1&sid=lms&method=learnerStrictAuth&courseid=123&firstName=Roger&lastName=Moore&email=roger@gmail.com&country=AU&lang=en&hash=109cf9886c6fcb926a29a6d10d217de7c524016d&lsid=1537

Result:

Open Learner UI

Jump into this lesson as a new learner (using learner method)

indent

This will create the user, added to the course and also the lesson as leaner. Note that this method works with 2.4 and 2.5+

Prepare hash: [ts + uid + method +serverID + serverKey]

sha1(1daniel007learnerlmslms) = c86882105c7db67e438be44919e6113fa17b4596

URL:

http://lams-server/lams/LoginRequest?uid=daniel007&ts=1&sid=lms&method=learnerStrictAuth&courseid=123&firstName=Daniel&lastName=Craig&email=daniel@gmail.com&country=AU&lang=en&hash=c86882105c7db67e438be44919e6113fa17b4596&lsid=1537

Result:

Open Learner UI, creates the user, adds it to the course and lesson just as leaner.

Jump in this lesson as a new Monitor (just for kicks (smile)

indent

Prepare hash:

sha1(1sean007monitor1537lmslms) = bbbf4b5f8b63291ee10c32d7e9181024d2326fa7

URL:

http://lams-server/lams/LoginRequest?uid=sean007&ts=1&sid=lms&method=monitor&courseid=123&firstName=Sean&lastName=Connery&email=sean@gmail.com&country=AU&lang=en&hash=bbbf4b5f8b63291ee10c32d7e9181024d2326fa7&lsid=1537

Result:

Opens Monitor UI. You can see on the sequence tab that there's two students (Roger and Daniel)

I think by now you pretty much get the idea how the integration works and how to get all the other API calls to work.

Quick tips

indent
  • Whenever possible, instead of using HTTP GET, use POST.
  • If you are using LAMS 2.5+, when using the login request to login learners, make sure you use learnerStrictAuth. The learner method will eventually be deprecated.
  • Check out the Time to live and Get LAMS Server time in LAMS and 3rd Party App Integration APIs. This will prevent URL hijacking, specially if you are using HTTP GET.

If you've got any further questions, please post them in the Tech Forums in the LAMS Community.