User Tools

Site Tools


create_an_interactive_e-learning_template

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
create_an_interactive_e-learning_template [2017/07/29 21:51] – [How to track users watching an awareness video] lucycreate_an_interactive_e-learning_template [2021/04/30 11:38] (current) – [Advanced functions] lucy
Line 19: Line 19:
 **How to configure the quiz?** **How to configure the quiz?**
  
-**Step 1 - Enable the Quiz Feature**: First of all, in order to enable quiz answers tracking, you should set a “Quiz” checkbox for awareness template you are working on. There are two places where you can enable it:+**Step 1 - Enable the Quiz Feature**: First of all, in order to enable quiz answers tracking, you should set a “Quiz” checkbox for the awareness template you are working on. There are two places where you can enable it:
  
 a) If you are working on an awareness template in the awareness template section then click here (see pic) a) If you are working on an awareness template in the awareness template section then click here (see pic)
Line 27: Line 27:
 b) If you are working on an awareness website within a campaign then click here (see pic) b) If you are working on an awareness website within a campaign then click here (see pic)
  
-{{ q2.png?600 }}+{{ ::awareness_website_quiz.png?600 |}}
  
 Lucy then will automatically inject a JavaScript called /js/quiz.js to your template, making quiz-­‐related functions available Lucy then will automatically inject a JavaScript called /js/quiz.js to your template, making quiz-­‐related functions available
Line 36: Line 36:
  
 a) lucyQuizStart(): starts a  quiz for the current user and tracks the time of when the quiz has been started (Parameters: None) a) lucyQuizStart(): starts a  quiz for the current user and tracks the time of when the quiz has been started (Parameters: None)
 +
 +:!: **Attention!** Calling function lucyQuizStart() resets the current quiz progress. If the user starts the quiz from the beginning, then the previous results will be reset. To prohibit passing the quiz several times, you should enable option '__Ignore repeated answers in awareness__' in the campaign base settings.
  
 b) lucyQuizAnswer(question, correct): sends answer report to the server with the parameters: b) lucyQuizAnswer(question, correct): sends answer report to the server with the parameters:
  
-  * question -question id (integer) +  * question – question id (integer) 
-  * correct –correctness of the answer (boolean)+  * correct – the correctness of the answer (boolean)
  
 In HTML code this might look as the following screenshot: In HTML code this might look as the following screenshot:
Line 48: Line 50:
 ===== How to track users watching an awareness video ===== ===== How to track users watching an awareness video =====
  
-**Method 1: using the quiz checkbox**+When using an awareness training video in LUCY one can consider it useful to track down the number of users that have played the video after receiving the awareness training email or after redirect to the awareness website. Some statistics regarding the average time of the video being played by recipients might also be useful in terms of awareness campaign effectiveness assessment and personnel training productivity. 
 + 
 +LUCY allows you to verify if a training video was played. The video-tracking statistics are not personified and are displayed as a general chart in the report (PDF \ DOCX \ HTML) and on the statistics page. Once a recipient finished watching the video he should be marked as "Trained"
 + 
 +To find more information regarding this feature, please, consult this [[video_tracking|chapter]]. 
 + 
 + 
 +===== Extended method of tracking the end of the quiz  ===== 
 + 
 +Starting with version Lucy 4.6, there is a new option called “Use extended method of tracking the end of the quiz”, which is designed to track when the user finishes the quiz. The option is available on the Awareness Template editing page: 
 + 
 +{{ ::extended_method_quiz.png?&600 |}} 
 + 
 +Default state: disabled. 
 + 
 +In order for this method to work, you will need to add a call to an additional function "**lucyQuizEnd()**" without any parameters. This function should be launched after the user answers the last question in your quiz. 
 + 
 +:!: Attention! Enabling this option without calling the "lucyQuizEnd()" function will cause recipients to not be marked as "trained"
 +By default, Lucy marks each recipient as "Trained" after receiving the very first answer to the quiz. With the option "Use extended method of tracking the end of the quiz" and calling the function lucyQuizEnd(), the Trained sign can be set at the moment when it is necessary. 
 + 
 +==== An example of usage the function lucyQuizEnd() in awareness training ==== 
 + 
 +Using the awareness template "Internet Security Exam" as an example, add the function lucyQuizEnd() to the source code for processing quiz answers. The quiz has 9 questions. The goal is to find victims who give 5 correct answers to the quiz. Enable the option "Use extended method of tracking the end of the quiz" within the Website section of the Awareness Settings in the campaign. 
 + 
 +Add a new variable "correctAnswerCount" to keep the amount of correct answered questions: 
 + 
 +<code> 
 +var correctAnswersCount = 0; 
 +</code>  
 + 
 +{{ ::awareness_quiz_new_variable.png?nolink&600 |}} 
 + 
 +Find the place in the code where function lucyQuizAnswer is called and insert a call of the function lucyQuizEnd after it with the condition as shown below. 
 + 
 +<code> 
 +correctAnswersCount++; 
 +if (correctAnswersCount >= 5) { 
 +    lucyQuizEnd(); 
 +
 +</code>  
 + 
 +{{ ::awareness_quiz_end.png?nolink&600 |}} 
 + 
 +Save the template and run the campaign. After 5 quiz questions are answered correctly, the recipient will be marked as "Trained"
 + 
 +:!: **Attention**. Using the function //lucyQuizEnd()// together with the option "**Ignore repeated answers in awareness**" __should be avoided__, since this function ignores the restrictions set by that option. 
 + 
 +===== Advanced functions  ===== 
 + 
 +Since version 4.7.7, Lucy comes with few additional functions: 
 + 
 +**lucyQuizStart (quizNumber, countQuestions, errorHandler)** - starts a quiz for the current user and tracks the time of when the quiz has been started. Useful for templates with randomly sorted questions and variable number of questions. Parameters: \\ 
 +  * //quizNumber// - index of the quiz (default: 0). Other values except zero are reserved and will be supported in future versions. \\ 
 +  * //countQuestions// - total number of questions in exam which is asked to the user (allowed values: 1...999). \\ 
 +  * //errorHandler// - (optional) a callback function to be called with the thrown error. \\ 
 + 
 +**lucySetVariable (varName, varValue, errorHandler)** - permanently saves some text data for the current user. Parameters\\ 
 +  * //varName// - variable name (text, max length: 255) \\ 
 +  * //varValue// - variable value (text, max length: 255) \\ 
 +  * //errorHandler// - (optional) a callback function to be called with the thrown error. \\ 
 + 
 +**lucyGetVariable(varName, successHandler, errorHandler)** - retrieves previously saved variable by name. Parameters: \\ 
 +  * //varName// - variable name (text, max length: 255) \\ 
 +  * //successHandler// - a callback function to be called with the variable's value. \\ 
 +  * //errorHandler// - (optional) a callback function to be called with the thrown error. \\ 
 + 
 +Example response: 
 + 
 +<code> 
 +
 +   "variableName": "variableValue" 
 +
 +</code> 
 + 
 +Since version 4.8.1, Lucy comes with a new additional function: 
 + 
 +**lucyQuizResults(quizNumber, successHandler, errorHandler)** - retrieves the current progress of the quiz with a list of answered questions. Parameters: \\ 
 +  //quizNumber// - index of the quiz (default: 0). Other values except zero are reserved and will be supported in future versions. \\ 
 +  //successHandler// - a callback function to be called with the variable's value. \\ 
 +  * //errorHandler// - (optional) a callback function to be called with the thrown error. \\ 
 + 
 +Example response: 
 + 
 +<code> 
 +
 +   "results":
 +      "1": "0|1", 
 +      "2": "0|1", 
 +      "3": "0|1", 
 +      ... 
 +   }, 
 +   "trained": boolean, 
 +   "trained_at": "datetime" 
 +
 +</code>
  
-This method allows you only to verifyif the video was playedIt does not allow tracking of the video lenghtPlease use method 2 to track more details.+To illustrate how these new functions workplease download and restore a sample of awareness template (Advanced Quiz Functions) by the link: {{ ::sampletemplate.tar.gz |download}}.
  
-  * Mark the awareness template or website as "Quiz"+===== How to customize a logo =====
  
-{{ quiz_enabled_c.png?600 }}+1Choose the **Upload File or Image** button or double click on the picture you would like to replace with a custom logo:
  
-  * Make sure your awareness website (or template) has the quiz-question-titles.js static file with the following content: {"1""Video Played"+{{::contentlogo.png|}}
-  * Add "onload" attribute to body tag of HTML content, so you get the following:+
  
-  <body onload="lucyQuizStart();">+2. Open **Image Properties** and within the **Image Info** tab click on the **Browse Server** button in order to access a [[file_browser|File manager]]:
  
-  * Add "onplay" attribute to video tag of HTML, so you get the following:+{{::imageproperties.png|}}
  
-  <video onplay="lucyQuizAnswer(1,1);">+3. Within the [[file_browser|File manager]] press the **Upload** button or simply drag & drop the required file. In order to select the file double click on it:
  
 +{{::uploadlogo.png|}}
  
-**Method 2: using the video tracking JavaScript**+4. After the image has been linked to the website you can adapt the size of the picture within the **Image Properties**:
  
-Using our custom tracking JavaScript which can be downloaded {{::lucy-event-javascript.zip|here}}, allows you to track video's played in LUCY's "flowplayer" which are used for all our video templates. The JS should be inserted into the bottom of the page where the flowplayer video is uploaded:+{{::sizeadaptation.png|}}
  
-{{ video_tracking_new.png?600 }}+5. Save the changes.
  
-This script allows you to track a video start and finish event and also display the progress in statistics (rounded percent in different event types like video-10 for 10% video played or video-90 for 90% video played, etc.). When the video is started, it sends a "video-start" event. When the video is finished (played to the end), it sends a "video-finish" event to LUCY which leads to statistics like in this graphic:+===== Troubleshooting =====
  
-{{ video_stats_sample.png?600 }}+__Issue.__ Lucy marks the recipients as 'Trained', while no quiz answers were given. \\ 
 +__Solution__: Enable the option "**Quiz**" within the Website section of the Awareness Settings in the campaign.
  
 +__Issue.__ Lucy does not mark the recipients as 'Trained' despite received positive Quiz answers. \\
 +__Solution__: Disable the option "**Extended method of tracking the end of the quiz**" within the Website section of the Awareness settings in the campaign or change your awareness template as described above in this article.
create_an_interactive_e-learning_template.1501357907.txt.gz · Last modified: 2019/07/25 12:52 (external edit)