What's the usual format for cmi.learner_name?

418 views
Skip to first unread message

kirschkern

unread,
Jul 16, 2009, 12:52:51 PM7/16/09
to eLearning Technology and Development
While the SCORM 1.2 spec defines the format for
"cmi.core.student_name" there is no defined format for
"cmi.learner_name". Event worse, the data type is a
localized_string_type which may start with a language definition.
"{lang=en}Peter Parker". This is really weird.

But my current problem is, how do I get the correct first name and
last name from the LMS? Is there any typical usage that most LMS
support?

Thanks for feedback
Daniel

rsug...@sugels.com

unread,
Jul 16, 2009, 1:46:15 PM7/16/09
to elearning-technolo...@googlegroups.com
Hello Daniel,

Unfortunately ADL did not specify a format for learner_name in the editions
of SCORM 2004, they appear to have left this up to the LMS vendors. Really
impacts interoperability of the content.

Most of the LMSs I have worked with follow the SCORM 1.2 format, although
I've most often worked with LMSs certified to SCORM 1.2.

I would suggest, early on in your development of the content, to perform a
test. Do a GetValue("cmi.learner_name") and see what it returns using an
alert or other mechanism for display. You could then build a method that
would identify the format used and parse it into something readable. I have
an LMSTester built for SCORM 1.2 that I could easily modify for SCORM 2004
if you'd like.

If I were a betting man, I'd say LMSs certified for SCORM 2004 kept the
SCORM 1.2 format so they could be backwards compatible since they also
support SCORM 1.2. I don't see the vendors writing two different
concatenation routines for the data coming from the database.

Sincerely,
Raymond Sugel Sr
rsug...@sugels.com
847.426.6163

kirschkern

unread,
Jul 17, 2009, 1:15:15 PM7/17/09
to eLearning Technology and Development
> I would suggest, early on in your development of the content, to perform a
> test.

Thanks Raymond,
I'm creating a tool to generate SCORM output and this should be
conformant to not just a single LMS. While our tool shows personlized
user feedback we need to distinguish between the first and the last
name. Without any real definition it's pretty hard to find a good
working solution.

Our current implementation is able to let the author set the order and
separator but most authors didn't even know about this setting neither
what they should do with it.

I think I will now check, if there is a comma in the string. If so, I
assume that this is the separator and that everything before is the
last name and after is the first name. That should match the SCORM 1.2
definition.
If there is no separator I will use the first word as first name and
everything after as last name. This will not work with "John F.
Kennedy" but with "Jason Duke of Edmond". Maybe I can also Check for
the second word and if it is followed by a dot and if so include it as
first name.

SCORM cares so much about technical details and stuff nobody will ever
use but the real fundamentals are ignored. Really a pitty.

Thanks
Daniel

kirschkern

unread,
Jul 17, 2009, 2:05:56 PM7/17/09
to eLearning Technology and Development
In case someone is interested in the new implementation:
(Note: the trim() method is an extension of the String prototype and
removes blanks at the end or beginning of a string)

var name = "John F. Kennedy";
//var name = "Jason Duke of Edmond";

// If "," is in the string, assume "lastname,firstname"
if (name.indexOf(",") > 0) {
var nameArray = name.split(",");
var lName = nameArray[0].trim();
var fName = nameArray[1].trim();
}

// If " " is in the string, assume "firstname lastname"
else if (name.indexOf(" ") > 0) {
nameArray = name.split(" ");
fName = nameArray.shift(); // get the first element and remove it
lName = "";

// if there are still entries left we must check
// where they should be added to
while (nameArray.length>0) {
var tmp = nameArray.shift();
// if there is still another entry in the array
// and the last character of the string is a "." we
// asssume something like "John F. Kennedy" and
// just ignore the middle name
if (nameArray.length>0 && tmp.charAt(tmp.length-1) == ".")
continue;
if (lName) lName += " ";
lName += tmp;
}
}
else {
fName = " ";
lName = name||"anonymous";
}

alert("First Name: '" + fName + "'\nLast Name: '" + lName + "'");
Reply all
Reply to author
Forward
0 new messages