Skip to main content

Here's How to Get the Learner Name Into Every Training Material Answer Breakdown Response from a SCORM 2004 Storyline Package

  • August 11, 2026
  • 1 reply
  • 52 views

 

I would seriously love to know what is stopping Docebo from making this happen, like the real reason. All I’ve read are posts with people saying “...because SCORM” - which I find unacceptable.

Anyway let’s have some fun! Storyline sends each answer to the LMS the moment that question is submitted (SetValue cmi.interactions.N.learner_response) and this can be tricky to catch, Learner’s can press Enter instead of clicking the Submit button that has the triggers on it, ect. 

The reliable centralized fix is to talk to the LMS directly at the end and rewrite the interactions it already stored!

 

SCORM 2004 only. On SCORM 1.2 this won't work — interactions there are write-only, so you can't read them to append.

 

Step 1 — Capture the Learner’s Name

  • In Storyline create a text variable - “LearnerName”
  • Slide 1 > Execute JavaScript > When the timeline starts on this slide
function findLMSAPI(win) {
  if (win.hasOwnProperty("API")) return win.API;                     // SCORM 1.2
  else if (win.hasOwnProperty("API_1484_11")) return win.API_1484_11; // SCORM 2004
  else if (win.parent == win) return null;
  else return findLMSAPI(win.parent);
}
var lms = findLMSAPI(window);
var name = "";
if (lms) {
  if (lms.LMSGetValue)   name = lms.LMSGetValue("cmi.core.student_name"); // SCORM 1.2
  else if (lms.GetValue) name = lms.GetValue("cmi.learner_name");         // SCORM 2004
}
if (name.indexOf(",") > -1) {           // LMS returns "Last, First" — flip it
  var p = name.split(",");
  name = p[1].trim() + " " + p[0].trim();
}
GetPlayer().SetVar("LearnerName", name);

 

 

Step 2 — Insert a Blank Slide before the Results Slide

  • Slide > Execute JavaScript > When the timeline starts on this slide
function findLMSAPI(w){
  if (w.hasOwnProperty("API_1484_11")) return w.API_1484_11; // SCORM 2004
  if (w.parent == w) return null;
  return findLMSAPI(w.parent);
}
var lms = findLMSAPI(window);
if (lms) {
  var name = GetPlayer().GetVar("LearnerName");
  var count = parseInt(lms.GetValue("cmi.interactions._count"), 10) || 0;
  for (var i = 0; i < count; i++) {
    var key = "cmi.interactions." + i + ".learner_response";
    var resp = lms.GetValue(key);
    if (resp && name && resp.indexOf(name) === -1) {   // self-guard: no double-append
      lms.SetValue(key, resp + " — " + name);
    }
  }
  lms.Commit("");
}
You can thank Windows 11 HDR for this horrible screenshot

 

 And now you have a SCORM interactions report! (sorta)

1 reply

John
Docebian
Forum|alt.badge.img+3
  • Docebian
  • August 11, 2026

Hey ​@avecchi!

In re: to...

I would seriously love to know what is stopping Docebo from making this happen, like the real reason. All I’ve read are posts with people saying “...because SCORM” - which I find unacceptable

 

The simplest answer is not necessarily just “because SCORM.” We will execute based on how the package is designed. The likely answer depends on how most Q&A is designed at the coding level and how it is exported from, say, an authoring tool. It’s great to see in your example that the code placement actually results in readable first and last names for each question, albeit we are embedding duplicative data at that point.

Another suspicion, unconfirmed as I’m not a Product Manager, is that due to the age of this area and its high level of use, along with the associated change-management risk, progress on the overall refactoring of these objects has been slower than in other platform areas. A conversation with a Product Manager would be a good next step if you can request one through your CSM and AM.

The current version of Training Materials may look fully upgraded, and it is in part, but some of the underlying engines have not yet been fully incorporated into the new builds that communicate cleanly with our data warehouse, which stores reporting data. That said, there are ways to access this information through Docebo staff using something called Query Builder and Custom Reports, or through Learn Data, a direct Snowflake data share and table set that you can query yourself. Beyond that, creative custom package adjustments could certainly send the data elsewhere for reporting purposes, although this is less commonplace than the first two options above.