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_quiz @quiz @quiz_grading
2
Feature: Basic use of the Manual grading report
3
  In order to easily find students attempts that need manual grading
4
  As a teacher
5
  I need to use the manual grading report
6
 
7
  Background:
8
    Given the following "custom profile fields" exist:
9
      | datatype | shortname  | name           |
10
      | text     | username   | Username       |
11
      | text     | email      | Email address  |
12
      | text     | idnumber   | ID number      |
13
      | text     | frog       | Favourite frog |
14
    And the following config values are set as admin:
15
      | showuseridentity | username,idnumber,email,profile_field_frog |
16
    And the following "users" exist:
17
      | username | firstname | lastname | email                | idnumber |  profile_field_frog |
18
      | teacher1 | T1        | Teacher1 | teacher1@example.com | T1000    |                     |
19
      | marker   | M1        | Marker   | marker@example.com   | M1000    |                     |
20
      | student1 | S1        | Student1 | student1@example.com | S1000    | little yellow frog  |
21
      | student2 | S2        | Student2 | student2@example.com | S2000    |                     |
22
    And the following "courses" exist:
23
      | fullname | shortname | category |
24
      | Course 1 | C1        | 0        |
25
    And the following "course enrolments" exist:
26
      | user     | course | role           |
27
      | teacher1 | C1     | editingteacher |
28
      | marker   | C1     | teacher        |
29
      | student1 | C1     | student        |
30
      | student2 | C1     | student        |
31
    And the following "groupings" exist:
32
      | name         | course  | idnumber |
33
      | Tutor groups | C1      | tging    |
34
    And the following "groups" exist:
35
      | name         | course | idnumber |
36
      | Tutor group  | C1     | tg       |
37
      | Marker group | C1     | mg       |
38
    And the following "grouping groups" exist:
39
      | grouping | group |
40
      | tging    | tg    |
41
    And the following "group members" exist:
42
      | user     | group |
43
      | teacher1 | tg    |
44
      | student1 | tg    |
45
      | marker   | mg    |
46
      | student2 | mg    |
47
    And the following "question categories" exist:
48
      | contextlevel | reference | name           |
49
      | Course       | C1        | Test questions |
50
    And the following "questions" exist:
51
      | questioncategory | qtype       | name             | questiontext                         | answer 1 | grade |
52
      | Test questions   | shortanswer | Short answer 001 | Where is the capital city of France? | Paris    | 100%  |
53
    And the following "activities" exist:
54
      | activity | name   | course | idnumber | groupmode | grouping |
55
      | quiz     | Quiz 1 | C1     | quiz1    | 1         | tging    |
56
      | quiz     | Quiz 2 | C1     | quiz2    | 1         | tging    |
57
    And quiz "Quiz 1" contains the following questions:
11 efrain 58
      | question         | page | displaynumber |
59
      | Short answer 001 | 1    | 1a            |
1 efrain 60
 
61
  Scenario: Manual grading report without attempts
62
    When I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
63
    Then I should see "Separate groups (Tutor groups)"
64
    And I should see "All participants"
65
    And I should see "Quiz 1"
66
    And I should see "Questions that need grading"
67
    And I should see "Nothing to display"
68
    And I follow "Also show questions that have been graded automatically"
69
    And I should see "Nothing to display"
70
 
71
  Scenario: Manual grading report with attempts
72
    Given user "student1" has attempted "Quiz 1" with responses:
73
      | slot | response |
74
      | 1    | Paris    |
75
    And I reload the page
76
    When I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
77
    Then I should see "Separate groups (Tutor groups)"
78
    And I should see "All participants"
79
    And I should see "Quiz 1"
80
    And I follow "Also show questions that have been graded automatically"
81
    And I should see "Short answer 001"
82
    And "Short answer 001" row "To grade" column of "questionstograde" table should contain "0"
83
    And "Short answer 001" row "Already graded" column of "questionstograde" table should contain "0"
84
    And I should see "Short answer 001"
85
    And "Short answer 001" row "To grade" column of "questionstograde" table should contain "0"
86
    And "Short answer 001" row "Already graded" column of "questionstograde" table should contain "0"
87
    # Go to the grading page.
88
    And I click on "update grades" "link" in the "Short answer 001" "table_row"
89
    And I should see "Grading attempts 1 to 1 of 1"
90
    # Test the display options.
91
    And I set the field "Order attempts by" to "ID number"
92
    And I press "Change options"
93
    # General feedback for Short answer 001 displays.
94
    And I should see "That is a bad answer."
95
    And I should see "The correct answer is: frog"
96
    # Adjust the mark for Student1
97
    And I set the field "Comment" to "I have adjusted your mark to 0.6"
98
    And I set the field "Mark" to "0.6"
99
    And I press "Save and show next"
100
    And I should see "All selected attempts have been graded. Returning to the list of questions."
11 efrain 101
    And "Short answer 001" row "Q #" column of "questionstograde" table should contain "1a"
1 efrain 102
    And "Short answer 001" row "To grade" column of "questionstograde" table should contain "0"
103
    And "Short answer 001" row "Already graded" column of "questionstograde" table should contain "1"
104
 
105
  Scenario: Manual grading settings are remembered as user preferences
106
    Given user "student1" has attempted "Quiz 1" with responses:
107
      | slot | response |
108
      | 1    | Paris    |
109
    When I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
110
    And I follow "Also show questions that have been graded automatically"
111
    And I click on "update grades" "link" in the "Short answer 001" "table_row"
112
    And I set the following fields to these values:
113
      | Questions per page | 42   |
114
      | Order attempts by  | Date |
115
    And I press "Change options"
116
    And I log out
117
    And I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
118
    And I follow "Also show questions that have been graded automatically"
119
    And I click on "update grades" "link" in the "Short answer 001" "table_row"
120
    Then the following fields match these values:
121
      | Questions per page | 42   |
122
      | Order attempts by  | Date |
123
 
124
  @javascript
125
  Scenario: Manual grading settings are validated
126
    Given user "student1" has attempted "Quiz 1" with responses:
127
      | slot | response |
128
      | 1    | Paris    |
129
    And I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
130
    And I follow "Also show questions that have been graded automatically"
131
    And I click on "update grades" "link" in the "Short answer 001" "table_row"
132
    When I set the following fields to these values:
133
      | Questions per page | 0 |
134
    Then I should see "You must enter a whole number that is greater than 0."
135
    And I set the following fields to these values:
136
      | Questions per page | -1 |
137
    And I press "Change options"
138
    And I should see "You must enter a whole number that is greater than 0."
139
    And I set the following fields to these values:
140
      | Questions per page | abc |
141
    And I press "Change options"
142
    And I should see "You must enter a whole number that is greater than 0."
143
    And I set the following fields to these values:
144
      | Questions per page | 1 |
145
    And I press "Change options"
146
 
147
  @javascript
148
  Scenario: Teacher can see user custom filed columns as additional user identity
149
    Given user "student1" has attempted "Quiz 1" with responses:
150
      | slot | response |
151
      | 1    | Paris    |
152
    When I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
153
    And I follow "Also show questions that have been graded automatically"
154
    And I click on "update grades" "link" in the "Short answer 001" "table_row"
155
    Then I should see "Attempt number 1 for S1 Student1 (student1, S1000, student1@example.com, little yellow frog)"
156
    And I should not see "You must enter a whole number that is greater than 0."
157
 
158
  Scenario: A marker cannot access the report in separate group
159
    Given user "student1" has attempted "Quiz 1" with responses:
160
      | slot | response |
161
      | 1    | frog     |
162
    And user "student2" has attempted "Quiz 1" with responses:
163
      | slot | response |
164
      | 1    | Duck     |
165
    When I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "marker"
166
    Then I should see "Quiz 1"
167
    And I should see "Separate groups: All participants"
168
    Then I should see "Sorry, but you need to be part of a group to see this page."
169
 
11 efrain 170
  @javascript
1 efrain 171
  Scenario: Manual grading report with attempts to be graded
172
    Given the following "questions" exist:
173
      | questioncategory | qtype | name     | user  | questiontext    |
174
      | Test questions   | essay | Essay Q1 | admin | Question 1 text |
175
    And quiz "Quiz 2" contains the following questions:
176
      | question | page |
177
      | Essay Q1 | 1    |
178
    When I am on the "Quiz 2" "mod_quiz > View" page logged in as "student1"
179
    And I press "Attempt quiz"
11 efrain 180
    And I set the field "Answer text Question 1" to "This is my attempt 1"
1 efrain 181
    And I follow "Finish attempt ..."
182
    And I press "Submit all and finish"
183
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
184
    And I click on "Finish review" "link"
185
    And I press "Re-attempt quiz"
11 efrain 186
    And I set the field "Answer text Question 1" to "This is my attempt 2"
1 efrain 187
    And I follow "Finish attempt ..."
188
    And I press "Submit all and finish"
189
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
190
    And I click on "Finish review" "link"
191
    And I press "Re-attempt quiz"
11 efrain 192
    And I set the field "Answer text Question 1" to "This is my attempt 3"
1 efrain 193
    And I follow "Finish attempt ..."
194
    And I press "Submit all and finish"
195
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
196
    And I am on the "Quiz 2" "mod_quiz > Manual grading report" page logged in as "teacher1"
197
    And I follow "Also show questions that have been graded automatically"
198
    And I should see "Essay Q1"
199
    And "Essay Q1" row "To grade" column of "questionstograde" table should contain "3"
200
    And "Essay Q1" row "Already graded" column of "questionstograde" table should contain "0"
201
    # Go to the grading page.
202
    And I click on "Grade" "link" in the "Essay Q1" "table_row"
203
    And I should see "Grading attempts 1 to 3 of 3"
204
    And I set the following fields to these values:
205
      | Questions per page | 1         |
206
      | Order attempts by  | ID number |
207
    And I press "Change options"
208
    And I should see "Grading attempts 1 to 1 of 3"
209
    # Adjust the mark for Student1
210
    And I set the field "Comment" to "I have adjusted your mark to 0.6"
211
    And I set the field "Mark" to "0.6"
212
    And I press "Save and show next"
213
    Then I should see "Grading attempts 1 to 1 of 2"
214
    And I press "Save and show next"
215
    And I should see "Grading attempts 2 to 2 of 2"