1 |
efrain |
1 |
@enrol @enrol_lti
|
|
|
2 |
Feature: Check that settings are adhered to when creating an enrolment plugin
|
|
|
3 |
In order to create an LTI enrolment instance
|
|
|
4 |
As an admin
|
|
|
5 |
I need to ensure the site-wide settings are used
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | format |
|
|
|
14 |
| Course 1 | C1 | topics |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
And I log in as "admin"
|
|
|
19 |
And I navigate to "Plugins > Enrolments > Manage enrol plugins" in site administration
|
|
|
20 |
And I click on "Enable" "link" in the "Publish as LTI tool" "table_row"
|
|
|
21 |
And I navigate to "Plugins > Enrolments > Publish as LTI tool" in site administration
|
|
|
22 |
And I set the following fields to these values:
|
|
|
23 |
| Email visibility | Visible to everyone |
|
|
|
24 |
| City/town | Perth |
|
|
|
25 |
| Select a country | Australia |
|
|
|
26 |
| Timezone | Australia/Perth |
|
|
|
27 |
| Institution | Moodle Pty Ltd |
|
|
|
28 |
And I press "Save changes"
|
|
|
29 |
And I log out
|
|
|
30 |
|
|
|
31 |
Scenario: As an admin set site-wide settings for the enrolment plugin and ensure they are used
|
|
|
32 |
Given I log in as "teacher1"
|
|
|
33 |
And I am on the "Course 1" "enrolment methods" page
|
|
|
34 |
And I select "Publish as LTI tool" from the "Add method" singleselect
|
|
|
35 |
When I expand all fieldsets
|
|
|
36 |
Then the field "Email visibility" matches value "Visible to everyone"
|
|
|
37 |
And the field "City/town" matches value "Perth"
|
|
|
38 |
And the field "Select a country" matches value "Australia"
|
|
|
39 |
And the field "Timezone" matches value "Australia/Perth"
|
|
|
40 |
And the field "Institution" matches value "Moodle Pty Ltd"
|
|
|
41 |
And I set the following fields to these values:
|
|
|
42 |
| Email visibility | Hidden |
|
|
|
43 |
| City/town | Whistler |
|
|
|
44 |
| Select a country | Canada |
|
|
|
45 |
| Timezone | America/Vancouver |
|
|
|
46 |
| Institution | Moodle Pty Ltd - remote |
|
|
|
47 |
And I press "Add method"
|
|
|
48 |
And I click on "Edit" "link" in the "Publish as LTI tool" "table_row"
|
|
|
49 |
And the field "Email visibility" matches value "Hidden"
|
|
|
50 |
And the field "City/town" matches value "Whistler"
|
|
|
51 |
And the field "Select a country" matches value "Canada"
|
|
|
52 |
And the field "Timezone" matches value "America/Vancouver"
|
|
|
53 |
And the field "Institution" matches value "Moodle Pty Ltd - remote"
|