Picture of Henrik Aabom
SCORM-tracking question and answer texts?
by Henrik Aabom - Tuesday, 10 January 2017, 10:32 AM
 

Hi Adapters!

I've search a bit in the forum for an answer, but please redirect me if this has already been answered :)

When Spoor is activated and set to track the user's answer to question components, then Adapt is sending this:

ScormWrapper::setValue: _property=cmi.interactions.0.id _value=5874b3bad28bc0080452b02f

ScormWrapper::setValue: _property=cmi.interactions.0.type _value=choice

ScormWrapper::setValue: _property=cmi.interactions.0.student_response _value=1

ScormWrapper::setValue: _property=cmi.interactions.0.result _value=wrong

ScormWrapper::setValue: _property=cmi.interactions.0.time _value=11:15:45

 

Is it possible to send the actual question and the answer that the user has chosen, instead of the id_value and student_response_value? These values are a bit hard to read, when reviewing the data, on the LMS side.

I know that the id corresponds to the component's id, but it would be nice if you could read the question and answer directly in the LMS, instead of having to look up the id in the AT.

Has anyone done this before?

Maybe it is possible to send more than just these automatically generated id's and sent the Display Title too?

 

Thanks

Henrik

 

Picture of Matt Leathes
Re: SCORM-tracking question and answer texts?
by Matt Leathes - Tuesday, 10 January 2017, 11:27 AM
 

Hi Henrik

Unfortunately the datatypes associated with these fields are quite restrictive.

The ethos at the time the SCORM 1.2 spec was drawn up was to keep everything as terse as possible, presumably because it was drawn in 2001 when disk space was considerably more expensive than it is now.

For example, the field cmi.interactions.n.id is of datatype 'CMIIdentifier', which is defined as 'An alphanumeric group of characters with no white space or unprintable characters in it. Maximum of 255 characters.'

So if you wanted to store the component title instead of the id you would need to ensure that you stripped all spaces and 'unprintable' characters - and trimmed off any characters that would make the length longer than 255 chars.

The best place to do that would be in this function in the spoor plugin.

Similarly, cmi.interactions.n.student_response is of type 'CMIFeedback' which is even more restrictive. The exact spec of this varies depending on what cmi.interactions.n.type is set to, but taking 'choice' as an example then "Feedback is one or more single characters separated by a comma. Legal characters are “0” to “9” and “a” to “z”."

One option might therefore be to change the 'type' of the interaction, for example if you were to use 'performance' as the type then you could set student_response to "an alphanumeric string of 255 characters or less" which is definitely more flexible, although would still need checking to ensure it wasn't exceeded - particularly for questions where the user can select multiple answers.

xAPI is really the way forward for this sort of data as it's considerably more generous with the amount of data it lets you record. Almost to a fault really, the amount of data that is repeated across statements is a bit horrifying to programmers who've had the Don't Repeat Yourself ethos drummed into them!

Picture of Matt Leathes
Re: SCORM-tracking question and answer texts?
by Matt Leathes - Tuesday, 10 January 2017, 11:32 AM
 

Actually reading that back I just think I found a bug... if the CMIFeedback datatype for a 'choice' question "is one or more single characters separated by a comma. Legal characters are “0” to “9” and “a” to “z”." then any multi-select MCQ with more than 9 options is going to trigger a SCORM error if the user selects all the options :-(

Picture of Henrik Aabom
Re: SCORM-tracking question and answer texts?
by Henrik Aabom - Tuesday, 10 January 2017, 12:43 PM
 

Wow okay, that’s restrictive :/
Thanks Matt, for the thorough answer. Helps me a lot, even though it might mean that we can't, (or more accurately put) won't do anything to this issue, as it seems that it will take a long time, and a reprogramming of the Spoor extension. Which we don't want, as then we will get a new branch that won’t get updated if you guys releases a later version.

You are right about the bug. I just tried on SCORM Cloud with a mcq-component, that had 15 right answers and checking all of them and clicking submit resulted in this error:

ScormWrapper::setValue: _property=cmi.interactions.0.id _value=5874b3bad28bc0080452b02f
ScormWrapper::setValue: _property=cmi.interactions.0.type _value=choice
ScormWrapper::setValue: _property=cmi.interactions.0.student_response _value=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
Course could not set cmi.interactions.0.student_response to 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 Error Info: Incorrect Data Type LMS Error Info: cmi.interactions.n.student_response must be a valid CMIFeedback - value must be consistent with interaction type. Your value is: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
ScormWrapper::setValue: _property=cmi.interactions.0.result _value=correct
ScormWrapper::setValue: _property=cmi.interactions.0.time _value=13:40:19
ScormWrapper::setValue: _property=cmi.suspend_data _value={"lang":"en","completion":"-11","questions":"ECImohWUDAAAwAIMABDIAg4MfFgX//","_isCourseComplete":false,"_isAssessmentPassed":false}

 

 

Picture of Matt Leathes
Re: SCORM-tracking question and answer texts?
by Matt Leathes - Tuesday, 10 January 2017, 6:02 PM
 

Thanks for checking that in SCORM Cloud, very helpful.

It seems like a bit of an edge case to me that someone would:

  • have an MCQ or GMCQ with > 9 responses AND
  • that the user would be likely to select > 9 responses AND
  • the LMS actually supports cmi.interactions (most don't seem to) AND
  • there's a requirement to report to cmi.interactions AND
  • switching to SCORM 2004 wouldn't be an option

...but I've logged an issue anyway!

Picture of Henrik Aabom
Re: SCORM-tracking question and answer texts?
by Henrik Aabom - Wednesday, 11 January 2017, 7:18 AM
 

Yeah you are right, it's probably very rare, but will be nice to get a fix anyway ;)