I have created a certificate looking slide at the end of my course. I have added in variables for the learners name, their score achieved, I am just missing the date variable to be populated automatically.
I have followed the guide on the link below however it has not worked when I have tested it in a clients LMS (SABA). https://vimeo.com/145579723
I was just wondering if anyone could offer any assistance on this matter?
I copied Joanne's code from above and created a trigger:
var m_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var today = new Date(); var dd = today.getDate(); var mm = today.getMonth(); var yyyy = today.getFullYear(); if(dd<10) { dd='0'+dd } var date= m_names[mm]+' '+dd+', '+yyyy; var player = GetPlayer(); player.SetVar("SystemDate",date);
and added the text variable SystemDate (I even tried it with a different variable and updated the code accordingly) I set up my trigger to execute the javascript when the timeline starts on this slide, I have a text box with %SystemDate% and I am not able to see the date print on the slide when in Review360. Is this a known bug or is there an issue with my above code? I know zero javascript so I am at a loss for what Is going wrong here.
30 Replies
Hi Duane!
I just wanted to pop in and share that since this discussion is a bit older, Lara may no longer be subscribed.
If you want to reach out to them directly, you can do so by clicking on their name and selecting the 'Contact Me' button.
Have a great rest of your week!
I copied Joanne's code from above and created a trigger:
var m_names = new Array("January", "February", "March",
"April", "May", "June", "July", "August", "September",
"October", "November", "December");
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth();
var yyyy = today.getFullYear();
if(dd<10) { dd='0'+dd }
var date= m_names[mm]+' '+dd+', '+yyyy;
var player = GetPlayer();
player.SetVar("SystemDate",date);
and added the text variable SystemDate (I even tried it with a different variable and updated the code accordingly) I set up my trigger to execute the javascript when the timeline starts on this slide, I have a text box with %SystemDate% and I am not able to see the date print on the slide when in Review360. Is this a known bug or is there an issue with my above code? I know zero javascript so I am at a loss for what Is going wrong here.
no - nothing special for Review 360
here is a working example (with modern Javascript)
result:
https://360.articulate.com/review/content/6166e558-462b-4a16-a506-0ecb1d507221/review
thanks got it working!
This was totally helpful! From 7 years in the future, thanks Joanne.