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
2
Feature: Allow students to redo questions in a practice quiz, without starting a whole new attempt
3
  In order to practice particular skills I am struggling with
4
  As a student
5
  I need to be able to redo each question in a quiz as often as necessary without starting a whole new attempt, if my teacher allows it.
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname |
10
      | student  | Student   | One      |
11
      | teacher  | Teacher   | One      |
12
      | editor   | Question  | Editor   |
13
    And the following "courses" exist:
14
      | fullname | shortname | category |
15
      | Course 1 | C1        | 0        |
16
    And the following "course enrolments" exist:
17
      | user    | course | role           |
18
      | student | C1     | student        |
19
      | teacher | C1     | teacher        |
20
      | editor  | C1     | editingteacher |
1441 ariadna 21
    And the following "activities" exist:
22
      | activity | name    | intro              | course | idnumber | preferredbehaviour | canredoquestions |
23
      | quiz     | Quiz 1  | Quiz 1 description | C1     | quiz1    | immediatefeedback  | 1                |
24
      | qbank    | Qbank 1 |                    | C1     | qbank1   |                    |                  |
1 efrain 25
    And the following "question categories" exist:
1441 ariadna 26
      | contextlevel    | reference    | name           |
27
      | Activity module | qbank1       | Test questions |
1 efrain 28
    And the following "questions" exist:
29
      | questioncategory | qtype     | name | questiontext    |
30
      | Test questions   | truefalse | TF1  | First question  |
31
      | Test questions   | truefalse | TF2  | Second question |
32
    And quiz "Quiz 1" contains the following questions:
33
      | question | page | maxmark |
34
      | TF1      | 1    | 2       |
35
      | TF2      | 1    | 1       |
36
 
37
  @javascript
38
  Scenario: After completing a question, there is a redo question button that restarts the question
39
    Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
40
    When I press "Attempt quiz"
41
    And I click on "False" "radio" in the "First question" "question"
42
    And I click on "Check" "button" in the "First question" "question"
43
    And I press "Try another question like this one"
44
    Then the state of "First question" question is shown as "Not complete"
45
    And I should see "Marked out of 2.00" in the "First question" "question"
46
 
47
  @javascript
48
  Scenario: After redoing a question, regrade works
49
    Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
50
    When I press "Attempt quiz"
51
    And I click on "False" "radio" in the "First question" "question"
52
    And I click on "Check" "button" in the "First question" "question"
53
    And I press "Try another question like this one"
54
    And I am on the "Quiz 1" "mod_quiz > Grades report" page logged in as "teacher"
1441 ariadna 55
    And I press "Regrade attempts..."
56
    And I click on "Regrade now" "button" in the "Regrade" "dialogue"
1 efrain 57
    Then I should see "Finished regrading (1/1)"
58
    And I should see "Regrade completed"
59
    And I press "Continue"
60
    # Regrade a second time, to ensure the first regrade did not corrupt any data.
1441 ariadna 61
    And I press "Regrade attempts..."
62
    And I click on "Regrade now" "button" in the "Regrade" "dialogue"
1 efrain 63
    And I should see "Finished regrading (1/1)"
64
    And I should see "Regrade completed"
65
 
66
  @javascript
67
  Scenario: Start attempt, teacher edits question, redo picks up latest non-draft version
68
    # Start attempt as student.
69
    Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
70
    And I press "Attempt quiz"
71
    And I click on "False" "radio" in the "First question" "question"
72
    And I click on "Check" "button" in the "First question" "question"
73
    And I log out
74
 
75
    # Now edit the question as teacher to add a real version and a draft version.
76
    # Would be nice to do this with a generator, but I don't have time right now.
77
    And I am on the "TF1" "core_question > edit" page logged in as "editor"
78
    And I set the following fields to these values:
79
      | Question name   | TF1-v2                 |
80
      | Question text   | The new first question |
81
      | Correct answer  | False                  |
82
    And I press "id_submitbutton"
83
    And I am on the "TF1-v2" "core_question > edit" page
84
    And I set the following fields to these values:
85
      | Question name   | TF1-v3                     |
86
      | Question text   | This is only draft for now |
87
      | Correct answer  | True                       |
88
      | Question status | Draft                      |
89
    And I press "id_submitbutton"
90
    And I log out
91
 
92
    When I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
93
    And I press "Continue your attempt"
94
    And I press "Try another question like this one"
95
    Then the state of "The new first question" question is shown as "Not complete"
96
    And I should see "Marked out of 2.00" in the "The new first question" "question"
97
    And I should not see "This is only draft for now"
98
 
99
  @javascript
100
  Scenario: The redo question button is visible but disabled for teachers
101
    Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
102
    When I press "Attempt quiz"
103
    And I click on "False" "radio" in the "First question" "question"
104
    And I click on "Check" "button" in the "First question" "question"
105
    And I log out
106
    And I am on the "Quiz 1" "mod_quiz > View" page logged in as "teacher"
107
    And I follow "Attempts: 1"
108
    And I follow "Review attempt"
109
    Then the "Try another question like this one" "button" should be disabled
110
 
111
  @javascript
112
  Scenario: The redo question buttons are no longer visible after the attempt is submitted.
113
    Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
114
    When I press "Attempt quiz"
115
    And I click on "False" "radio" in the "First question" "question"
116
    And I click on "Check" "button" in the "First question" "question"
117
    And I press "Finish attempt ..."
118
    And I press "Submit all and finish"
119
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
120
    Then "Try another question like this one" "button" should not exist
121
 
122
  @javascript @_switch_window
123
  Scenario: Teachers reviewing can see all the questions attempted in a slot
124
    Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
125
    And I press "Attempt quiz"
126
    And I click on "False" "radio" in the "First question" "question"
127
    And I click on "Check" "button" in the "First question" "question"
128
    And I press "Try another question like this one"
129
    And I press "Finish attempt ..."
130
    And I press "Submit all and finish"
131
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
132
    And I log out
133
    When I am on the "Quiz 1" "mod_quiz > View" page logged in as "teacher"
134
    And I follow "Attempts: 1"
135
    And I follow "Review attempt"
136
    And I click on "1" "link" in the "First question" "question"
137
    And I switch to "reviewquestion" window
138
    Then the state of "First question" question is shown as "Incorrect"
139
    And I click on "1" "link" in the "First question" "question"
140
    And the state of "First question" question is shown as "Not complete"
141
    And I switch to the main window
142
    And the state of "First question" question is shown as "Not answered"
143
    And I should not see "Submit" in the ".history" "css_element"
144
    And I am on the "Quiz 1" "mod_quiz > Statistics report" page logged in as teacher
145
    And I follow "TF1"
146
    And "False" row "Frequency" column of "quizresponseanalysis" table should contain "100.00%"
147
    And "True" row "Frequency" column of "quizresponseanalysis" table should contain "0.00%"
148
    And "[No response]" row "Frequency" column of "quizresponseanalysis" table should contain "100.00%"
149
 
150
  @javascript @_switch_window
151
  Scenario: Teachers reviewing can switch between attempts in the review question popup
152
    Given I am on the "Quiz 1" "mod_quiz > View" page logged in as student
153
    # Create two attempts, only one of which has a redo.
154
    When I press "Attempt quiz"
155
    And I click on "False" "radio" in the "First question" "question"
156
    And I click on "Check" "button" in the "First question" "question"
157
    And I press "Try another question like this one"
158
    And I press "Finish attempt ..."
159
    And I press "Submit all and finish"
160
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
161
    And I follow "Finish review"
162
    And I press "Re-attempt quiz"
163
    And I click on "True" "radio" in the "First question" "question"
164
    And I click on "Check" "button" in the "First question" "question"
165
    And I log out
166
    And I am on the "Quiz 1" "mod_quiz > View" page logged in as teacher
167
    And I follow "Attempts: 2"
168
    # Review the first attempt - and switch to the first question seen.
169
    And I follow "Review attempt"
170
    And I click on "1" "link" in the "First question" "question"
171
    And I switch to "reviewquestion" window
1441 ariadna 172
    And "Summary of attempt" "table" should exist
1 efrain 173
    And the state of "First question" question is shown as "Incorrect"
174
    # Now switch to the other quiz attempt using the link at the top, which does not have a redo.
175
    And I click on "2" "link" in the "Attempts" "table_row"
176
    Then the state of "First question" question is shown as "Correct"
177
    And I should not see "Other questions attempted here"
178
 
179
  @javascript
180
  Scenario: Redoing question 1 should save any changes to question 2 on the same page
181
    Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
182
    When I press "Attempt quiz"
183
    And I click on "False" "radio" in the "First question" "question"
184
    And I click on "Check" "button" in the "First question" "question"
185
    And I click on "True" "radio" in the "Second question" "question"
186
    And I press "Try another question like this one"
187
    And I click on "Check" "button" in the "Second question" "question"
188
    Then the state of "Second question" question is shown as "Correct"
189
 
190
  @javascript
191
  Scenario: Redoing questions should work with random questions as well
192
    Given the following "activities" exist:
193
      | activity | name   | intro              | course | idnumber | preferredbehaviour | canredoquestions |
194
      | quiz     | Quiz 2 | Quiz 2 description | C1     | quiz2    | immediatefeedback  | 1                |
195
    And I am on the "Quiz 2" "mod_quiz > Edit" page logged in as "admin"
196
    And I open the "last" add to quiz menu
197
    And I follow "a random question"
1441 ariadna 198
    And I click on "Switch bank" "button"
199
    And I click on "Qbank 1" "link" in the "Select question bank" "dialogue"
200
    And I apply question bank filter "Category" with value "Test questions"
1 efrain 201
    And I press "Add random question"
202
    And user "student" has started an attempt at quiz "Quiz 2" randomised as follows:
203
      | slot | actualquestion |
204
      | 1    | TF1            |
205
    And I am on the "Quiz 2" "mod_quiz > View" page logged in as "student"
206
    When I press "Continue your attempt"
207
    And I should see "First question"
208
    And I click on "False" "radio"
209
    And I click on "Check" "button"
210
    And I press "Try another question like this one"
211
    And I should see "Second question"
212
    And "Check" "button" should exist
213
 
214
  Scenario: Teachers reviewing can see author of action in review attempt
215
    Given the following "questions" exist:
216
      | questioncategory | qtype       | name | questiontext                   | answer 1    | grade |
217
      | Test questions   | shortanswer | SA1  | Who is author of Harry Potter? | J.K.Rowling | 100%  |
218
    And the following "activities" exist:
219
      | activity | name   | intro              | course | idnumber |
220
      | quiz     | Quiz 2 | Quiz 2 description | C1     | quiz2    |
221
    And quiz "Quiz 2" contains the following questions:
222
      | question | page |
223
      | SA1      | 1    |
224
    And user "student" has attempted "Quiz 2" with responses:
225
      | slot | response    |
226
      | 1    | J.K.Rowling |
227
    And I am on the "Quiz 2" "mod_quiz > Manual grading report" page logged in as "teacher"
228
    And I follow "Also show questions that have been graded automatically"
229
    When I click on "update grades" "link" in the "SA1" "table_row"
230
    Then I set the field "Comment" to "I have adjusted your mark to 1.0"
231
    And I set the field "Mark" to "1.0"
232
    And I press "Save and show next"
233
    And I follow "Results"
234
    And I follow "Review attempt"
235
    And I should see "Teacher One" in the "I have adjusted your mark to 1.0" "table_row"