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.
- ASP Server-Though the LMS were hosted on PHP servers, we have to include a small code build in ASP in the course.
- PHP Server-Client LMS and the courseware developer were using PHP server.
- ASP Script-To make the course compatible to cross LMS, small code build in ASP was integrated.
- LMS-to upload the AICC files.
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.
A 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:
ASP Script for Lectora Cross LMS
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
‘ Build the post body string’
postbody = “command=” + command + “&version=” + version + “&session_id=” + session_id
if aicc_data <> “” then
postbody = postbody + “&aicc_data=” + aicc_data
‘ 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:’
‘Send back the response’
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”
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);
Subscribe to Our Blogs
Get CommLab's latest eLearning articles straight to your inbox. Enter your email address below: