Storyline - Change Interaction ID
Mar 06, 2013
By
Chris Meek
I've created a very simple survey in storyline using multiple choice and "essay" questions. I've published this a SCORM package and if works through our LMS (and SCORM cloud) pushing out the answers the users are supplying.
However, the actual question text doesn't come through making it difficult to report on the data. By default Storyline seems to set the interaction id to a combination of the slide number and the question type, Slide_0_0_Essay_1, what I'd really like is to be able to edit the interaction ids to contain the question text so that our LMS can provide some useful reports to the end user.
Thanks in advance
Chris
33 Replies
Sam,
You are indeed a gentleman and a scholar - your fix worked like a charm. Freeform interactions in the course are now identified by the pageID, which is a lot more meaningful than the gobbledigook previously appearing in the report!
This is particularly important for a couple of the interactions in the course as confirmation of a correct response is required for Health & Safety compliance purposes.
Thanks again!
I have also tried adding your bit of code to the SCORMFunctions.js script to see if it would work for SCORM 1.2 and it looks like it does.
At line 694 I added the code:
if(typeof GetPlayer == "function"){
var player = GetPlayer();
var idCheck = player.GetVar("pageID");
strID = idCheck.replace(/[ \t\r\n\v\f]/g, "_");
}
...so after the function SCORM_RecordInteraction and the first instance of strID appears.
It seems to work fine on SCORM Cloud and in our own LMS (with the HTML5 output).
Hi Sam,
I had a post several months ago in this string. Your solution for custom IDs via the pageID variable worked successfully for the scored questions in the course, Since then, I have added a survey (with non scored questions such as likert scale, select one, multi-select) and the report in SCORM cloud seems to only identify each of them by the very last question custom ID that I set as the pageID in the survey. So, if the pageID of the last question I named is "abc", then the custom id for each question in the survey is identified as "abc" in the report in SCORM Cloud, even though I named the pageID for each of them uniquely. I have a feeling it has to do with the fact that for the survey questions, the interactions are all being submitted at the end, and not one by one as they are in the scored question portion. Can you confirm? The survey is set up so that the learner could go back and change answers, so there is a Submit button at the end of the survey that submits all the results. If that is the case, do you know of a way to work around it so that the custom IDs work for each question? Any help appreciated!
Thanks,
Angela
Hi Angela! Sorry for the delay in getting back to you. You know, our assessments have had the same type of behavior happen towards the end, and now I'm wondering if it's the same issue. I always thought it was a glitch but there are some "questions" in the test that were developed as interactions but don't count toward the total quiz score, so I imagine they're being processed in the same way as your survey questions.
Do you have a copy of the file that you're using that you can share with me? I'd be interested in monitoring the SCORM API calls as you take the survey.
Alternatively, you could always include the survey questions as scored questions inside the quiz and just adjust the passing rates accordingly. Give all survey responses the same point value and ignore correct/incorrect distinctions. It might be a pain to do this, but if it's important to capture the IDs and responses in the same way, it might be worth trying. And if you want to give people the option to "skip" survey questions without harm done, perhaps you could weight the survey questions to be something like 1 point and all other questions to be 100 points, so if users don't answer the questions the impact on their score is negligible.
Hi Richard
I downloaded your SCORM2004Functions.js and used this in my published html5 only assessment. Really happy that it works! However, I'm not getting the learner response to record in the LMS.
I am a js novice so excuse my ignorance or naivete. In your version, there is function that requires the responseidentifier...but I couldn't find a responseidentifier in the script. So, again I apologise for my lack of js understanding, I attempted to craft a createresponseidentifier in the same vein as your createvalididentifier.
Please can you take a look and let me know if this coding is correct:
function SCORM2004_ProcessResponseArray(strInteractionType, aryResponses)
{
strResponse = CreateResponseIdentifier(strResponse);
blnResult = SCORM2004_CallSetValue("cmi.interactions." + intInteractionIndex + ".learner_response", strInteractionID, strResponse) && blnResult;
//process them (into ResponseIdentifiers, etc?)
//only include the right amount of stuff
WriteToDebug("Processing Response Array with " + aryResponses.length + " pieces");
for(var i=0; i<aryResponses.length; i++)
{
if (strInteractionType == SCORM2004_INTERACTION_TYPE_MATCHING)
{
WriteToDebug("processing matching type, i=" + i);
aryResponses[i] = CreateMatchingResponse(aryResponses[i]);
}
}
return aryResponses;
}
//public
MANY THANKS IN ADVANCE!!!
xxx
This post was removed by the author
Hi Sam,
I tried to do the same thing, but I got the "null" instead of the identifier.
Is there a more current response/solution to this in another thread? I would also like to change the ID to actually be what the question is, and when I try to open the SCORM2004Functions.js file, I cannot open it. Is there a program that I need to open and edit the .js file? I noticed someone also said a setting could be changed in Storyline too, but I don't see where and how.
Hi,
The ''correct_responses.0.pattern'' is showing "undefined" in LMS for HTML5 version. Please advice.
Love you so much, after 4 days of work on this thing i found your post and still work!
This post was removed by the author
Thanks Sam and Craig - it works for me in Moodle with SCORM 1.2 and HTML5. Brilliant.
This discussion is closed. You can start a new discussion or contact Articulate Support.