- 19 Oct 2022
- 3 minutes to read
Configure xAPI with Totara
- Updated on 19 Oct 2022
- 3 minutes to read
It is possible to add plugins to Totara so that you can use any xAPI/Tin Can-compliant content you have in a course. This content could be available via a URL or as a package in a zip file, it can then be both integrated into the course and have any actions taken in the activity recorded in an external Learning Record Store (LRS). To achieve this you would also need to add a logstore plugin to Totara that works with an external LRS. Below we will explore how to do both of these things.
Logstore plugin
To set up xAPI with Totara you will need a Totara site and a LRS (Learning Record Store), this is a standalone application which can either be installed locally (for example using the open source tool Learning Locker) or you can pay for one (if you're not comfortable setting this up yourself). Additionally, you will also need two plugins: the Logstore xAPI (Moodle plugin) and the xAPI Launch Link (Moodle plugin).
There are two parts of this setup: the Logstore plugin and then the Launch Link plugin.
First, you will need to configure the Logstore xAPI plugin as this can transfer events in your LRS. This can only happen once you have installed the plugin on your Totara site (guidance on plugin installation can be found within the plugin).
- Configure your chosen LRS. You should be able to find guidance on this from your chosen provider.
- You will need to set up a Client within your LRS. Again, instructions on this should be available from your LRS provider. You may have a client supplied for you when you create the LRS, or you might need to create one.
- On your Totara site, go to Quick-access menu > Plugins > Logging > Manage Logstores.
- Configure this for your LRS using the Client details from step 2.
- Finally, click Save changes.
Tin Can Launcher
You have now configured the Logstore xAPI plugin. If you start performing actions in your Totara site (such as setting up courses and logging in or out), then go into your LRS you'll notice the statements of events will be transferred into your logstore. In the documentation for the Logstore xAPI plugin, you will find a list of all the supported events that will be transferred.
The second stage is to configure the xAPI Launch Link plugin. This will let you launch compatible xAPI learning from Totara. The steps below take place after the xAPI Launch Link plugin has been installed; instructions on how to do this can be found within the plugin.
- To configure the plugin, go to Quick-access menu > Plugins > Activity modules > Tin Can Launch Link.
- Add the Client information (as in the Logstore configuration above).
- Click Save changes.
You can then go to a course and follow these steps:
- On the course, click Turn editing on.
- Click Add an activity and select Tin Can Launch Link.
- Fill in the details as required (mandatory fields marked with an asterisk).
- Click Save changes.
Now you can go to the course and launch the Tin Can/xAPI content you have linked via a package or URL. The details of events carried out in the content (such as launching, attempts made, and completion) will be transferred to your LRS.
In config
It is possible to allow NGINX and other webservers to log usernames in access logs. When you allow logging by a webserver in the access logs they can send the username as a custom header, which can be logged and stripped out if needed.
To configure this just add the variable $CFG->headerloguser to the config.php file. You can read more about this and possible values in config-dist.php.
© Copyright 2024 Totara Learning Solutions. All rights reserved.