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
@core @core_grades @javascript
2
Feature: Teachers can toggle the visibility of the grade categories in the Gradebook setup page.
3
  In order to focus only on the information that I am interested in
4
  As a teacher
5
  I need to be able to easily toggle the visibility of grade categories in the Gradebook setup page
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category |
10
      | Course   | C1        | 0        |
11
    And the following "users" exist:
12
      | username  | firstname | lastname  | email                 | idnumber  |
13
      | teacher1  | Teacher 1 | 1         | teacher1@example.com  | t1        |
14
      | teacher2  | Teacher 2 | 2         | teacher2@example.com  | t2        |
15
    And the following "course enrolments" exist:
16
      | user      | course | role           |
17
      | teacher1  | C1     | editingteacher |
18
      | teacher2  | C1     | editingteacher |
19
    And the following "grade categories" exist:
20
      | fullname   | course |
21
      | Category 1 | C1     |
22
    And the following "activities" exist:
23
      | activity | course | idnumber | name                | intro             |
24
      | assign   | C1     | a1       | Test assignment one | Submit something! |
25
    And the following "activities" exist:
26
      | activity | course | idnumber | name                | intro             | gradecategory |
27
      | assign   | C1     | a2       | Test assignment two | Submit something! | Category 1    |
28
    And the following "grade items" exist:
29
      | itemname     | grademax | course | gradecategory |
30
      | Manual grade | 40       | C1     | Category 1    |
31
    And I am on the "Course" "grades > gradebook setup" page logged in as "teacher1"
32
 
33
  Scenario: A teacher can collapse and expand grade categories in the Gradebook setup page
34
    Given the following should exist in the "setup-grades" table:
35
      | Name                |
36
      | Course              |
37
      | Test assignment one |
38
      | Category 1          |
39
      | Test assignment two |
40
      | Manual grade        |
41
      | Category 1 total    |
42
      | Course total        |
43
    And "Collapse" "link" should exist in the "Course" "table_row"
44
    And "Collapse" "link" should exist in the "Category 1" "table_row"
45
    # Collapse the grade category 'Category 1'.
46
    When I click on "Collapse" "link" in the "Category 1" "table_row"
47
    Then the following should exist in the "setup-grades" table:
48
      | Name                |
49
      | Course              |
50
      | Test assignment one |
51
      | Category 1          |
52
      | Course total        |
53
    And "Collapse" "link" should exist in the "Course" "table_row"
54
    And "Expand" "link" should exist in the "Category 1" "table_row"
55
    And the following should not exist in the "setup-grades" table:
56
      | Test assignment two |
57
      | Manual grade        |
58
      | Category 1 total    |
59
    # Expand the grade category 'Category 1'.
60
    And I click on "Expand" "link" in the "Category 1" "table_row"
61
    And the following should exist in the "setup-grades" table:
62
      | Name                |
63
      | Course              |
64
      | Test assignment one |
65
      | Category 1          |
66
      | Test assignment two |
67
      | Manual grade        |
68
      | Category 1 total    |
69
      | Course total        |
70
    And "Collapse" "link" should exist in the "Course" "table_row"
71
    And "Collapse" "link" should exist in the "Category 1" "table_row"
72
    # Collapse again the grade category 'Category 1'.
73
    And I click on "Collapse" "link" in the "Category 1" "table_row"
74
    # Collapse the grade category 'Course'.
75
    And I click on "Collapse" "link" in the "Course" "table_row"
76
    And the following should exist in the "setup-grades" table:
77
      | Name                |
78
      | Course              |
79
    And I should see "Course" in the "setup-grades" "table"
80
    And "Expand" "link" should exist in the "Course" "table_row"
11 efrain 81
    And I should not see "Test assignment one" in the "setup-grades" "table"
82
    And I should not see "Category 1" in the "setup-grades" "table"
83
    And I should not see "Test assignment two" in the "setup-grades" "table"
84
    And I should not see "Manual grade" in the "setup-grades" "table"
85
    And I should not see "Category 1 total" in the "setup-grades" "table"
86
    And I should not see "Course total" in the "setup-grades" "table"
1 efrain 87
    # Expand the grade category 'Course'. 'Category 1' should be still collapsed.
88
    And I click on "Expand" "link" in the "Course" "table_row"
89
    And the following should exist in the "setup-grades" table:
90
      | Name                |
91
      | Course              |
92
      | Test assignment one |
93
      | Category 1          |
94
      | Course total        |
95
    And "Collapse" "link" should exist in the "Course" "table_row"
96
    And "Expand" "link" should exist in the "Category 1" "table_row"
11 efrain 97
    And I should not see "Test assignment two" in the "setup-grades" "table"
98
    And I should not see "Manual grade" in the "setup-grades" "table"
99
    And I should not see "Category 1 total" in the "setup-grades" "table"
1 efrain 100
 
101
  Scenario: A teacher can see the aggregated max grade for a grade category even when the category is collapsed
102
    Given the following should exist in the "setup-grades" table:
103
      | Name             | Max grade |
104
      | Course           |           |
105
      | Category 1       |           |
106
      | Category 1 total | 140.00    |
107
      | Course total     | 240.00    |
108
    # Collapse the grade category 'Category 1'. The aggregated max grade should now be displayed within the 'Category 1' row.
109
    When I click on "Collapse" "link" in the "Category 1" "table_row"
110
    Then the following should exist in the "setup-grades" table:
111
      | Name             | Max grade |
112
      | Course           |           |
113
      | Category 1       | 140.00    |
114
      | Course total     | 240.00    |
115
    And I should not see "Category 1 total" in the "setup-grades" "table"
116
    # Collapse the grade category 'Course'. The aggregated max grade should now be displayed within the 'Course' row.
117
    And I click on "Collapse" "link" in the "Course" "table_row"
118
    And "Course" row "Max grade" column of "setup-grades" table should contain "240.00"
119
    And I should not see "Course total" in the "setup-grades" "table"
120
    # Expand the grade category 'Course'. The aggregated max grade should not be displayed within the 'Course' row anymore.
121
    And I click on "Expand" "link" in the "Course" "table_row"
122
    And the following should exist in the "setup-grades" table:
123
      | Name             | Max grade |
124
      | Course           |           |
125
      | Category 1       | 140.00    |
126
      | Course total     | 240.00    |
127
    And I should not see "Category 1 total" in the "setup-grades" "table"
128
 
129
  Scenario: A teacher can collapse and expand grade categories in the Gradebook setup when moving grade items
130
    Given I click on "Move" "link" in the "Test assignment one" "table_row"
131
    And the following should exist in the "setup-grades" table:
132
      | Name                |
133
      | Course              |
134
      | Test assignment one |
135
      | Category 1          |
136
      | Test assignment two |
137
      | Manual grade        |
138
    And "Collapse" "link" should exist in the "Course" "table_row"
139
    And "Collapse" "link" should exist in the "Category 1" "table_row"
140
    # Collapse the grade category 'Category 1'.
141
    When I click on "Collapse" "link" in the "Category 1" "table_row"
142
    Then the following should exist in the "setup-grades" table:
143
      | Name                |
144
      | Course              |
145
      | Test assignment one |
146
      | Category 1          |
147
    And "Collapse" "link" should exist in the "Course" "table_row"
148
    And "Expand" "link" should exist in the "Category 1" "table_row"
11 efrain 149
    And I should not see "Test assignment two" in the "setup-grades" "table"
150
    And I should not see "Manual grade" in the "setup-grades" "table"
151
    And I should not see "Category 1 total" in the "setup-grades" "table"
1 efrain 152
    # Expand the grade category 'Category 1'.
153
    And I click on "Expand" "link" in the "Category 1" "table_row"
154
    And the following should exist in the "setup-grades" table:
155
      | Name                |
156
      | Course              |
157
      | Test assignment one |
158
      | Category 1          |
159
      | Test assignment two |
160
      | Manual grade        |
161
    And "Collapse" "link" should exist in the "Course" "table_row"
162
    And "Collapse" "link" should exist in the "Category 1" "table_row"
163
    # Collapse again the grade category 'Category 1'.
164
    And I click on "Collapse" "link" in the "Category 1" "table_row"
165
    # Collapse the grade category 'Course'.
166
    And I click on "Collapse" "link" in the "Course" "table_row"
167
    And I should see "Course" in the "setup-grades" "table"
168
    And "Expand" "link" should exist in the "Course" "table_row"
11 efrain 169
    And I should not see "Test assignment one" in the "setup-grades" "table"
170
    And I should not see "Category 1" in the "setup-grades" "table"
171
    And I should not see "Test assignment two" in the "setup-grades" "table"
172
    And I should not see "Manual grade" in the "setup-grades" "table"
1 efrain 173
    # Expand the grade category 'Course'. 'Category 1' should be still collapsed.
174
    And I click on "Expand" "link" in the "Course" "table_row"
175
    And the following should exist in the "setup-grades" table:
176
      | Name                |
177
      | Course              |
178
      | Test assignment one |
179
      | Category 1          |
180
    And "Collapse" "link" should exist in the "Course" "table_row"
181
    And "Expand" "link" should exist in the "Category 1" "table_row"
11 efrain 182
    And I should not see "Test assignment two" in the "setup-grades" "table"
183
    And I should not see "Manual grade" in the "setup-grades" "table"
184
    And I should not see "Category 1 total" in the "setup-grades" "table"
1 efrain 185
 
186
  Scenario: Previously collapsed categories are still shown as collapsed when a teacher navigates back to Gradebook setup
187
    # Collapse the grade category 'Category 1' and navigate to the course homepage.
188
    Given I click on "Collapse" "link" in the "Category 1" "table_row"
189
    # Navigate back to Gradebook setup and confirm that the category 'Category 1' is still collapsed.
190
    When I am on the "Course" "grades > gradebook setup" page
191
    Then the following should exist in the "setup-grades" table:
192
      | Name                |
193
      | Course              |
194
      | Test assignment one |
195
      | Category 1          |
196
      | Course total        |
197
    And "Collapse" "link" should exist in the "Course" "table_row"
198
    And "Expand" "link" should exist in the "Category 1" "table_row"
11 efrain 199
    And I should not see "Test assignment two" in the "setup-grades" "table"
200
    And I should not see "Manual grade" in the "setup-grades" "table"
201
    And I should not see "Category 1 total" in the "setup-grades" "table"
1 efrain 202
 
203
  Scenario: Previously collapsed categories are still shown as collapsed when a teacher is moving grade items in Gradebook setup
204
    # Collapse the grade category 'Category 1'.
205
    Given I click on "Collapse" "link" in the "Category 1" "table_row"
206
    # Attempt to move a grade item and confirm that the category 'Category 1' is still collapsed.
207
    When I click on "Move" "link" in the "Test assignment one" "table_row"
208
    Then the following should exist in the "setup-grades" table:
209
      | Name                |
210
      | Course              |
211
      | Test assignment one |
212
      | Category 1          |
213
    And "Collapse" "link" should exist in the "Course" "table_row"
214
    And "Expand" "link" should exist in the "Category 1" "table_row"
11 efrain 215
    And I should not see "Test assignment two" in the "setup-grades" "table"
216
    And I should not see "Manual grade" in the "setup-grades" "table"
217
    And I should not see "Category 1 total" in the "setup-grades" "table"
1 efrain 218
 
219
  Scenario: Grade categories are shown as collapsed only to the teacher that collapsed them
220
    # Collapse the grade category 'Category 1'.
221
    Given I click on "Collapse" "link" in the "Category 1" "table_row"
11 efrain 222
    When I reload the page
223
    # Reload the page and confirm that the category 'Category 1' is still collapsed.
1 efrain 224
    Then the following should exist in the "setup-grades" table:
225
      | Name                |
226
      | Course              |
227
      | Test assignment one |
228
      | Category 1          |
229
      | Course total        |
230
    And "Collapse" "link" should exist in the "Course" "table_row"
11 efrain 231
    And "Expand" "link" should exist in the "Category 1" "table_row"
232
    And I should not see "Test assignment two" in the "setup-grades" "table"
233
    And I should not see "Manual grade" in the "setup-grades" "table"
234
    And I should not see "Category 1 total" in the "setup-grades" "table"
235
    # Log in as teacher2 and confirm that the category 'Category 1' is not collapsed.
236
    And I am on the "Course" "grades > gradebook setup" page logged in as "teacher2"
1 efrain 237
    And the following should exist in the "setup-grades" table:
238
      | Name                |
239
      | Course              |
240
      | Test assignment one |
241
      | Category 1          |
242
      | Test assignment two |
243
      | Manual grade        |
244
      | Category 1 total    |
11 efrain 245
      | Course total        |
246
    And "Collapse" "link" should exist in the "Course" "table_row"
247
    And "Collapse" "link" should exist in the "Category 1" "table_row"