Articulate Storyline 360: Print Rated Response in PDF Format

Articulate Storyline 360: Print Rated Response in PDF Format

The application of JavaScript in Storyline 360 is essential because of its adaptable nature. This flexible option in Storyline 360 has opened the doors for new thoughts to develop custom elearning interactions. We developed a custom interaction where a user can give rating out of 5 and can write their opinion in a text entry field for the given statement. Finally, they can take a print out of the rated response and the entered text in a PDF file.

Let’s see the steps to print your Rated Response in PDF:

Step 1: First, add questions and text entry boxes to your project. Then, add layers with respect to the questions and text entry boxes.

Note: We have added five sample questions, therefore we have created 10 layers both for questions and text entry boxes.

p1

Step 2: Give the Action trigger as Execute JavaScript. Then add the following JavaScript and assign it when Timeline Starts.

Note: Maximum character length of the text entry box is 200.

p2

Step 3: Create Variables for each question and write the question in their Default value.

p3

Step 4: Then write the Variable name in between percentage symbol as shown below.

p4

Step 5: Also create True or False variables for each question.

p5

Step 6: Assign layers for each rating number and add the following triggers

p6

Step 7:  Add the below triggers with JavaScript on Submit button in question1 layer (text entry).

surveyController.setResponse
(GetPlayer().GetVar('Sur_currQues'),'Sur1_res1');

In the above JavaScript you need to change the variable name according to the question layer (text entry box).

Example – For question2 layer:

surveyController.setResponse
(GetPlayer().GetVar('Sur_currQues'),'Sur1_res2');

p7

Step 8: Now, to get your rated response in PDF you need to add JavaScript on 1st Question (Base layer) as shown here.

surveyController.setQuestionText('Q1','Sur1_q1');
surveyController.setRating('Q1',1);

In the above JavaScript you need to change the variable name according to the question layer (questions).

Example: For 2nd Question

surveyController.setQuestionText('Q2','Sur1_q2');
surveyController.setRating('Q2',1);

p8

Step 9: After that create Print layer and add the following JavaScript to print your rated responses in PDF.

p9

Step 10: An HTML page has been created and available for download at the end of this blog where your result will be displayed.

p10

Step 11: Place it in your local drive and create a Web Object on the base layer and give the location of the HTML page in web object.

p11

Step 12: Finally, Publish and view the output.

p12

Note: This file does not work in Preview mode. Publish the file to check the functionality.

This customized rating response interactivity is useful when your elearning course is being rated and reviewed by your learners. You can pose questions to your learners about the course and can get feedback where it helps you in refining your course.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *