-
Functional Test
-
Minor
-
Moodle 4.3
This test requires admin access, ngrok and credentials to Clever SSO provider.
Prerequisites/Setup
- A moodle site publicly available, you can use ngrok for that.
- Go to https://apps.clever.com/signup and create a developer account
- Click on Settings in the left-hand menu of the developer dashboard
- Copy/note the Client ID and Secret for configuring Clever in Moodle later
- Configure Instant Login settings:
- Add Redirect URL under OAuth Settings: {Your Moodle baseurl}/admin/oauth2callback.php
-
-
- Add Supported User Types under Additional Settings: Students, Teachers
-
- Click on Home in the left-hand menu of the developer dashboard
- Under Your Districts, click on your district (will be of the form "#DEMO {Application name} (Dev) Sandbox")
- Scroll down and find/copy the Portal URL under Clever SSO Info
- Download and extract the default sandbox user list from Clever.
- We will use the information in students.csv and teachers.csv to log in later in the Portal URL.
- For students, the username and password are both the "Student_number".
- For teachers, the username and password are both the "Teacher_number".
- We will use the information in students.csv and teachers.csv to log in later in the Portal URL.
- Configure the Clever OAuth2 provider in Moodle:
- Enable OAuth2 authentication plugin (Site administration > plugins > manage authentication)
- Create / configure Clever OAuth2 using client ID and secret (Site administration -> Server -> OAuth 2 services)
- Click on the Clever button
- Populate ID and secret values
- Untick "Require email verification"
- Tick "I understand that disabling email verification can be a security issue."
- Save changes
Test case
- Open an incognito browser window
- Open the link to the Portal URL for your Clever dev application (see step 4.2 in prereqs above)
- Log in to the portal as a student user account indicated in the downloaded CSV file.
- In the same window, navigate to your Moodle login page
- Click on the Clever login button
- Confirm that you are able to log in to Moodle with the Clever student account.
- Repeat the above steps for the Clever teacher user and confirm that you are able to log in to Moodle with the Clever teacher account.