Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course
2
Feature: Rename roles within a course
3
  In order to set course roles names according to their responsabilities
4
  As a teacher
5
  I need to edit the course role names
6
 
7
  @javascript
8
  Scenario: Rename roles within a course
9
    Given the following "users" exist:
10
      | username | firstname | lastname | email |
11
      | teacher1 | Teacher | 1 | teacher1@example.com |
12
      | teacher2 | Teacher | 2 | teacher2@example.com |
13
      | student1 | Student | 1 | student1@example.com |
14
    And the following "courses" exist:
15
      | fullname | shortname | format |
16
      | Course 1 | C1 | topics |
17
    And the following "course enrolments" exist:
18
      | user | course | role |
19
      | teacher1 | C1 | editingteacher |
20
      | teacher2 | C1 | teacher |
21
      | student1 | C1 | student |
22
    And I am on the "Course 1" "renameroles" page logged in as "teacher1"
23
    And I set the following fields to these values:
24
      | Your word for 'Non-editing teacher' | Tutor |
25
      | Your word for 'Student' | Learner |
26
    And I press "Save"
27
    And I follow "Switch role to..." in the user menu
28
    Then "Tutor" "button" should exist
29
    And "Learner" "button" should exist
30
    And I navigate to course participants
31
    And I set the field "type" in the "Filter 1" "fieldset" to "Roles"
32
    And I open the autocomplete suggestions list in the "Filter 1" "fieldset"
33
    And I should see "Learner (Student)" in the ".form-autocomplete-suggestions" "css_element"
34
    And I press the escape key
35
    And I set the field "Type or select..." in the "Filter 1" "fieldset" to "Tutor (Non-editing teacher)"
36
    And I click on "Student 1's role assignments" "link"
37
    And I open the autocomplete suggestions list in the "Student 1" "table_row"
38
    And "Tutor (Non-editing teacher)" "autocomplete_suggestions" should exist
39
    And I click on "Cancel" "link"
40
    And I press "Enrol users"
41
    And the "Assign role" select box should contain "Learner (Student)"
42
    And I click on "Cancel" "button" in the "Enrol users" "dialogue"
43
    And I am on the "Course 1" "renameroles" page
44
    And I set the following fields to these values:
45
      | Your word for 'Non-editing teacher' | |
46
      | Your word for 'Student' | |
47
    And I press "Save"
48
    And I follow "Switch role to..." in the user menu
49
    And I should see "Teacher"
50
    And "Student" "button" should exist
51
    And "Learner" "button" should not exist
52
    And I navigate to course participants
53
    And I set the field "type" in the "Filter 1" "fieldset" to "Roles"
54
    And I open the autocomplete suggestions list in the "Filter 1" "fieldset"
55
    And I should see "Non-editing teacher" in the ".form-autocomplete-suggestions" "css_element"
56
    And I should see "Student" in the ".form-autocomplete-suggestions" "css_element"