Forum Discussion
Create a Course Certificate in StoryLine! (with Java and HTML)
I noticed in Stephanie Harnett's most excellent post on user notes that can be printed or emailed that much of the java for the printing function was really just filling the print window with content by using html. I thought to myself, why not use this same method for creating a course certificate. So I did just that following the steps below:
1) Design a rough draft in PowerPoint (so I could see what elements I would want on the page and determine or create any graphics I would need.
2) Create graphics and publish them to the web. You will need to reference them using a full URL.
3) Create an HTML based certificate using your favorite html editor. Tables work really well. I discovered this on my 3rd try to get this right. (More on that later.)
4) In StoryLine, create a trigger to execute JavaScript
5) Use the JavaScript to create your print window contents by adding the lines of your html together (see screenr)
Publish and test.
Below is a copy of the certificate created by StoryLine. The blue text represents variables pulled form the course:
- AshleyChiassonCommunity Member
Great idea, Owen! This will come in handy with one of my current contracts
- OwenHoltSuper Hero
Let me know if you need any assistance or further clarification.
Everyone seems to like a certificate.
- MarkWilson2Community Member
Hello Owen,
Would you by any chance have the storyline file you could share with me on certificate example at the top of this thread?
I am not great with javascript but am better editing code to fit my needs than writing from scratch.
I appreciate if you don't want to share with me but please let me know either way.
Thanks
Mark
- OwenHoltSuper Hero
Let me see what I can find that doesn't contain proprietary information in it.
- OwenHoltSuper Hero
- MarkWilson2Community Member
Owen,
Thank you VERY much for that.
I appreciate it a lot.
Mark
- LanceElliott-36Community Member
Hi Owen,
I found your post after trying several other solutions. Initally I did not want a new HTML external file solution but this is best as some browsers will load the Flash version and the JS trigger allin one don't work.... hrs spend here - avoid.
In the interests of helping others... and repeating some of the above:
1) make a button for printing the certificate
2) add a JS trigger with the code:var newWin=window.open("certificate.html", "certificate", "status=0,scrollbars=0,width=820,height=620");
3) make a HMTL + JPG file and save it into the root directory - same as your story file. - attached
4) I've added variables to the HTML file.... you'll need your own variables created in SL eg %name% as these are pulled into the opened window. Make as many variables as you want and mod the HTML. Mod the stylesheets to please.
I am still struggeling with (it works fine but):
document.write("<div class='result'>"+learnerName+", <b><br/><br/><br/></b>"+CourseName+" module. <br/> "+systemdateDayOfWeek+" "+systemdateDay+" "+SystemTime+" "+systemdateMonth+" "+systemdateYear+"</div>");
Errors if I have more than one of these (no content displayed) - even an exact duplicate. I am no JS expert so can't resolve this...
Ideally I'd like several
document.write
calls each with different classes so the above is a make do solution for the moment.Oh, the certificate.html MUST be online and variables set up in html file and SL.
- ApoorvJainCommunity Member
Hello Lance,
Thanks for your example.
I was trying your example and creating a certificate shared by you. I just want to print a name in the shared certificate. But I am facing a problem in printing a name on it.
Here I am sharing a .story file and as well as the cerificate.html file.
I have created a print button in the failure feedback layer and In the first slide, I have created a name reference field to pull the name from it and print in the certificate.
I request you to please have a look and help me in this.
Thanks
Apoorv
- HelenaSmithCommunity Member
I am at the beginner level with HTML so I don't know the coding to use in NOTEpad plus.
- NancyOliverCommunity Member
Hello Owen,
thanks again for sharing!
Thank you so much for sharing. It was exactly what I needed and works perfectly. I do have an additional question. Where did you get the clip art of the newspaper you used in your example? I would love to use it for a project. Any info about it would be greatly appreciated.- OwenHoltSuper Hero
Thanks Nancy, glad you found it useful. The link Lisa provided is to the newspaper template that I used. :)
Thanks for the assist Lisa!
- LisaSmyserCommunity Member
Hi Nancy,
There's a newspaper template in the download section of the community. Check it out.
https://community.articulate.com/download/newspaper-graphic
Lisa
- NancyOliverCommunity Member
Thank you Lisa!