1 |
efrain |
1 |
@core @core_user
|
|
|
2 |
Feature: Edit user roles
|
|
|
3 |
In order to administer users in course
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to assign and unassign roles in the course
|
|
|
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 |
| student2 | Student | 2 | student2@example.com |
|
|
|
13 |
And the following "courses" exist:
|
|
|
14 |
| fullname | shortname | format |
|
|
|
15 |
| Course 1 | C1 | topics |
|
|
|
16 |
And the following "course enrolments" exist:
|
|
|
17 |
| user | course | role |
|
|
|
18 |
| teacher1 | C1 | editingteacher |
|
|
|
19 |
| student1 | C1 | student |
|
|
|
20 |
| student2 | C1 | student |
|
|
|
21 |
|
|
|
22 |
@javascript
|
|
|
23 |
Scenario: Assign roles on participants page
|
|
|
24 |
Given I log in as "teacher1"
|
|
|
25 |
And I am on "Course 1" course homepage
|
|
|
26 |
And I navigate to course participants
|
|
|
27 |
And I click on "Student 1's role assignments" "link"
|
|
|
28 |
And I type "Non-editing teacher"
|
|
|
29 |
And I press the enter key
|
|
|
30 |
When I click on "Save changes" "link"
|
|
|
31 |
Then I should see "Student, Non-editing teacher" in the "Student 1" "table_row"
|
|
|
32 |
|
|
|
33 |
@javascript
|
|
|
34 |
Scenario: Remove roles on participants page
|
|
|
35 |
Given I log in as "teacher1"
|
|
|
36 |
And I am on "Course 1" course homepage
|
|
|
37 |
And I navigate to course participants
|
|
|
38 |
And I click on "Student 1's role assignments" "link"
|
|
|
39 |
And I click on "Student" "autocomplete_selection"
|
|
|
40 |
When I click on "Save changes" "link"
|
|
|
41 |
Then I should see "No roles" in the "Student 1" "table_row"
|