Outline
Using Logic features, it’s possible to show or hide content to users based on them answering questions correctly or incorrectly.
In this article, we’ll show you a simple example of how to use Logic in Evolve to create a course with a pre-assessment, where if a user gets all the answers correct in the pre-assessment they will be shown the course summary.
Things to note
If a user gets all answers correct in a pre-assessment, they will be shown the course summary. This means they do not need to complete the entire course as they have proved their knowledge. If the user gets any of the questions incorrect in the pre-assessment they are shown the main course content to complete.
In order to follow the steps outlined in this article, you will need to create:
- Question Components (pre-assessment)
- The main part of the course (hidden content)
- Course summary (hidden content)
- Triggers to show content based on questions being correct
- Triggers to show content based on questions being incorrect
- Course attainment extension
Create the course content
First, we’ll create the basic course content and structure. You'll need to begin with a new course and go to the page builder*.*
Questions — Pre-Assessment
The first article we’ll create in the course is the article containing your pre-assessment questions.
To begin, add your question component to the first article along with clear instructions for the learner for how they need to complete the pre-assessment.
For example, "Please complete this pre-assessment. If you answer every question correctly you will be moved to the end of the course. If you answer any question incorrectly you will need to complete the main course content."
Hidden content — Answers correct
The next article in the course will be a hidden article that the user is only shown if they get all the answers in the pre-assessment correct.
In this article, we’ll use an Action Button component that will navigate users to another hidden article (the final course summary) once they have clicked it.
Add a new article. Name this clearly and set it to Hidden. Add the Action Button component to the article
Click Edit on the Action Button component. In the General Tab, add text to the component body. For example, you can add:
Well done, you've answered all the questions correctly and displayed a thorough knowledge of the subject. Click on the link to view the course summary and complete the course.
Next, you'll want to follow the below steps in the Button, Appearance, and Behaviour tabs:
- Button tab: Add in your button text and if applicable an icon and image.
- Appearance tab:Set the appearance for your button. *
- Behaviour tab: Set the action of your button to No Action. This will ensure the button takes its action from the trigger you set up in Logic. Set the completion status to Click.
Lastly, set whether you would like the button to be disabled once it has been clicked.
Hidden content — Answers incorrect
The next article in the course will be the article containing the main course content. This is the content that the user must complete should they answer any of the questions incorrectly.
We’ve created a simple example with just an accordion component in that the user will need to complete:
- Add a new article - name this clearly and set it to Hidden.
- Add an accordion component.
- Add some content to your accordion component (this can be test content).
Hidden content — Course summary
The next article will be a hidden article that users are shown once they have completed either the Action Button component or the main course content. All users will interact with this article to ensure the course completion is accurate.
To get started, add a new article. Name it clearly and set it to Hidden. Next, add a checklist component and click Edit on the checklist component.
Next, you'll want to follow the below steps in the General, Items, and Behaviour tabs:
- General tab: Add text to the component body e.g. You've now completed the course. Click on each item below to confirm you understand the content and complete the course.
- Items tab: Add checklist items, these could be the learning objectives for the course
- Behaviour tab: Enable Show feedback, enable show feedback inline, add text to the feedback box e.g. You can now close the course.
You have now created the course content for the pre-assessment course example.
Course triggers
In this section, we'll go over how you can create triggers using Logic to ensure the course behaves in the correct way.
First Trigger: Show hidden content — Correct answers
This trigger will show the hidden content for users answering all the questions correctly. To get started, you'll first need to add a new trigger and set the following conditions:
- Event: Set to Components Correct.
- Condition: For components, add all of the question components in the pre-assessment. For Match, set to All.
- Action 1: Show Hidden Articles. Set the correct article. This should be the article where the content users see if they've gotten all answers correct. Then, set a delay of 1000ms.
- Action 2: Navigate to Article and set the correct article. Then, set a delay of 0ms.
Second Trigger: Show course summary — Questions correct
The second trigger will show users the course summary if they have answered all the questions correctly. To begin, add a new trigger.
- Event: Set to Action Button Clicked.
- Condition: For components, select the first action button.
- Action 1: Show Hidden Articles. Set the correct article. This should be the article where the content users see if they've gotten all answers correct. Then, set a delay of 1000ms.
- Action 2: Navigate to Article and set the correct article. Then, set a delay of 0ms.
Third Trigger: Show hidden content — Questions incorrect
The third trigger will show the hidden content for users answering any question incorrectly. This will be the main course content. Begin by adding a new trigger.
- Event: Set to Components Incorrect.
- Condition: For components, add all of the question components in the pre-assessment. For Match, set to any.
- Action 1: Show Hidden Articles. Set the correct article. This should be the hidden main content article. Then, set a delay of 1000ms.
- Action 2: Navigate to Article and set the correct article. Then, set a delay of 0ms.
Fourth Trigger: Show course summary —After main content is complete
The fourth trigger will show the course summary article after users — who didn’t get all the questions correct— have completed the main course content. To begin, add a new trigger.
- Event: Set to Components Completed.
- Condition: Add any components that are part of the main course content you require the user to complete. In this instance, we are just using the accordion component.
- Action 1: Show Hidden Articles. Set the correct article. This should be the hidden course summary article. Then, set a delay of 1000ms.
- Action 2: Navigate to Article and set the correct article. Then, set a delay of 0ms.
Course attainment settings
The last thing to do is set up the course attainment extension to ensure completion is tracked. The completion will be based upon users completing the checklist component.
All users will be directed to this component regardless of whether they answered questions correctly or incorrectly.
- Go to Extensions.
- Enable Course Attainment Extension and click Edit.
- In the General tab, set up the messages as you require.
In the Behaviour tab, click Components in the Course Attainment Method dropdown menu.
In the Select components section_,_ choose the Checklist component.
You have now completed the setup of the course. This example could be altered using triggers to show content based on the specific questions the user got incorrect, rather than having to complete all the content.
Did this article help?
Let us know by leaving a star rating or review at the top of this article.