Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
11 efrain 1
@mod @mod_assign
2
Feature: Duplicate assign activity module with permissions
3
  In order to ensure that locally assigned roles and permissions are correctly duplicated
4
  As a teacher
5
  I need to add the roles and permissions and ensure they are correctly duplicated
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category | groupmode |
10
      | Course 1 | C1 | 0 | 1 |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email |
13
      | teacher1 | Teacher | 1 | teacher1@example.com |
14
      | student1 | Student | 1 | student10@example.com |
15
      | student2 | Student | 2 | student20@example.com |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
      | student2 | C1 | student |
21
    And the following "activity" exists:
22
      | activity         | assign                      |
23
      | course           | C1                          |
24
      | name             | Test assignment name        |
25
      | intro            | Test assignment description |
26
      | markingworkflow  | 1                           |
27
      | submissiondrafts | 0                           |
28
 
29
  @javascript
30
  Scenario: Add a locally assigned role and duplicate activity
31
    Given I log in as "teacher 1"
32
    And I am on "Course 1" course homepage with editing mode on
33
 
34
    When I open "Test assignment name" actions menu
35
    And I click on "Assign roles" "link" in the "Test assignment name" activity
36
    And I click on "Non-editing teacher" "link"
37
    And I click on "Student 2" "option"
38
    And I click on "Add" "button"
39
    And I am on "Course 1" course homepage with editing mode on
40
    And I duplicate "Test assignment name" activity
41
    Then I should see "Test assignment name (copy)"
42
 
43
    And I open "Test assignment name (copy)" actions menu
44
    And I click on "Assign roles" "link" in the "Test assignment name (copy)" activity
45
    Then "Non-editing teacher" row "Users with role" column of "generaltable" table should contain "1"
46
 
47
  @javascript
48
  Scenario: Add a permission override to activity and duplicate
49
    Given the following "permission overrides" exist:
50
      | capability | permission | role | contextlevel | reference |
51
      | mod/assign:grade | Allow | student | 70 | Test assignment name |
52
    And I log in as "admin"
53
 
54
    When I am on "Course 1" course homepage with editing mode on
55
    And I duplicate "Test assignment name" activity
56
    Then I should see "Test assignment name (copy)"
57
 
58
    And I open "Test assignment name (copy)" actions menu
59
    And I click on "Edit settings" "link" in the "Test assignment name (copy)" activity
60
    And I navigate to "Permissions" in current page administration
61
    And I set the field "permissionscapabilitysearch" to "mod/assign:grade"
62
    Then "Grade assignmentmod/assign:grade" row "Roles with permission" column of "permissions" table should contain "Student"