Forum Discussion
Adding Date to a certificate
Good afternoon,
I created a course completion certificate and I was asked to add the date of completion. I could not find how to do this. I appreciate some direction. Thank you!
8 Replies
- OphlieLOURENCOCommunity Member
"I would also like to add an icon or image, such as a stamp, to the PDF download when the user completes different parts of the course. Specifically, I want to include this visual element at the end of each course section. How can I implement this in the PDF?"
- DenisaSimCommunity Member
Hello,
I added a diploma at the end of the course, I managed to add java script to automatically retrieve the user's first and last name, but for the date, I would need to retrieve the actual completion date of the course, so that students who have already completed it can have the diploma with the data filled in correctly. What I found and managed to do is only with the current date and it only helps me for future users who will complete it, but what do I do with those who have already completed it?
Please, if someone can help me.
Thanks,- NedimCommunity Member
I can't find my old post that seems to have the answer to your question. I'll start a new topic for you with code that may interest you. I understand that the completion date needs to be "static," so if the learner returns to the course at a later date, the original completion date will still be displayed, correct?
- DenisaSimCommunity Member
Yes, exactly! And the score we use for publishing is 1.2. Thank you for helping me :)
- NedimCommunity Member
You'll need a bit of help from JavaScript. First, create a custom text variable called currentDate in Storyline. Then, insert a text box and reference the currentDate variable. Finally, run the Execute JavaScript trigger with the code below when the timeline starts on this slide:
const currentDate = new Date().toLocaleString('default', { month: 'long', day: 'numeric', year: 'numeric' }); setVar('currentDate', currentDate);Result: January 13, 2025
Find the attached .story file for reference.- OphlieLOURENCOCommunity Member
Thank you ! It is useful.
- MaximilianoFormCommunity Member
Nedim, thank you for the instructions, they worked really well. Much appreciated.
Related Content
- 7 months ago
- 10 months ago
- 10 months ago
- 12 months ago