Watershed can receive data from any xAPI conformant Activity Provider. Many Watershed reports are flexible and you can configure Watershed to display useful visualizations and metrics from almost any xAPI data set. To help you get the most out of your data, we’re working with a number of product vendors to ensure that the data they send is optimized to produce the best possible results in Watershed. We want to help you to configure Watershed reports in the best way possible to display that data.
This guide tells you how to correctly setup up xAPI tracking in Moodle, connect Moodle to Watershed and then configure Watershed to get the best results. As Totara is built on Moodle, this guide works for Totara too.
- User Types
- Any user with access to the report builder (Global Admins, Area Admins, and some Users) can create reports looking at Moodle data. Only Global Admins can set up the integration.
- Available on paid plans (Analyst, CLO, and Enterprise).
- Anybody can use this feature.
Moodle xAPI plugins
Out of the box, Moodle LMS includes only basic functionality which is then extended by the installation of plugins. Moodle’s xAPI tracking is no exception to this modular approach and there’s three plugins that you should install on your Moodle in order to get started with xAPI in Moodle.
You should make sure that you keep up to date with the latest versions of each plugin. There are dependancies between the plugins, so you should install them all even if you do not plan to use them all. Also make sure that cron is running regularly on your Moodle. See https://docs.moodle.org/30/en/Cron.
You also need to ensure that your server is configured to allow the PHP functionality required for it to communicate with Watershed's API. For example fopen will need to be enabled using the
allow_url_fopen setting in your
xAPI Launch Link
The xAPI launch link offers a way to launch xAPI learning experiences such as those created in common authoring tools like Storyline. It supports launch of either content hosted anywhere on the internet, or zip packages uploaded to Moodle. The plugin will launch the content, telling the content to send data to Watershed.
You can download the latest version from the Moodle plugins directory. Be sure to keep the plugin updated regularly to ensure you have the latest features and updates. Ask us if you need any help with the installation and see below for instructions on how to populate the LRS settings.
The ability to launch xAPI content is a core feature of any LMS claiming xAPI support.
The Logstore xAPI plugin enables tracking of activity within Moodle itself including page views, assignment submissions, quiz attempts and question answers. This means you can now report on this LMS activity alongside your other learning data.
You can download the latest version from the Github. Be sure to keep the plugin updated regularly to ensure you have the latest features and updates. Ask us if you need any help with the installation and see below for instructions on how to populate the LRS settings.
Heads up: This plugin requires at least the CLO level pricing tier for basic functionality and Enterprise for SSO.
The Watershed plugin contains integrations specific to Watershed LRS, including SSO, person association and Intelligent Report Creation. The SSO integration adds a link to Moodle's Reports menu for users that have the 'Watershed Report Link' capability (managers and admins by default). The person association feature adds a scheduled task that will associate personas (email accounts and Moodle accounts) with a single Watershed person so that individuals can be reported on as one even if xAPI data identifies them in different ways. Intelligent Report Creation is another schedules task that will create a collection of Watershed report reports for the most active X Moodle courses (X is configurable). These reports are created on a special 'Moodle' dashboard that's managed automatically by Moodle to keep them separate from the reports you create yourself.
Connecting to Watershed
With the plugins installed, you now need to connect to Watershed. Each plugin has it’s own separate settings so will need to configure them separately.
Before configuring the Logstore plugin, you’ll need to add an activity provider for each plugin to Watershed and make a note of the endpoint, key and secret. You should ensure that API Access is enabled for the Activity Provider you create for the Launch Link and the Watershed plugins; the Logstore plugin does not require API Access.
xAPI Launch Link
The settings for the launch plugin can be found at Site administration > Plugins > Activity Modules > Tin Can Launch Link
Enter the Endpoint (the LRS endpoint value from Watershed), Username (the ‘Key’ in Watershed) and Password (Watershed’s ‘Secret’). Choose 'Watershed' as your LRS integration.
The remaining settings have clear help text and can normally be left as default if you are unsure.
Once populated, these settings will be used for any xAPI activity you create unless you choose to override these defaults.
The settings for the log plugin can be found at Site administration > Plugins > Logging > Logstore xAPI
Enter the Endpoint (the LRS endpoint value from Watershed), Username (the ‘Key’ in Watershed) and Password (Watershed’s ‘Secret’).
For best performance, make sure that Send statements by scheduled task? is ticked. If this setting is unticked, individual statements will be sent every time a learner interacts with Moodle. If you have a lot of active learners, this will affect Moodle’s performance.
If you find the plugin is not sending data, please check the following:
- Use the latest version of the plugin at https://github.com/xAPI-vle/moodle-logstore_xapi/releases
- Ensure the logstore plugin is enabled in Moodle's admin/settings.php?section=managelogging
- Make sure you are using a learner, not an admin. Admins may not be tracked.
- Check your standard log database table (mdl_logstore_standard_log) for tracked events.
- Check the mdl_logstore_xapi_log table. If there is any data in there, this represents events that are waiting to be sent.
- Check that either the plugin is configured not to send statements by scheduled task, or that if it is sending by scheduled task that you have the cron task running and that it has run. Look for the task \logstore_xapi\task\emit_task on the page admin/tool/task/scheduledtasks.php. (For production, you should send statements by scheduled task; for testing and demos, perhaps not.)
- Check the mdl_logstore_xapi_failed_log table to see if events are failing to send.
- Check the Watershed error log in Data / Error Log
- Check for xAPI statements in Data / Data Search. Press refresh to check for new statements.
- Check that the endpoint, key and secret are configured correctly in the plugin, and that in Watershed the credentials are configured with LRS access.
- In Moodle's admin/settings.php?section=debugging page, turn developer errors to maximum and check if you get any errors when performing tracked events as a learner.
- Disable errors and try again.
The Watershed plugin is configured in two places:
- A config.php file in the plugin folder contains the settings relating to SSO. An example config file named config-dist.php is included in the plugin. We recommend that you use this as a starting point and rename it config.php.
- Plugin settings within Moodle that contain the settings relating to person association and Intelligent Report Creation.
The table below outlines the settings you need to edit in the config.php file in the plugin folder.
|moodleurl||The full URL of your Moodle site|
|moodlepath||The path to your Moodle directory. For example if your Moodle is hosted at https://www.example.com/moodle then the path your be 'moodle'. If your Moodle is hosted at https://moodle.example.com then the path is ''.|
|watershedurl||The URL of the Watershed instance you are using. Normally this is either https://sandbox.watershedlrs.com or https://watershedlrs.com|
|orgname||The short name of your organizartion in Watershed. You will need to ask us to provide this.|
|orgid||The id of your organization in Watershed. The organization id is included within the Watershed LRS Endpoint URL. For example if the endpoint URL ishttps://watershedlrs.com/api/organizations/1234/lrs/ then the organization id is 1234.|
|apiuser||The username of the Moodle API User you created when setting up the xAPI Launch Plugin.|
|apipass||The password of the Moodle API User you created when setting up the xAPI Launch Plugin.|
The settings for the Watershed plugin can be found at Site administration > Plugins > Reports > Watershed Report Link. The table below explains each of the settings.
|Server||Whether you are using Watershed sandbox or production servers.|
|Organization id||The id of your organization in Watershed. The organization id is included within the Watershed LRS Endpoint URL. For example if the endpoint URL ishttps://watershedlrs.com/api/organizations/1234/lrs/ then the organization id is 1234.|
|Key||The Watershed Activity Provider key.|
|Secret||The Watershed Activity Provider secret.|
|Number of courses||
Moodle will create report reports for the most active X courses based on data from the last month. Configure the number of courses Moodle will create reports for here.
This field is used for debugging and demo Moodle sites where there is no new data after a certain date. Leave this field blank on production Moodle sites.
There are some SSO settings in Watershed that need to be completed too. These settings are only accessible to the Watershed team, so you will need to work with us to set this part up.
As part of this process you will need to obtain or create a key and certificate for SSO. An example key and certificate are included in the plugin simplesamlphp/cert folder. These will work, but for security reasons it is strongly recommended that you do not use these.
Moodle quiz settings
To get the most out of Moodle quiz tracking, it’s important to ensure that the quiz is configured correctly. In particular you should ensure that the following settings are complete and correct:
- ‘Grade to pass’ in the ‘Grade’ section of the quiz settings.
- ‘Maximum Grade’ in the top right corner when editing the quiz.
- Grades of each question (these default to 1).
Make sure that the total of all the question grades is equal to the maximum grade and that the grade to pass is equal to or lower than that. Don’t make your quiz impossible to pass or score 100%!
Please note: Moodle supports a large and extensible number of question types, not all of which work well with the xAPI Logstore plugin. If you’re going beyond simple multichoice and true-false questions, be sure to test data from your quiz carefully before going live. Grading of questions that are not automatically graded will not be reported by the plugin.
Moodle assignment settings
If using Moodle assignments, be sure to populate the Grade settings section, especially the Maximum points and Grade to pass fields.
Configuring Reports for Moodle data
Once you have connected Moodle to Watershed and data is flowing in, you can start to create report reports in Watershed. The launch plugin could be used to launch any type of content so we can’t provide specific guidance around the data it will output here. This section offers guidance on reports you can create to explore data from the Logstore plugin, in addition to those automatically created via Intelligent Report Creation.
Quizzes and Assignments
Data from Moodle quizzes and graded assignments is best represented using the the Activity Report. Simply create a new Activity Report, searching for the quiz or assignment name in the Activities filter.
Key questions answered: How did learners and groups do on a quiz or assignment? How effective are particular quiz questions?
Please note: data about assignments is not sent to watershed until the assignment is graded. Data about quizzes is sent as soon as the quiz is submitted (or whenever cron runs next).
Other Moodle activity is not tracked with the same level of detail as quizzes and assignments and the data is restricted to measuring level of activity in Moodle. Here reports that use measures (such as the Leaderboard) are most useful. Using simple configuration, you can use the Statement Count, Unique Activity Count and Timeline measures organized by person, activity or time frame.
Using Advanced configuration you can create custom measures specific to different Moodle events.
The number of times things were viewed on the Moodle.
Use Unique Activity Count with a verbIds filter to count the number of things viewed.
The number of times SCORM and xAPI learning experiences were launched.
Use Unique Activity Count with a verbIds filter to count the number of things launched.
Key questions answered: Which parts of Moodle are most popular? Which learners are most active? How does usage change over time?