Forum Discussion
Create a Course Certificate in StoryLine! (with Java and HTML)
Hi Steve,
Thank you for responding to my request. Regarding the chrome timing issue, I will try a version where the print command is called by a second trigger and see if it will fix the problem.
As for the citrix issue, because the trigger only open a blank html page when accessed via IE-11, it doesn't show any error on the dev console.
I also replicated the jsPDF method for Saving Storyline Variables to a PDF as a possible solution, (https://community.articulate.com/discussions/articulate-storyline/saving-storyline-variables-to-a-pdf), once again accessing the SL output using IE-11 on citrix proved to be problematic. In this case the trigger doesn't do anything when clicked. On Chrome, the trigger worked as designed. My SL file using the jsPDF method is attached. I find this really perplexing because if it's a security protocol than it should fail in the same way regardless of which browser is used.
I see the jsPDF method as a possible certificate solution, but the draw back is having to add the <script></script> codes to the storyline.html after publishing. I also used your webobjects embedding technique with this method to store the js files.
In the Saving Storyline Variables to PDF post, you offered an alternate solution to changing the storyline.html after publishing, please see your comments below. I did not fully understand your method for loading the script dynamically, could you elaborate on this and maybe apply it to my attached storyline file.
I will try your Generating a certificate from Storyline method next, perhaps, it will work in the citrix environment as well as direct network logon.
Thank you for your time. I'm very grateful for any assistance you are able to provide.
Dan
Text from Saving Storyline Variables to a PDF follows:
You might have some luck embedding your dependencies in a Web object and dynamically writing them into the head of your document to save having to add them after each publish. Here's the function I use to rewrite headers at run time. This doesn't work well for everything but for PDF generation it should be fine.
//where is our carry-on baggage? Find this by right-clicking the web object and choosing open. Grab the object ID from the address bar.
this.oLocation="story_content/WebObjects/66vjsN26Fjn/";
//load the scripts dynamically
function add_script(scriptURL,oID) {
var scriptEl = document.createElement("script");
var head=document.getElementsByTagName('head')[0];
scriptEl.type = "text/javascript";
scriptEl.src = scriptURL;
scriptEl.id=oID;
head.appendChild(scriptEl);
}
//only want to add these once! Check to see if the ID exists first.
if(document.getElementById('soundman')==null){
//first parameter is the script reference to add to the header, second is the object ID
add_script(oLocation+"script/soundmanager2-jsmin.js","soundman");
}