Problem submitting interactions in html5
Jun 30, 2017
I have a quiz based course, where recently I have had a problem submitting interactions in HTML5, which is a problem as the course is built specifically for mobile devices.
When I look at the course in developer options in Chrome, the console gives me this error:
player_compiled.js:277 Error in user.js 6XeiFU1zG2Q TypeError: d.split is not a function
at Interaction.Element.parseObjref (player_compiled.js:292)
at Slide.addchoiceresponse (player_compiled.js:467)
at Slide.Element.runAction (player_compiled.js:282)
at Element.<anonymous> (player_compiled.js:1367)
at Function.each (player_compiled.js:21)
at Interaction.evaluate (player_compiled.js:1367)
at Slide.Element.runAction (player_compiled.js:275)
at Slide.Element.runAction (player_compiled.js:265)
at Slide.Element.runActionGroup (player_compiled.js:263)
at TimelineAction.exe_actiongroup (player_compiled.js:1070)
At first I thought that it was a problem with my custom submit buttons, but then I tried recreating just a couple of slides, in a new course, and the inbuilt submit button does the same:
player_compiled.js:277 Error in user.js 6XeiFU1zG2Q TypeError: d.split is not a function
at Interaction.Element.parseObjref (player_compiled.js:292)
at Slide.addchoiceresponse (player_compiled.js:467)
at Slide.Element.runAction (player_compiled.js:282)
at Element.<anonymous> (player_compiled.js:1367)
at Function.each (player_compiled.js:21)
at Interaction.evaluate (player_compiled.js:1367)
at Slide.Element.runAction (player_compiled.js:275)
at Slide.Element.runAction (player_compiled.js:265)
at Slide.Element.runActionGroup (player_compiled.js:263)
at TimelineAction.exe_actiongroup (player_compiled.js:1070)
player_compiled.js:292 Uncaught TypeError: d.split is not a function
at Interaction.Element.parseObjref (player_compiled.js:292)
at Slide.addchoiceresponse (player_compiled.js:467)
at Slide.Element.runAction (player_compiled.js:282)
at Element.<anonymous> (player_compiled.js:1367)
at Function.each (player_compiled.js:21)
at Interaction.evaluate (player_compiled.js:1367)
at Slide.Element.runAction (player_compiled.js:275)
at Slide.Element.runAction (player_compiled.js:265)
at Slide.Element.runActionGroup (player_compiled.js:263)
at TimelineAction.exe_actiongroup (player_compiled.js:1070)
Element.parseObjref @ player_compiled.js:292
Slide.addchoiceresponse @ player_compiled.js:467
Element.runAction @ player_compiled.js:282
(anonymous) @ player_compiled.js:1367
each @ player_compiled.js:21
Interaction.evaluate @ player_compiled.js:1367
Element.runAction @ player_compiled.js:275
Element.runAction @ player_compiled.js:265
Element.runActionGroup @ player_compiled.js:263
TimelineAction.exe_actiongroup @ player_compiled.js:1070
TimelineAction.performAction @ player_compiled.js:1058
(anonymous) @ player_compiled.js:1074
each @ player_compiled.js:21
StoryEvent.triggerEvent @ player_compiled.js:1074
(anonymous) @ player_compiled.js:262
each @ player_compiled.js:21
Element.handleEvent @ player_compiled.js:262
Element.runAction @ player_compiled.js:267
Element.runActionGroup @ player_compiled.js:263
TimelineAction.exe_actiongroup @ player_compiled.js:1070
TimelineAction.performAction @ player_compiled.js:1058
(anonymous) @ player_compiled.js:1074
each @ player_compiled.js:21
StoryEvent.triggerEvent @ player_compiled.js:1074
(anonymous) @ player_compiled.js:262
each @ player_compiled.js:21
Element.handleEvent @ player_compiled.js:262
b @ player_compiled.js:1853
dispatch @ player_compiled.js:69
h @ player_compiled.js:61
Any ideas as to how to fix this?
Here is a link to the original course:
http://elearning.hosp.dk/SOSU-Medicinquiz/mobil/story.html
http://elearning.hosp.dk/SOSU-Medicinquiz/mobil/story_html5.html
And here is one for the shorte test course with inbuilt buttons:
http://elearning.hosp.dk/SOSU-Medicinquiz/test/story.html
http://elearning.hosp.dk/SOSU-Medicinquiz/test/story_html5.html
13 Replies
user.js is any custom javascript you have added to the course, any chance there is an error in your code.
The problem is not in user.js, but in player_compiled.js.
I uploaded it to scormcloud without your function and did not get an error. the error report did reference user.js as well.
We had/have this same issue. I'm not sure if firefox, chrome, and safari recently pushed an update, but IE seems unaffected. The issue for us was that a likert scale questions was passing a number (1-5), and instead of the js converting it to a string, it tried to run string functions on an int.
For our player_compiled.js file in the mobile folder, we needed to make the following changes:
Line 292: Change d.split to d.toString().split
Line 343: Change d.split to d.toString().split
Line 1349: Change all instances of this.lmstext.replace to this.lmstext.toString().replace
Line 1350: Change all instances of this.lmstext.replace to this.lmstext.toString().replace
-Line numbers may vary based on build version, but find and replace d.split to d.toString().split and this.lmstext.replace to this.lmstext.toString().replace shouldn't cause any harm. Since the code is expecting a string, the worst case scenario is that you are converting a string to a string and using up an extra ms of processing time.
*There are probably other ways to fix this, but I'll leave that up to articulate. This is a workaround. Probably doesn't need to be done on line 343, but it won't hurt.*
I want to thank my colleague John for submitting this on here. I have also submitted a ticket (#01099716) on 7/10, but have not gotten a response on this. Our company is pursuing other options because of the recent issues we've been having with SCORM, but I would love to be able to make a case that we can continue to use it without issue. Thanks!
Hi Lee,
It looks like Lea is taking care of your case now - sorry for any delay! She'll keep working with you through the case and I will follow along.
Thank Ashley!
Hi Lee,
I wanted to follow up here as I saw that Lea was able to replicate the issue and has now logged it as a possible bug with our team. Both your case and this discussion are flagged for follow up once we have additional information to share.
Excellent, thank you so much!
To follow up, a contractor of ours purchased SL3 over the weekend and published a file for me to test in our LMS. Publishing from SL3 (HTML5 only) seemed to have worked and I could not recreate the problem. Do we know if this issue has been fixed in SL360/3? Thanks!
Sent from my iPhone. Please excuse any tyops.
Hi Lee,
It does not appear to be an issue in SL3 or SL360. The HTML5 publishing engine and our output in those versions was re-written from the ground up! I'm glad to hear that you were able to test out SL3 to have it work correctly - keep in mind that the SL3 file won't be backwards compatible to SL2!
If you want to talk with our team about upgrading to SL3 (loyalty discount pricing is available) please feel free to reach out here.
Thank you Ashley! Yes, our team would like to upgrade and I will reach out through the link you've provided here. Thank you so much for all of your help. I would still like to hear any updates to this issue with SL2. Thanks!
Lee
Sent from my iPhone. Please excuse any tyops.
I'll absolutely keep you posted Lee, and if I can be of any other help just let me know!
This discussion is closed. You can start a new discussion or contact Articulate Support.