In this article, you'll learn how to set up automatic authentication from Moodle to the Motrain dashboard. 


 



 

Set-up prerequisites

 

Moodle plugin block_mootivated v1.4.0 or greater

Moodle plugin local_mootivated v1.7.0 or greater

Moodle web services enabled

Moodle REST protocol enabled

 

SSO prerequisites

 

A Moodle account with the permission local/mootivated:ssodashboard.

A dashboard account with the same email address as in Moodle.

The dashboard user’s account must be linked to the Moodle site.

The Moodle site must be publicly accessible.


Step 1:  Moodle set-up

Create an API token for the dashboard

 

Navigate to the external services.

 

 

Locate the Mootivated dashboard service, and follow “Authorised users”.

 

 

Select the Admin User.

 

 

Navigate to the external tokens

 

 

At bottom of the page, click the link “Add” to create a new token.

 

Select the Admin User, and select the “Mootivated dashboard service”. See below:

 

 

Validate your changes and make note (copy/paste) of the generated token. It will be displayed on the previous screen listing all tokens, probably on the last page if there is more than one. Here is an example:

 

 

 

NOTE:  Please submit your Moodle URL and site Token as a Help Ticket.  We will link your site to our server.

 

Step 2:  Authorize users to SSO to the dashboard

Navigate to the “Roles” page, and click “Add a role”.

 

 

Do not use any archetype or role as a base for this new role.

 

 

Enter the following details:

 

 

Only allow the one permission local/mootivated:ssodashboard.

 

 

Finalize by clicking “Create role”.

  

Now assign the role to the users who will be allowed to SSO to the dashboard. Navigate to “Assign system roles”.

 

 

Select the “Mootivated SSO” role and select the relevant users.

 

 

The selected users will be allowed SSO to the dashboard from the block, provided they are registered with the same email address that exists on the dashboard, and they belong to an account linked to this Moodle site.  You do NOT want students/learners to have this role.

  

Step 3:  SSO to the dashboard

 

Provided the dashboard and Moodle have been set-up, after logging in Moodle as a user who has the permission to SSO to the dashboard, the Mootivated block should display a link to the dashboard.  Note:  the email address in the user's Moodle profile MUST match the email address assigned to them on the Motrain dashboard.

 

 

The first time an account connects to the dashboard from Moodle, they will have to confirm that the Moodle site is allowed to authenticate them. A verification code is sent to the person’s email address.

 

 

Once confirmed, a Moodle site will no longer require verification.