Proyectos de Subversion Moodle

Rev

Ir a la última revisión | | 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:
58
      | question         | page |
59
      | Short answer 001 | 1    |
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."
101
    And "Short answer 001" row "To grade" column of "questionstograde" table should contain "0"
102
    And "Short answer 001" row "Already graded" column of "questionstograde" table should contain "1"
103
 
104
  Scenario: Manual grading settings are remembered as user preferences
105
    Given user "student1" has attempted "Quiz 1" with responses:
106
      | slot | response |
107
      | 1    | Paris    |
108
    When I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
109
    And I follow "Also show questions that have been graded automatically"
110
    And I click on "update grades" "link" in the "Short answer 001" "table_row"
111
    And I set the following fields to these values:
112
      | Questions per page | 42   |
113
      | Order attempts by  | Date |
114
    And I press "Change options"
115
    And I log out
116
    And I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
117
    And I follow "Also show questions that have been graded automatically"
118
    And I click on "update grades" "link" in the "Short answer 001" "table_row"
119
    Then the following fields match these values:
120
      | Questions per page | 42   |
121
      | Order attempts by  | Date |
122
 
123
  @javascript
124
  Scenario: Manual grading settings are validated
125
    Given user "student1" has attempted "Quiz 1" with responses:
126
      | slot | response |
127
      | 1    | Paris    |
128
    And I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
129
    And I follow "Also show questions that have been graded automatically"
130
    And I click on "update grades" "link" in the "Short answer 001" "table_row"
131
    When I set the following fields to these values:
132
      | Questions per page | 0 |
133
    Then I should see "You must enter a whole number that is greater than 0."
134
    And I set the following fields to these values:
135
      | Questions per page | -1 |
136
    And I press "Change options"
137
    And I should see "You must enter a whole number that is greater than 0."
138
    And I set the following fields to these values:
139
      | Questions per page | abc |
140
    And I press "Change options"
141
    And I should see "You must enter a whole number that is greater than 0."
142
    And I set the following fields to these values:
143
      | Questions per page | 1 |
144
    And I press "Change options"
145
 
146
  @javascript
147
  Scenario: Teacher can see user custom filed columns as additional user identity
148
    Given user "student1" has attempted "Quiz 1" with responses:
149
      | slot | response |
150
      | 1    | Paris    |
151
    When I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "teacher1"
152
    And I follow "Also show questions that have been graded automatically"
153
    And I click on "update grades" "link" in the "Short answer 001" "table_row"
154
    Then I should see "Attempt number 1 for S1 Student1 (student1, S1000, student1@example.com, little yellow frog)"
155
    And I should not see "You must enter a whole number that is greater than 0."
156
 
157
  Scenario: A marker cannot access the report in separate group
158
    Given user "student1" has attempted "Quiz 1" with responses:
159
      | slot | response |
160
      | 1    | frog     |
161
    And user "student2" has attempted "Quiz 1" with responses:
162
      | slot | response |
163
      | 1    | Duck     |
164
    When I am on the "Quiz 1" "mod_quiz > Manual grading report" page logged in as "marker"
165
    Then I should see "Quiz 1"
166
    And I should see "Separate groups: All participants"
167
    Then I should see "Sorry, but you need to be part of a group to see this page."
168
 
169
  @javascript @editor_atto
170
  Scenario: Manual grading report with attempts to be graded
171
    Given the following "questions" exist:
172
      | questioncategory | qtype | name     | user  | questiontext    |
173
      | Test questions   | essay | Essay Q1 | admin | Question 1 text |
174
    And quiz "Quiz 2" contains the following questions:
175
      | question | page |
176
      | Essay Q1 | 1    |
177
    And I log out
178
    When I am on the "Quiz 2" "mod_quiz > View" page logged in as "student1"
179
    And I press "Attempt quiz"
180
    And I set the field with xpath "//*[contains(concat(' ', @class, ' '), ' editor_atto_content ')]" to "This is my attempt 1"
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"
186
    And I set the field with xpath "//*[contains(concat(' ', @class, ' '), ' editor_atto_content ')]" to "This is my attempt 2"
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"
192
    And I set the field with xpath "//*[contains(concat(' ', @class, ' '), ' editor_atto_content ')]" to "This is my attempt 3"
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 log out
197
 
198
    And I am on the "Quiz 2" "mod_quiz > Manual grading report" page logged in as "teacher1"
199
    And I follow "Also show questions that have been graded automatically"
200
    And I should see "Essay Q1"
201
    And "Essay Q1" row "To grade" column of "questionstograde" table should contain "3"
202
    And "Essay Q1" row "Already graded" column of "questionstograde" table should contain "0"
203
    # Go to the grading page.
204
    And I click on "Grade" "link" in the "Essay Q1" "table_row"
205
    And I should see "Grading attempts 1 to 3 of 3"
206
    And I set the following fields to these values:
207
      | Questions per page | 1         |
208
      | Order attempts by  | ID number |
209
    And I press "Change options"
210
    And I should see "Grading attempts 1 to 1 of 3"
211
    # Adjust the mark for Student1
212
    And I set the field "Comment" to "I have adjusted your mark to 0.6"
213
    And I set the field "Mark" to "0.6"
214
    And I press "Save and show next"
215
    Then I should see "Grading attempts 1 to 1 of 2"
216
    And I press "Save and show next"
217
    And I should see "Grading attempts 2 to 2 of 2"