Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_enrol
2
Feature: Test role visibility for the participants page
3
  In order to control access
4
  As an admin
5
  I need to control which roles can see each other
6
 
7
  Background: Add a bunch of users
8
    Given  the following "courses" exist:
9
      | fullname | shortname |
10
      | Course 1 | C1        |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email                |
13
      | learner1 | Learner   | 1        | learner1@example.com |
14
      | teacher1 | Teacher   | 1        | teacher1@example.com |
15
      | manager1 | Manager   | 1        | manager1@example.com |
16
    And the following "course enrolments" exist:
17
      | user     | course | role           |
18
      | learner1 | C1     | student        |
19
      | teacher1 | C1     | editingteacher |
20
      | manager1 | C1     | manager        |
21
 
22
  Scenario: Check the default roles are visible
23
    Given I log in as "manager1"
24
    And I am on the "Course 1" "enrolled users" page
25
    Then "Learner 1" row "Roles" column of "participants" table should contain "Student"
26
    And "Teacher 1" row "Roles" column of "participants" table should contain "Teacher"
27
    And "Manager 1" row "Roles" column of "participants" table should contain "Manager"
28
    And I should not see "No Roles" in the "table#participants" "css_element"
29
 
30
  Scenario: Do not allow managers to view any roles but manager and check they are hidden
31
    Given I log in as "teacher1"
32
    And I am on the "Course 1" "enrolled users" page
33
    Then "Learner 1" row "Roles" column of "participants" table should contain "Student"
34
    And "Teacher 1" row "Roles" column of "participants" table should contain "Teacher"
35
    And "Manager 1" row "Roles" column of "participants" table should not contain "Manager"
36
    And "Manager 1" row "Roles" column of "participants" table should contain "No roles"