LM-Light: A New E-Learning Standard
About LM-Light Courses Learning Management Systems More Info

Introduction

The LM-Light Standard
 - Course Structure
 - LM-Light Tags
 - Starting a Course
 - On Each Page
 - Exiting a Course
 - Starting a Test
 - Saving a Test Score
 - Course Completion
 - Configuration File

Course Development
 - Development Environment
 - Using a Text Editor
 - Including Tests
 - Using PowerPoint
    - Option 1 - PDF
    - Option 2 - GIF/JPG
    - Option 3 - HTML
 - Using Lectora
 - Download Tools
 - Diagnosing Problems

Home Page

Course Development : Using Lectora

Lectora is a powerful authoring tool for web-based training that's widely used in mid-sized to larger enterprises. The following note describes how it can easily be used to develop courses in LM-Light format.

Note: If you'd like to look at the files as you follow through this technical note, you can download them all as a 44kB zip file from [this link]. You can also use the .awt file included in the zip file to cut and paste elements to the course that you're working on.

warning

Important - Before starting, make sure that you have a functional Lectora course by compiliing it as HTML and running it from your desktop. If your Lectora course isn't working correctly, it can be difficult to see if you have a problem with the LM-Light tags.

The Course

We're going to look at a very simple course that consists of 3 pages, and a 2 question multiple-choice mastery test.

The Initialization Tag

We're going to start by inserting the initialization tag (require "LM-Light.php";) on every page in the title. This is a simple operation due to the way that Lectora allows objects to be inherited. Start by selecting the title object - in this case "'Demo01' - and then click on the 'Add External HTML' button on the top bar. This will pop open the 'External HTML Object Properties'.

Choose the 'Top of File Scripting' object type, and enter the following text into the 'Custom HTML' field.

<?php require "LM-Light.php"; ?>

This code will now be inserted at the top of every page that Lectora generates.

The Bookmark Tag

We follow the same basic procedure to insert the bookmarking tag. Start by selecting the initialization tag that we just added to the title. By selcting this object when we insert the bookmark tag, we make sure that the bookmark tag follows after the initialization tag. Then click on the 'Add External HTML' button on the top bar.

Once again, we choose the 'Top of File Scripting' object type, and then enter the following text into the 'Custom HTML' field.

<?php LMsetBookmark(); ?>

This code will now be inserted at the top of every page that Lectora generates imediately after the initialization tag. However, we have one more thing to do. We don't want to bookmark the test/assessment questions, or the assessment result pages. So, double-click on the 'Final Assessment' object - the 'Test Properties' dialog should open as shown.

Choose the 'Inherit' tab, and move the LMsetBookmark into the right hand column. Any pages within the 'Final Assessment' section will no longer have the 'LMsetBookmark()' code inserted in the page when the course is compiled. Repeat the process for the 'Assessment Results' object.

The Register Test Attempt Tag

We want to add a register test attempt tag to the first page of the assessment test. We follow exactly the same procedure as above starting with selecting the 'Test Page 1' object and clicking on the 'Add External HTML' button on the top bar. In the 'External HTML Object Properties' dialog, we choose the 'Top of File Scripting' object type, and enter the following text into the 'Custom HTML' field.

<?php LMregisterTestAttempt(); ?>

The Course Complete Tag

When a student arrives at the 'Assessment Passed' page, we want to flag the course as complete. Once again, we use an 'External HTML Object' to do this exactly as before. We start by selecting the 'Assessment Passed' object, click on the 'Add External HTML' button on the top bar, and then in the 'External HTML Object Properties' dialog, we choose the 'Top of File Scripting' object type, and enter the following text into the 'Custom HTML' field.

<?php LMsetCourseComplete(); ?>

Transferring the Test Score

The last part of the development is slightly more complicated. We want to transfer the test score from the Lectora-generated course to the LMS when the student reaches either the assessment passed, or the assessment failed pages. We're going to do this by using Lectora's 'Submit Form' action. Start by selecting the 'Assessment Results' object so that that actions are inherited by both the 'Assessment Passed' and the 'Assessment Failed' page. Then click on the 'Form' button on the top bar.

In the 'Form Properties' dialog, specify that you're going to submit the form to a 'CGI' program using the post method, and enter the name of the file that will handle the submission (we'll create that file in a few minutes). Before you leave the 'Form Properties' dialog, choose the 'Parameters' tab.

The LM-Light library is expecting to see a variable called 'LMtestScore' being passed across. However, Lectora stores the test score in a variable called [the name of your test]_Score - in this case, Final_Assessment_Score. So we can use the 'Parameters' tab to transfer the value from the Lectora variable (Final_Assessment_Score) to a variable that LM-Light can understand (LMtestScore) as shown in the figure above.

We now need to make the course submit the form when one of the assessment results pages is viewed. To do this, we select the 'Assessment Results' object so that that actions are inherited by both the 'Assessment Passed' and the 'Assessment Failed' page. Then we click on the 'Add Action' button on the top bar.

We set the action to submit the form that we've just created when the course displays either the 'Assessment Failed' or 'Assessment Passed' pages. Now we simply need to create the HTML file that will handle the form submission. To do this, go to the 'extern' subdirectory/folder in the course folder, and create a blank file called 'setScore.html'. Then, using a text editor, enter the following code into the setScore.html file, and save it.

<?php require "LM-Light.php"; ?>
<?php LMsetTestScore(); ?>
<html>
<head>
<title></title>
</head>
<body>

</body>
</html>

Finally, we need to include the HTML file into the course when it's compiled. Select the top level object, double click on it, and choose the 'Additional Files' tab. find the HTML file that you've just created, and add it to the list. This file will now be included in the course when you compile it.

Compiling The Course

Lectora has a variety of formats in which it can compile a course. Here, we choose the simplest - 'Publish to HTML' - and also take advantage of the way that Lectora can automatically create a zip file for transfer to the LMS.

Summary of Steps

Here's a short summary of the steps involved in the process.

  1. Initialization
    • Insert the initialization tag (require "LM-Light.php";) as 'Top of the File Scripting' using an External HTML Object at the highest level of the course.

  2. Bookmarking
    • Insert the bookmarking tag (LMsetBookmark();) as 'Top of the File Scripting' using an External HTML Object immediately after the initialization tag.
    • Suppress inheritance of the LMsetBookmark() tag where bookmarking is not required (typically in tests, and on pages dealing with test results).

  3. Test Attempt Registration
    • Add a test attempt registration tag (LMregisterTestAttempt();) to the first question in the test as 'Top of the File Scripting' using an External HTML Object.

  4. Course Completion
    • Add the course completion tag (LMsetCourseComplete();) to the assessment passed page as 'Top of the File Scripting' using an External HTML Object.

  5. Transferring the Test Score
    • Add a Lectora 'Form' object to the chapter containing the assessment passed and assessment failed pages.
    • Set up the form object to point to an HTML file.
    • Set up the form parameters to transfer the Lectora test score into the variable expected by LM-Light (LMtestScore).
    • Create the HTML file used to transfer the test score.
    • Include the HTML file in the course.

  6. Compiling the Course
    • Publish to HTML - optionally using the 'Store Published Title in a Zip File' option.

Final Thoughts

Although the steps described above may seem a little long-winded, you'll quickly find that Lectora allows you to do a lot of cutting and pasting. So, once you 've set up one course in this way, it's a fairly simple matter to cut and paste the various objects from course-to-course thus saving you a lot of work.

 

Copyright & Licensing Information
Unless otherwise stated, material in this website is Copyright, Addison Robson LLC. Use of the website content for commercial and non-commercial purposes is permitted under Creative Commons licenses. For more information, please consult [this page] or use [this form] to contact us.
Creative Commons License