Moodle Plugins directory: Percipio External Content Sync: Versions: 2.1 | Moodle.org
Percipio External Content Sync
Percipio External Content Sync 2.1
tool_percipioexternalcontentsync
A tool to allow sync of assets from a Skillsoft Percipio site as External content activities using Percipio Content Discovery API.
A Percipio site could contain 40,000 or more assets, this tool allows all these to be synched easily to Moodle. Working with the Skillsoft team you can limit the assets that are included in the sync using the Content Selection Process.
The schedule task runs the sync process which will create/update or deactivate a Moodle Course, consisting of a Single External content activity for each asset synched from Percipio, more details can be found in How it works.
The External content Activity and Course are setup to support Moodle Completion based on completion information returned from Percipio using xAPI.Percipio supports sending a completed xAPI statement for all Percipio Content Types except "Channels" as these are currently not completable to the External content activity module LRS.
Table of Contents
Requirements
To use this plugin you will need:
- Your Moodle site must accessible over the Internet, using HTTPS and a SSL Certificate from a recognised Public Certificate Authority to be able to get results for the Percipio content via the basic LRS functionality provdied by External content activity module.
- A Skillsoft Percipio Site
- A Percipio Service Account with permission for accessing the CONTENT DISCOVERY API
- A LRS Connection Configured by Skillsoft to connect to the basic LRS functionality provdied by External content activity module. You will need to share the information from Moodle with Skillsoft.
- Percipio and Moodle user accounts should use the same user identifier, so for example if your Moodle loginname is
student1
the Percipio account should use a username ofstudent1
.
IMPORTANT : Skillsoft may require you to pay fees to enable the LRS connection and utilise the APIs. Please contact Skillsoft for information.
Installation
Install the External content activity module:
git clone https://github.com/lushonline/moodle-mod_externalcontent.git mod/externalcontent
Or install via the Moodle plugin directory:
Install the plugin the same as any standard moodle plugin either via the Moodle plugin directory, or you can use git to clone it into your source:
git clone https://github.com/lushonline/moodle-tool_percipioexternalcontentsync.git admin/tool/percipioexternalcontentsync
Or install via the Moodle plugin directory:
Configure the plugin.
Percipio Configuration/Setup
IMPORTANT : Skillsoft may require you to pay fees to enable the LRS connection and utilise the APIs. Please contact Skillsoft for information.
Ask Skillsoft to configure the content selection for your Percipio site to support the retrieval of data about content using the CONTENT DISCOVERY API
Ask Skillsoft to configure an LRS connection in Percipio.
- You will need to supply the LRS endpoint and the username/password configured in the https://moodle.org/plugins/mod_externalcontent. You can find these on the settings page.
Ask Skillsoft to create a Service Account in Percipio, this account should have permission to access the CONTENT DISCOVERY API
Moodle Configuration
The following configuration settings need to be set in Moodle.
Name | Setting | Description |
---|---|---|
Percipio Base URL | baseurl | This is the base URL for accessing the Percipio API. See Skillsoft Documentation, this should be either https://api.percipio.com or https://dew1-api.percipio.com. The Skillsoft Team will provide this information. |
Percipio OrgId | orgid | This is a UUID that is unique to the Percipio Site. The Skillsoft Team will provide this information after they have created the Service Account for you. |
Percipio Bearer | bearer | The Percipio API uses a Bearer token for authentication. This should be the unique bearer token created for you to use. The Skillsoft Team will provide this information after they have created the Service Account for you. |
Return assets updated since | updatedsice | This ISO8601 date time (yyyy-mm-ddTHH:MM:SSZ) is passed to the API to determine the assets to return based on when they were updated on Percipio. For example to get all the assets since December 20th 2021 at 10:00:00 UTC you would enter 2022-12-20T10:00:00Z. If left blank all items are returned. After successful sync the value is set to the time of the last sync. |
Max assets per request | max | The Percipio API returns a paged data set of assets. This controls the number returned for each page. The default and maximum is 1000. |
Parent Category | category | When the assets are added to Moodle, sub-categories will be created automatically. This configures the parent category to create them under. See details in MAPPING |
Course thumbnail | coursethumbnail | The Percipio asset contains a URL to a thumbnail image. This setting controls whether this thumbnail is downloaded and added to the Moodle Course. If this is not selected the time taken to sync a lot of assets is reduced. |
Mustache teamplate | templatefile | The Percipio asset is formatted using a Mustache template to produce the course and external content description in HTML, and the HTML for the content property. There is a default template configured in templates/content.mustache , you can copy and edit this template and then upload it here to change the HTML produced. |
The scheduled task is configured to run at 03am every day.
How it works
When the task runs the process is:
- Send Percipio API request using updatedSince value.
- Percipio API will return a JSON response with max assets, and headers to indicate total assets to be returned.
Plugin will process the returned JSON array of assets and take following actions for each:
Process the asset metadata using the selected Mustache template, either default of the custom uploaded to create a Course and External Content Activity.
Check Category for the asset is not null.
- Category exists under the Parent Category configured, skip.
- Category does not exist under the Parent Category configured, create a new category under the parent.
Lookup up the External Content using Moodle Course Module
ID Number
matches xapiActivityID from Percipio, and its containing Moodle Course.- Course does not exist create it
- Course exists and the properties in Moodle are the same as from Percipio, skip.
- Course exists and the properties in Moodle are not the same as from Percipio, update the course overwriting values in Moodle.
- If the Percipio assets is no longer active the course is hidden.
- If the category is not empty, move the course to the category. If it is empty move the course to the parent category.
- Lookup Moodle External Content Activity where activity
ID Number
matches xapiActivityID from Percipio- External Content Activity does not exist create it
- External Content Activity exists and the properties in Moodle are the same as from Percipio, skip.
- External Content Activity exists and the properties in Moodle are not the same as from Percipio, update the activity overwriting values in Moodle.
- Check Course Thumbnail, if coursethumbail setting is enabled.
- Course does not have thumbnail image, add the thumbnail URL and Moodle will download the image.
- Course has thumbnail image, and the thumbnail URL in Moodle is the same as from Percipio, skip.
- Course has thumbnail image, and the thumbnail URL in Moodle is not the same as from Percipio add the new thumbnail URL and Moodle will download the image.
If the JSON response indicates there are more assets to download go back to Step 2.
IMPORTANT: The first time the task runs it can take a number of hours, as Percipio can have upwards of 40,000 assets.
More Details
For more information for how Percipio asset data is mapped to Course and External Content Activities see the MAPPING
Mustache Template
The templates/content.mustache is used to populate:
- Course and External Content Descriptions - the template is passed
showthumbnail=false
andshowlaunch=false
- External Content Content - the template is passed
showthumbnail=true
andshowlaunch=true
, this ensures a hyperlinked image and launch button are included.
License
2019-2023 LushOnline
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Version information
- Version build number
- 2023031500
- Version release name
- 2.1
- Can be updated from
- 2.0, 2.0, 2.1
- Maturity
- Stable version
- MD5 Sum
- 33ca55f152e80d354ac8ab61c615a0d8
- Supported software
- PHP 7.4, Moodle 3.11, PHP 8.0, Moodle 4.0, Moodle 4.1
- Latest release for Moodle 3.11
- Latest release for Moodle 4.0
- Latest release for Moodle 4.1
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
- VCS tag
- v2023031500
Default installation instructions for plugins of the type Administration tools
- Make sure you have all the required versions.
- Download and unpack the module.
- Place the folder (eg "mytool") in the "admin/tool" subdirectory.
- Visit http://yoursite.com/admin to finish the installation