Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course @theme_classic
2
Feature: Role assignments can be made at the category level in classic
3
  In order to grant a user different capabilities
4
  As a user
5
  I can assign roles in categories
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username  | firstname | lastname |
10
      | manager   | Manager   | Manager  |
11
    And the following "categories" exist:
12
      | name | category | idnumber |
13
      | Cat 1 | 0 | CAT1 |
14
    And the following "role assigns" exist:
15
      | user    | role          | contextlevel | reference |
16
      | manager | manager       | Category     | CAT1      |
17
    And I log in as "admin"
18
 
19
  @javascript
20
  Scenario: A user with a category role can assign roles
21
    Given I define the allowed role assignments for the "Manager" role as:
22
      | Teacher | Assignable |
23
    And I log out
24
    And I log in as "manager"
25
    And I am on course index
26
    When I follow "Cat 1"
27
    Then "Assign roles" "link" should exist in current page administration
28
 
29
  @javascript
30
  Scenario: A user with a category role cannot assign roles if there are no roles to assign
31
    Given I define the allowed role assignments for the "Manager" role as:
32
      | Manager             | Not assignable |
33
      | Course creator      | Not assignable |
34
      | Teacher             | Not assignable |
35
      | Non-editing teacher | Not assignable |
36
      | Student             | Not assignable |
37
    And I change window size to "large"
38
    And I log out
39
    And I log in as "manager"
40
    And I am on course index
41
    When I follow "Cat 1"
42
    Then "Assign roles" "link" should not exist in current page administration