ENCRYPTING STORYLINE OUTPUT FILES
Mar 13, 2018
Top of the day all. Please my employer (a school) bought a new software which allows students to practice past questions in CBT form.
On launching the app, i noticed it was designed by storyline. My employer has mandated me to get something like that knowing fully well i am familiar with storyline.
My challenge now is how to encrypt the file in a way that users will require activation code to use the output file just like the software that was purchased recently.
N:B - we send user id to the developer who will send us the activation code before we make use of the software fully.
thanks all.
16 Replies
On your first slide, use an input field for the user to enter their code. If the code is set (the same code for everyone and it never changes) you can use a trigger to test if the code the user input is equal to the value you expected.
If the code varies from user to user but follows a specific format, you can use JavaScript to test the code's pattern against a template to verify that it is valid.
To use JavaScript, you will create a regular expression object (RegExp) to test against. It would look something like the code below. This script is testing for a code comprised of any capital letter followed by 2 numbers (0-9) followed by ELH! followed by 2 more numbers (0-9) with any lower case letter at the end.
//Get the StoryLine player and access the code entered by the user
var player=GetPlayer();
var courseCode = player.GetVar("Course_Code");
//Create a function to test the code
function is_valid(courseCode) {
regexp = /[A-Z]+[0-9]+[0-9]+ELH!+[0-9]+[0-9]+[a-z]/;
if (regexp.test(courseCode)) {
return true;
} else {
return false;
}
}
//Run the function and send the result back to StoryLine
var testResult = is_valid(courseCode);
//player.SetVar("Valid",testResult);
You can see a working SL360 example here.
Once again Owen...awesome!
Would you mind sharing that story file?
Thank you so much for everything you help us with!
Please can i share my storyline 3 file as am finding it hard getting it done?
I like Owens solution, it may be better to go with a code that is a little more difficult to create, perhaps use Any Capital letter + 4 digits + ELH but the 4 digits have to be a multiple of 7.
I suppose I am being a bit over the top because they would have to know the format of the code to input it.
SL3/360 file attached.
I used a simple "code template" but you could add more special characters that would need to be in specific positions to increase the difficulty.
Thank you Owen. I have to admit, I am learning from you on these forums!
If ever you create a javascript course, SIGN ME UP! :)
Thank you again!!
THANKS ALOT. I APPRECIATE
THIS IS THE ERROR I GOT
I HAVE TRIED THE SCRIPT ON SL3, AINT WORKING.
See attached SL3 file. It is still working fine for me on both SL3 and SL360.
Hi Owen,
Thanks again for all you provide here. I have a question for you.
Do you know if the elearning guild provides a video of the 2017 conference where you presented "Storyline JavaScript, Variables, and Triggers—Oh, My!"
I would love to go through that if possible.
Take care!
Thanks. its working now.
Connect with me on LinkedIn and I'll arrange to walk you through it.
https://www.linkedin.com/in/owen-holt-649a515/
I actually submitted a proposal to the guild to do a full day pre-conference workshop on JavaScript for DevLearn this year that I am hoping they will accept. Keeping my fingers crossed.
No problem, happy to help.
Hi Owen,
Just sent the invite at LI.
THANK YOU AGAIN!! You ROCK!
This discussion is closed. You can start a new discussion or contact Articulate Support.