Train the Trainer eCourse: Microlearning Nuggets
Share Twitter Facebook LinkedIn Google+

How to make Lectora Courses Compatible to Cross LMS?

Written By Sudheer Panchumarthi

How to make Lectora Courses Compatible to Cross LMS?

Recently we were working on an assignment where we have to share the Lectora courses from a file server that will be hosted by the course provider, and the courses will be accessible through the client’s LMS using the AICC files (AU files).

A twist in this assignment is that we have to capture the data of the users who are accessing the course on the courseware provider side. That is, the course needs to be compatible to cross domain and cross LMS.

I will walk you through the steps created to make the course work as per the client’s requirement.

Pre-Requisites

  1. ASP Server-Though the LMS were hosted on PHP servers, we have to include a small code build in ASP in the course.
  2. PHP Server-Client LMS and the courseware developer were using PHP server.
  3. ASP Script-To make the course compatible to cross LMS, small code build in ASP was integrated.
  4. LMS-to upload the AICC files.

Lectora Cross-Domains Structure

Explanation for the above Framework

  • On the client side, only the 4 AICC files will be uploaded on the LMS.
  • From the LMS, a request for accessing the course will be sent to the File Server.
  • Course will call the ASP script to develop a connection between the client LMS and the database on course provider. ASP script is responsible for sending data to the client LMS and the course provider database.

Crossdomain.xml

cross-domain policy file is an XML document that grants a web client to handle data across multiple domains. When a client hosts content from a particular source domain and that content makes requests directed towards a domain other than its own, the remote domain would need to host a cross-domain policy file that grants access to the source domain, allowing the client to continue with the transaction.

(The LMS Server needs to have this file to access the Content Server, where it provides the ability to manually and/or automatically access and/or transfer between two or more differing security domains). Policy files grants read access to data as well as permit a client to include custom headers in cross-domain requests.

The crossdomain.xml file needs to be placed on the root folder of the server. Here is the sample code:

<cross-domain-policy>

<allow-access-from domain=”www.example.com”/>

</cross-domain-policy>

ASP Script for Lectora Cross LMS

Using the following script it allows you to use either an unsigned “Title Manager Applet” or a “JavaScript Title Manager” to perform cross-domain communications.

Save the following script in a “sample.asp” file on the ASP server:

[ASP Script: sample.asp]

<%@ %>

<%

Response.Buffer = True

Dim objXMLHTTP, xml, command, aicc_loc, version, session_id, aicc_data, postbody

aicc_loc=Request.form(“aicc_loc”)

command=Request.form(“command”)

version=Request.form(“version”)

session_id=Request.form(“session_id”)

aicc_data=Request.form(“aicc_data”)

‘ Build the post body string’

postbody = “command=” + command + “&version=” + version + “&session_id=” + session_id

if aicc_data <> “” then

postbody = postbody + “&aicc_data=” + aicc_data

end if

‘ Create an xmlhttp object:’

Set xml = Server.CreateObject(“Microsoft.XMLHTTP”)

‘ Or, for version 3.0 of XMLHTTP, use:’

‘ Set xml = Server.CreateObject(“MSXML2.ServerXMLHTTP”)’

‘ Opens the connection to the remote server.’

xml.Open “POST”, aicc_loc, False

‘Actually Sends the request and returns the data:’

xml.Send postbody

‘Send back the response’

Response.Write xml.responseText

Set xml = Nothing

/*

The below lines of code is to track the “course data” on courseware provider side along with LMS on client side, we need to define the “xml2” variable at the top of the script and add the following code at the end of the script. The script will post the aicc_data to tracking file where it stores the data in a desired format.

Set xml2 = Server.CreateObject(“Microsoft.XMLHTTP”)

xml2.Open “POST”, “Enter your tracking file Path”, False

xml2.setRequestHeader “Content-Type”, “application/x-www-form-urlencoded”

xml2.Send postbody

Response.Write xml2.responseText

Set xml2 = Nothing

*/

%>

Steps to perform in Lectora

  • Add the required “Student Data” in the lectora course before publishing the course.
  • Go to “Publish” and click on “Publishing to AICC/Web-Based”
  • Once it compiles without errors. Click on the “Publish” button.
  • From the “AICC Options” tab,
    • Uncheck the option “The published course will reside on the same network server as the LMS”.
    • This enables the cross-domain redirector. Enter the URL where the “sample.asp” file is located. This will work as an API to communicate between the cross-domains.
  • Check the other checkboxes based on your requirement.
  • Click on “OK” button.
  • Add the student data to the aicc_data in the file “trivantis-titlemgr-aicc.js”. Here are the list of changes to be performed in the code:

Function: TMPr.PutParam = function (grp, param)

After the line,

cparm.add (“\r\nlesson_status=” + this.strAiccLS);

Add the following code,

‘To track “student name”:

cparm.add (“\r\nstudent_name=” + this.strAiccSN);

‘To track “student id”:

cparm.add (“\r\nstudent_id=” + this. strAiccST);

Click Here To Get 30 Minutes Course

View E-book on How to Harness Moodle LMS Efficiently to Meet Your Training Needs

Share
Topics:

Subscribe to Our Blogs

Get CommLab's latest eLearning articles straight to your inbox. Enter your email address below:

 
eLearning Learning
  • Looking through google I came across this site. I really liked and I tried to persuade friends to also here looked into.

  • Truly inspirational, just like, “No enterprise is more likely to succeed than one concealed from the enemy until it is ripe for execution..”.