Question Text Reporting in an LMS

Modifying a SCORM 2004 module to report the text of a question, and more, inside the ADP LMS.
The Problem
While using the ADP LMS, a specific report of user interaction within a SCORM 2004 module would display the correct answer for a quiz question, the student's answer, whether or not the answer was correct, and the weight of the question. However, in the column "Question ID," the LMS was displaying Articulate Storyline information of "Scene # and Slide #" and not displaying the text of the question. Also, the Course Objective Column was displaying the name of the course in every row, which was redundant because the name of the Learning Module was clearly visible in the report info box above the data generated by the learners.

A more ideal solution would be for a report would be to show both the text of the question AND the Storyline Project information.
The Solution
Modifying the "scormdriver.js" JavaScript file AFTER publishing, but BEFORE zipping the SCORM module and uploading it to the LMS, allowed the LMS to report the desired data.
Responsibilities and Tools Used
  • Responsibilities: Find a way to get the LMS to report the question text, along with the Storyline Scene and Slide numbers from the project
  • Tools Used: Articulate Storyline, WordPad, Visual Studio

What This Solution Changes

  • Replaces the Articulate Storyline Scene and Slide numbers normally displayed in the Question ID column with the text of the question from a quiz question slide (Note: The quiz question text needs to be in a Graded Question slide's Question stem box in Storyline and the SCORM module needs to be published with a SCORM 2004 standard.)
  • Replaces the redundant name of the course normally displayed in the Course Objective column with the Articulate Storyline Scene and Slide number from the Storyline project

How to Do It Yourself

Modify the Published JavaScript Code

Searching online, I found some JavaScript code written by Sam Hammond in one of the Storyline forums. After modifying his script and testing it, I have the final process to achieve what I wanted.

  1. Once the e-learning module is ready for publication, go to Publish and make sure the Publish settings include: 1) Publishing for LMS, 2) Saving to your local computer's drive, and 3) Under Reporting and Tracking, make sure the "Report to LMS" is checked, and the pulldown menu is set to SCORM 2004.
  2. After the publishing is complete, a window will pop up to say that the publishing is complete, along with several buttons for options. Click the Open button.
  3. This will open up the files that were saved to your local drive. You will see several folders and files. Open the folder named "lms."
  4. Locate a file called "scormdriver" which is a JavaScript file.
  5. Right-click on the file and choose Open With and then choose a text editor, such as Wordpad or Notepad that comes with Windows, or Visual Studio, if you have it.
E-learning module hosted on Learning Management System screenshot
  1. When it opens, you will see a large amount of text. In order to get to the right spot, make sure your cursor is at the beginning of the document, by clicking into the text at the top.
  2. Hit Ctrl+F, or click the Find button, and you will see a search box.
  3. Enter "recordinteraction" into the search box without the quotation marks and no spaces, and hit Enter, or click Find Next.
  4. The first search result should be highlighted, and this is the area where you are going to work to modify the file. Scroll up to see more of the text under the search result.
  5. After the first block of text, you will see three lines of text regarding variables, that all start with "var." You will be inserting text AFTER these three lines of variable text. Space down to allow a line of space between the last var line and the text you will insert.
Engaged with instruction bar graph
  1. Insert the following lines of text exactly as you see them below (Code written by Sam Hammond and modified by Kendal Rasnake):

    If(typeof GetPlayer == "function") {
    strLearningObjectiveID = strID.replace(/[ \t\r\n\v\f]/g, "_");
    strID = strDescription.replace(/[ \t\r\n\v\f]/g, "_");
    }
  2. Leave a line of space after the text you have inserted. Double check to make sure everything was typed correctly, including all punctuation marks. When it is done, your text should look like this.
  3. Click save in Visual Studio, or your text editor, to save the changes to the scormdriver.js file.
Zip and Upload to the LMS

Now that the file has been altered and saved on your local drive, it is time to zip the files into a SCORM package and get it ready to upload.

Back in Storyline, your buttons should still be open where you previously selected "Open." This time, select "Zip" to zip up all the files and prepare them for uploading to the LMS.

In the ADP LMS, you can run report R308A and get a report of student interactions with the learning module. Only this time, you should see the Storyline Scene and Slide number inserted in the Course Objective Column, and the text of the questions in the Question ID column for the reported quiz.

LMS Report with JavaScript adjustments

Click on the LMS Report image above to enlarge.

This image shows the progress (from top to bottom) of my success in modifying the JavaScript code written by Sam Hammond to get the ADP LMS to report what I wanted. Here is what you are looking at in the image:
1. Pink - I got the LMS to insert the words from the question text, but also reporting the name of the variable "strDescription" in-between the words.
2. Orange - This time I got the "strDescription" variable text removed, but I neglected to put in an underscore for spacing between the words in the question text.
3. Yellow - Adding an underscore to the code makes the question text more readable.
4. Green - Now that the question text was being reported, I switched two variables to make the Course Objective column to stop showing the name of the course and instead now show the Scene and Slide number from the Storyline Project that created the SCORM module.

What's Really Happening

Technically, the SCORM 2004 modules that I originally uploaded to the ADP LMS contained the question text data. From what I have read, this is standard with a SCORM 2004 module.

Running the Storyline module from the LMS in Debug Mode allowed me to verify this, because I could see the text from the questions displaying. They were showing up as being associated with the JavaScript string variable (text variable) called "strDescription."

Also, in debug mode, I could see that the Storyline Scene and Slide numbers were being stored in the string variable called "strID."

The variable that was displaying the course name repeatedly in the Course Objective column was "strLearningObjectiveID."

SCORM 2004 module running in LMS Debug Mode

Click on the LMS Debug image above to enlarge.

This image shows the data displayed during an LMS debug run of a SCORM 2004 module made in Articulate Storyline running on the ADP LMS.
The highlighted portions are where I could see that the Storyline Scene and Slide numbers were being stored in the "strID" variable, and the question text was being stored in the "strDescription" variable. This led me to conclude that the SCORM 2004 module really did contain the question text, but the LMS was apparently not reporting information in the "strDescription" variable, at least not in the R308A report. Modifying the JavaScript code in the published SCORM module allowed me to swap information from variables and have the question text from the "strDescription" variable appear in the Question ID column.

The JavaScript code is replacing information from one variable into another. I thought it would be logical to take information out of the "strID" variable first before replacing it with something else, because I was afraid I would lose the initial information in it.

Therefore, the second line of code is replacing the "strLearningObjectiveID" (which displayed the course name repeatedly), with the Storyline Scene and Slide numbers (which was being recorded in the "strID" variable).

strLearningObjectiveID = strID.replace(/[ \t\r\n\v\f]/g, "_");

Then, the third line of code, takes the "strID" variable (which originally recorded the Storyline Scene and Slide numbers) and replaces it with the question text (which was being recorded in the "strDescription" variable).

strID = strDescription.replace(/[ \t\r\n\v\f]/g, "_");

Therefore, when the ADP LMS runs a report, it now displays the Course Objective column with information from the "strID" variable (Storyline Scene and Slide numbers) and displays the Question ID column with information from the "strDescription" variable (question text).

Experience Learning Worth Remembering

How could you use a great learning experience?
Drop me a note so we can make it happen!

Let's start a discussion!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.