I have a training website which shows AP originated SCORM training courses to registered members only. The AP Player appears inside an iframe/lightbox when an option is selected in a Lesson page, which works perfectly.
However, the URL of the 'tutorial.html is visible in code if somebody invokes ‘CTRL+U’ (Windows). If a user copies and pasts this URL into a new tab, the presentation (after a lot of ‘Can’t find SCORM API’ messages) will eventually display. Thie URL is visible even if I use code compression & caching, as the SCORM package is not considered and is therefore not included in any optimisation.
There I have a code snippet which I manually paste into the section of ‘tutorial.html’. What I want to know is this: Is there a way for me to add this code snippet at SCORM compilation stage, either to the Player or to the AP project? Perhaps even make it part of my course template?
Thanks for that. I tried your suggestion and yes it worked. However, it still displays all of the “Can’t find API” messages first, before closing. This would tell anyone, digging around where they shouldn’t, that they are on the right track.
I favour a similar piece of code (image below, as I’ve discovered I cannot insert code here).
The advantage of this code, embedded inside the ‘head’ section of ‘tutorial.html’, is that it immediately displays a plain white ‘404’ page (without any URL identifiers) with no “Can’t find …” messages, giving no clue to the person digging around. I find inserting the comment into the HTML file preferable to inserting an ‘On Load’ action, as the action seems to place the code too far down in the ‘rlprez.js’ file.
I don’t suppose it’s possible to automate adding this additional code to the HTML file?
You can try adding your code snippet directly to the SCORM package before compilation by modifying the launch file (typically index.html or tutorial.html). If you’re using an authoring tool like Articulate or Captivate, you may be able to include the script in the template or player settings. Another approach is to implement server-side validation to restrict direct URL access. Let me know if you need more details!