Académique Documents
Professionnel Documents
Culture Documents
Isabelle Aubin
Programmer-Analyst
Table of Contents
INTRODUCTION ......................................................................................................................................................................................................................... 3
STEPS ......................................................................................................................................................................................................................................... 4
This document aims to explain the integration of a javascipt timer with storyline that uses a random question bank. We did this to counter a bug
with the storyline timer when you use random questions. In future versions of storyline, perhaps the following procedure will no longer be
necessary.
Javascript timer with a random question bank
Steps
Storyline Integration 4
Javascript timer with a random question bank
Storyline Integration 5
Javascript timer with a random question bank
c) Copy the following code, « starttimer(); » in the text box and click « OK ».
Storyline Integration 6
Javascript timer with a random question bank
Storyline Integration 7
Javascript timer with a random question bank
Storyline Integration 8
Javascript timer with a random question bank
c) Copy the following code, « stoptimer(); » in the text box and click « OK ».
Storyline Integration 9
Javascript timer with a random question bank
a) Add the following variables : Nombre_question, Question et Timer_test. The variable Question will be displayed at the top of each
question.
Storyline Integration 10
Javascript timer with a random question bank
You have to do the next steps for each question in the question bank
b) You have to create a layer for the error message when the timer is up with a button that returns the user to the results page.
Storyline Integration 11
Javascript timer with a random question bank
Storyline Integration 12
Javascript timer with a random question bank
d) You have to add a trigger to the start of the sequence and click the button script « timeline starts ».
Storyline Integration 13
Javascript timer with a random question bank
Storyline Integration 14
Javascript timer with a random question bank
f) You have to add 2 triggers the button « next ». Please note the order of the triggers are important.
Storyline Integration 15
Javascript timer with a random question bank
Storyline Integration 16
Javascript timer with a random question bank
Storyline Integration 17
Javascript timer with a random question bank
<script src="story_content/timer.js"></script>
Storyline Integration 18
Javascript timer with a random question bank
Storyline Integration 19
Javascript timer with a random question bank
d) Put the file « timer.js » in the folder « story_content » of the output of the project
Storyline Integration 20
Javascript timer with a random question bank
o 05 :00
o 4, 59
Storyline Integration 21
Javascript timer with a random question bank
f) Place the file « timer.css » in the folder « mobile » of the output of the project
Storyline Integration 22