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
OWEN HOLT

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.

O. Michael Adeniran
Owen Holt

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.

Please can i share my storyline 3 file as am finding it hard getting it done?

This discussion is closed. You can start a new discussion or contact Articulate Support.