Forum Discussion
Oracle Taleo Learn - Storyline unable to set the score in the users' transcript
Disclaimer: This may not work for everyone, these notes are for future reference when working with a Taleo-based LMS.
Our client sent Taleo guidelines pertaining to integrating Storyline courses. (See pdf attachment. I am not quite sure if this is the latest update, however.) Based upon these guidelines, I have received a favourable response from our client that it works on their LMS using the SCORM 2004 specification.
Of the differences with our previous build:
- Launch browser settings. Set to "Launch player in new window." (See screenshot.) I am assuming that this is the method of how the LMS communicates with the course.
- Set course completion status via trigger. (See screenshot.)
- Use JavaScript trigger to send back the score and pass percentage to the LMS. (See code snippet below.)
// Code Snippet
//Set Score
var player = GetPlayer();
// Variable "courseScore" is predefined and set to the Results.ScorePercent variable in a trigger at the slide layer.
var score = parseInt(player.GetVar("courseScore"));
// Variable "passingScore" is predefined and set to the Results.PassPercent variable in a trigger at the slide layer.
var passing = parseInt(player.GetVar("passingScore"));
console.log("score [" + score + "% of " + passing + "%]");
// SCORM2004 detection
var nFindAPITries = 0;
var API = null;
var maxTries = 500;
// The ScanForAPI() function searches for an object named API_1484_11
// in the window that is passed into the function. If the object is
// found a reference to the object is returned to the calling function.
// If the instance is found the SCO now has a handle to the LMS
// provided API Instance. The function searches a maximum number
// of parents of the current window. If no object is found the
// function returns a null reference. This function also reassigns a
// value to the win parameter passed in, based on the number of
// parents. At the end of the function call, the win variable will be
// set to the upper most parent in the chain of parents.
function ScanForAPI(win)
{
while ((win.API_1484_11 == null) && (win.parent != null) && (win.parent != win))
{
nFindAPITries++;
if (nFindAPITries > maxTries)
{
return null;
}
win = win.parent;
}
return win.API_1484_11;
}
// The GetAPI() function begins the process of searching for the LMS
// provided API Instance. The function takes in a parameter that
// represents the current window. The function is built to search in a
// specific order and stop when the LMS provided API Instance is found.
// The function begins by searching the current window’s parent, if the
// current window has a parent. If the API Instance is not found, the
// function then checks to see if there are any opener windows. If
// the window has an opener, the function begins to look for the
// API Instance in the opener window.
function GetAPI(win)
{
if ((win.parent != null) && (win.parent != win))
{
API = ScanForAPI(win.parent);
}
if ((API == null) && (win.opener != null))
{
API = ScanForAPI(win.opener);
}
}
GetAPI(this);
//These lines will be used to set score value in SCORM2004
var finalRawScore = score;
var passPercent = passing;
var scoreScale = finalRawScore/100;
//Set score value here. These 4 lines are necessary for SCORM2004
SCORM2004_objAPI.SetValue('cmi.score.scaled', scoreScale);
SCORM2004_objAPI.SetValue('cmi.score.raw', finalRawScore);
SCORM2004_objAPI.SetValue('cmi.score.min', '0');
SCORM2004_objAPI.SetValue('cmi.score.max', '100');
// Passed and completion status
// SCORM2004_objAPI.SetValue("cmi.success_status","passed");
// SCORM2004_objAPI.SetValue("cmi.completion_status","completed");
Related Content
- 5 months ago
- 2 months ago
- 6 months ago