Table of Contents

Lucy Quiz Integration Help

How to create an interactive eLearning page

LUCY allows you to create any given eLearning content on the server itself. You can either create a new awareness page (and upload your own content) or edit the existing pages. This link contains more info on how to edit the existing interactive eLearning pages in LUCY.

How to enable/embed an interactive eLearning quiz page

Background Info: Interactive Quiz Pages allow you to centrally track and analyze the user input (time to fill out a quiz & answers selected) on your LUCY instance.

Where is the tracking data visible? The tracking info is visible in different parts of the application: You can track the awareness clicks via:

◾ Reports (Raw CSV Report or PDF/HTML Export) ◾ Statistics/Recipients ◾ Statistics/Awareness Website

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 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)

b) If you are working on an awareness website within a campaign then click here (see pic)

Lucy then will automatically inject a JavaScript called /js/quiz.js to your template, making quiz-­‐related functions available

Step 2 - Enable the Quiz Variables:

All functions are non-­‐blocking and you may safely call them from any part of the code. Functions you may use are:

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:

In HTML code this might look as the following screenshot:

How to track users watching an awareness video

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 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:

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:

var correctAnswersCount = 0;

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.

correctAnswersCount++;
if (correctAnswersCount >= 5) {
    lucyQuizEnd();
}

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:

lucySetVariable (varName, varValue, errorHandler) - permanently saves some text data for the current user. Parameters:

lucyGetVariable(varName, successHandler, errorHandler) - retrieves previously saved variable by name. Parameters:

Example response:

{
   "variableName": "variableValue"
}

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:

Example response:

{
   "results": {
      "1": "0|1",
      "2": "0|1",
      "3": "0|1",
      ...
   },
   "trained": boolean,
   "trained_at": "datetime"
}

To illustrate how these new functions work, please download and restore a sample of awareness template (Advanced Quiz Functions) by the link: download.

1. Choose the Upload File or Image button or double click on the picture you would like to replace with a custom logo:

2. Open Image Properties and within the Image Info tab click on the Browse Server button in order to access a File manager:

3. Within the File manager press the Upload button or simply drag & drop the required file. In order to select the file double click on it:

4. After the image has been linked to the website you can adapt the size of the picture within the Image Properties:

5. Save the changes.

Troubleshooting

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.