In this blog, you will learn how to add our own variable to the question in Lectora, a rapid elearning tool. If you want to customize the question functionality, you can do it using variables. In this example, you will check whether the learner has attempted the question or not.
First you need to create questions using the question tool of Lectora. Follow the steps mentioned below:
- Right Click on the Lectora page icon.
- Click on New from the list.
- Click on the Question from the menu.
- Follow all the steps to create the question.
After you create the questions, you need to create a new variable using the “New Variable” button present in “Action Properties” dialog box.
Click on the “New Variable” button to open “Add Variable” dialog box.
Enter the name of the variable “attempt” and enter the initial value as “0”. This variable should be updated after the learner has attempted the question. You need to add an action on the question submission button to modify the value of the variable.
You can enter the attempt variable value to 1 if learner attempted the question. You need to add below action to the submit button:
On : Mouse Click
Action : Modify Variable
Target : attempt
Value : 1
Modification Type : Enter Variable Content
Now as per your requirement, add extra functionality using the “attempts” variable value. For example, you can check the status of the question in the next page and recommend user to go back and complete the exercise first.
Similarly, you can create as many as variables and modify the values for all the questions. In the quiz summary page, you can show the complete status of the questions attempted and the questions not attempted. You can also display customized feedbacks pop-ups with messages.