Hi folks
I'm new to this community but have encountered a problem that I'm hoping you can help me to resolve.
A module that I've created using Articulate Storyline includes javascript to improve the interactivity. Only, when I load the published version - using SCORM 1.2 wrapper - on to the LMS, the javascript elements are not supported. It's been suggested that this could be due to cross-domain limitation, essentially blocking my javascript because it's not comminicating across the different domains.
When I go on Google - I love Google! - I see lots of examples of what coding I could amend to rectify the problem. Can you believe it though, I cannot determine where this coding lies and therefore where I should make the changes??
Any ideas? I open up the zip file to find the following but am a stranger to making amendments to anything other than the imsmanifest.xml.
Your advice here would be massively appreciated!
Replies
Hi Jo,
Fancy seeing you on here!
I'm pretty sure you'll be able to edit this Javasript code within Storyline. Usually there's a trigger that calls the Javascript.
1) Find the slide that calls the Javascript
2) Look in the trigger panel on the right hand side for the one that says Execute Javascript when....
3) You should be able to click on the code and edit in there
Let me know how you get on.
Ady
Thanks for pointing me in the direction of this community, Ady! I can't believe I have an issue already that I can raise :)
Okay, so I'm working within the javascript now...it presently looks like this:
var player = parent.GetPlayer();
var text = player.GetVar('TextEntry');
var score = 0;
var pos = text.toLowerCase().indexOf('key');
while (pos !== -1) {
score++;
pos = text.toLowerCase().indexOf('key', pos + 1);
}
var pos = text.toLowerCase().indexOf('secure');
while (pos !== -1) {
score++;
pos = text.toLowerCase().indexOf('secure', pos + 1);
}
var pos = text.toLowerCase().indexOf('cabinet');
while (pos !== -1) {
score++;
pos= text.toLowerCase().indexOf('cabinet', pos + 1);
}
var pos = text.toLowerCase().indexOf('lock');
while (pos !== -1) {
score++;
pos = text.toLowerCase().indexOf('lock', pos + 1);
}
var pos = text.toLowerCase().indexOf('breach');
while (pos !== -1) {
score++;
pos= text.toLowerCase().indexOf('breach', pos + 1);
}
var pos = text.toLowerCase().indexOf('subject');
while (pos !== -1) {
score++;
pos= text.toLowerCase().indexOf('subject', pos + 1);
}
var pos = text.toLowerCase().indexOf('day');
while (pos !== -1) {
score++;
pos= text.toLowerCase().indexOf('day', pos + 1);
}
var pos = text.toLowerCase().indexOf('over');
while (pos !== -1) {
score++;
pos= text.toLowerCase().indexOf('over', pos + 1);
}
var pos = text.toLowerCase().indexOf('info');
while (pos !== -1) {
score++;
pos= text.toLowerCase().indexOf('info', pos + 1);
}
var pos = text.toLowerCase().indexOf('data');
while (pos !== -1) {
score++;
pos= text.toLowerCase().indexOf('data', pos + 1);
}
But there's nothing in the javascript that directs the user to a specific url that will open up the module and then try to communicate with different domains:
https://nottingham.e-learningportal.com/courses_scorm/ED169507-AE9E...
When I look at the workarounds for the cross domain issue, they explain that I need to make the change to the launch url. My problem is that I don't know where to find the launch url coding :(
Hi Jo. Yeah really pleased you found your way here. You're no longer alone in the world of L&D. A whole community of stuff going on here that will keep you connected and inspired. Welcome.
This looks like a high degree of technical stuff going on there and I'm sure that will be right up the street of someone somewhere in the world. Are you a member of the Articulate Storyline community? It'll be perhaps the best place to raise that question. It's over at: https://community.articulate.com/discuss,
I'm pretty sure you'll find someone who maybe has come across exactly this before and will respond if not even Articulate themselves. It's another helpful community.
Let me know how it goes.