Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_assign
2
Feature: Bulk remove submissions
3
  In order to reset the assignment submission of multiple students
4
  As a teacher with the capability to edit submissions
5
  I need to be able to remove student submissions by bulk
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname  | shortname  | category  | groupmode  |
10
      | Course 1  | C1         | 0         | 0          |
11
    And the following "users" exist:
12
      | username  | firstname  | lastname  | email                 |
13
      | teacher1  | Teacher    | 1         | teacher1@example.com  |
14
      | student1  | Student    | 1         | student1@example.com  |
15
      | student2  | Student    | 2         | student2@example.com  |
1441 ariadna 16
      | student3  | Student    | 3         | student3@example.com  |
1 efrain 17
    And the following "course enrolments" exist:
18
      | user      | course  | role            |
19
      | teacher1  | C1      | editingteacher  |
20
      | student1  | C1      | student         |
21
      | student2  | C1      | student         |
1441 ariadna 22
      | student3  | C1      | student         |
1 efrain 23
    And the following "groups" exist:
24
      | name    | course | idnumber |
25
      | Group 1 | C1     | G1       |
26
 
27
  @javascript @skip_chrome_zerosize
28
  Scenario: Bulk remove submissions should remove the data that was submitted
29
    Given the following "activity" exists:
30
      | activity                            | assign                  |
31
      | course                              | C1                      |
32
      | name                                | Test assignment name    |
33
      | assignsubmission_onlinetext_enabled | 1                       |
34
      | assignsubmission_file_enabled       | 0                       |
35
      | submissiondrafts                    | 0                       |
36
    And the following "mod_assign > submissions" exist:
37
      | assign                | user      | onlinetext                   |
38
      | Test assignment name  | student1  | I'm the student1 submission  |
39
      | Test assignment name  | student2  | I'm the student2 submission  |
40
    And the following "role capability" exists:
41
      | role                           | editingteacher |
42
      | mod/assign:editothersubmission | allow          |
43
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 44
    And I navigate to "Submissions" in current page administration
1 efrain 45
    And I should see "I'm the student1 submission"
46
    And I should see "I'm the student2 submission"
47
    And I set the field "selectall" to "1"
1441 ariadna 48
    And I click on "Delete" "button" in the "sticky-footer" "region"
49
    And I click on "Delete" "button" in the "Remove submission" "dialogue"
1 efrain 50
    Then I should not see "I'm the student1 submission"
51
    And I should not see "I'm the student2 submission"
52
    And I log out
53
 
54
    And I am on the "Test assignment name" Activity page logged in as student1
55
    And I should not see "I'm the student1 submission"
56
    And I log out
57
 
58
    And I am on the "Test assignment name" Activity page logged in as student2
59
    And I should not see "I'm the student2 submission1"
60
 
61
  @javascript
62
  Scenario: Bulk remove submissions should be unavailable if the user is missing the editing submission capability
63
    Given the following "activity" exists:
64
      | activity                            | assign                  |
65
      | course                              | C1                      |
66
      | name                                | Test assignment name    |
67
      | intro                               | Submit your online text |
68
      | assignsubmission_onlinetext_enabled | 1                       |
69
      | assignsubmission_file_enabled       | 0                       |
70
      | submissiondrafts                    | 0                       |
71
    And the following "mod_assign > submissions" exist:
72
      | assign                | user      | onlinetext                   |
73
      | Test assignment name  | student1  | I'm the student1 submission  |
74
      | Test assignment name  | student2  | I'm the student2 submission  |
75
 
76
    When I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 77
    And I navigate to "Submissions" in current page administration
1 efrain 78
    And I should see "I'm the student1 submission"
79
    And I should see "I'm the student2 submission"
80
    And I set the field "selectall" to "1"
1441 ariadna 81
    Then I should not see "Delete" in the "sticky-footer" "region"
1 efrain 82
 
83
  @javascript @skip_chrome_zerosize
1441 ariadna 84
  Scenario: Bulk remove submission when shared group users are added to the bulk
85
    removing submissions process in separate group mode without access all groups capability
86
    Given the following "group members" exist:
87
      | user      | group  |
88
      | teacher1  | G1     |
89
      | student1  | G1     |
90
      | student2  | G1     |
1 efrain 91
    Given the following "activity" exists:
92
      | activity                            | assign                  |
93
      | course                              | C1                      |
94
      | name                                | Test assignment name    |
95
      | assignsubmission_onlinetext_enabled | 1                       |
96
      | assignsubmission_file_enabled       | 0                       |
97
      | groupmode                           | 1                       |
98
      | submissiondrafts                    | 0                       |
99
    And the following "mod_assign > submissions" exist:
100
      | assign                | user      | onlinetext                   |
101
      | Test assignment name  | student1  | I'm the student1 submission  |
102
      | Test assignment name  | student2  | I'm the student2 submission  |
1441 ariadna 103
      | Test assignment name  | student3  | I'm the student3 submission  |
1 efrain 104
    And the following "role capability" exists:
105
      | role                           | editingteacher |
106
      | mod/assign:editothersubmission | allow          |
1441 ariadna 107
      | moodle/site:accessallgroups    | prevent        |
1 efrain 108
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 109
    And I navigate to "Submissions" in current page administration
1 efrain 110
    And I should see "I'm the student1 submission"
111
    And I should see "I'm the student2 submission"
1441 ariadna 112
    And I should not see "I'm the student3 submission"
1 efrain 113
    And I set the field "selectall" to "1"
1441 ariadna 114
    When I click on "Delete" "button" in the "sticky-footer" "region"
115
    And I click on "Delete" "button" in the "Remove submission" "dialogue"
1 efrain 116
 
1441 ariadna 117
    Then I should not see "I'm the student1 submission"
118
    Then I should not see "I'm the student2 submission"
1 efrain 119
 
120
  @javascript @skip_chrome_zerosize
1441 ariadna 121
  Scenario: Bulk remove submission when group users and non-group users are added to the bulk
122
    removing submissions process in separate group mode with access all groups capability
1 efrain 123
    Given the following "group members" exist:
124
      | user      | group  |
125
      | student1  | G1     |
126
      | student2  | G1     |
127
    And the following "activity" exists:
128
      | activity                             | assign                |
129
      | course                               | C1                    |
130
      | name                                 | Test assignment name  |
131
      | assignsubmission_onlinetext_enabled  | 1                     |
132
      | assignsubmission_file_enabled        | 0                     |
133
      | groupmode                            | 1                     |
134
      | submissiondrafts                     | 0                     |
135
    And the following "mod_assign > submissions" exist:
136
      | assign                | user      | onlinetext                   |
137
      | Test assignment name  | student1  | I'm the student1 submission  |
138
      | Test assignment name  | student2  | I'm the student2 submission  |
1441 ariadna 139
      | Test assignment name  | student3  | I'm the student3 submission  |
1 efrain 140
    And the following "role capability" exists:
141
      | role                           | editingteacher |
142
      | mod/assign:editothersubmission | allow          |
1441 ariadna 143
      | moodle/site:accessallgroups    | allow          |
1 efrain 144
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 145
    And I navigate to "Submissions" in current page administration
1 efrain 146
    And I should see "I'm the student1 submission"
147
    And I should see "I'm the student2 submission"
1441 ariadna 148
    And I should see "I'm the student3 submission"
1 efrain 149
    And I set the field "selectall" to "1"
1441 ariadna 150
    When I click on "Delete" "button" in the "sticky-footer" "region"
151
    And I click on "Delete" "button" in the "Remove submission" "dialogue"
1 efrain 152
    Then I should not see "I'm the student1 submission"
153
    And I should not see "I'm the student2 submission"
1441 ariadna 154
    And I should not see "I'm the student3 submission"