1 |
efrain |
1 |
@core @core_course
|
|
|
2 |
Feature: Rename roles in a course
|
|
|
3 |
In order to account for course-level differences
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to rename roles
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Student | 1 | student1@example.com |
|
|
|
11 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname |
|
|
|
14 |
| Course 1 | C1 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| student1 | C1 | student |
|
|
|
18 |
| teacher1 | C1 | editingteacher |
|
|
|
19 |
|
|
|
20 |
Scenario: Teacher can rename roles
|
|
|
21 |
Given I am on the "Course 1" "renameroles" page logged in as "teacher1"
|
|
|
22 |
When I set the following fields to these values:
|
|
|
23 |
| Your word for 'Teacher' | Lecturer |
|
|
|
24 |
| Your word for 'Student' | Learner |
|
|
|
25 |
And I press "Save"
|
|
|
26 |
And I navigate to course participants
|
|
|
27 |
Then I should see "Lecturer (Teacher)" in the "Teacher 1" "table_row"
|
|
|
28 |
And I should see "Learner (Student)" in the "Student 1" "table_row"
|
|
|
29 |
And I log out
|
|
|
30 |
And I log in as "student1"
|
|
|
31 |
And I am on "Course 1" course homepage
|
|
|
32 |
And I navigate to course participants
|
|
|
33 |
And I should see "Lecturer" in the "Teacher 1" "table_row"
|
|
|
34 |
And I should see "Learner" in the "Student 1" "table_row"
|
|
|
35 |
And I should not see "Lecturer (Teacher)" in the "Teacher 1" "table_row"
|
|
|
36 |
And I should not see "Learner (Student)" in the "Student 1" "table_row"
|
|
|
37 |
|
|
|
38 |
Scenario: Ability to rename roles can be prevented
|
|
|
39 |
Given the following "role capability" exists:
|
|
|
40 |
| role | editingteacher |
|
|
|
41 |
| moodle/course:renameroles | inherit |
|
|
|
42 |
When I log in as "teacher1"
|
|
|
43 |
And I am on "Course 1" course homepage
|
|
|
44 |
And I navigate to course participants
|
|
|
45 |
Then I should not see "Role renaming"
|