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
@qbank @qbank_statistics
2
Feature: Show statistics in question bank
3
 
4
  Background:
5
    Given the following "courses" exist:
6
      | fullname | shortname | category |
7
      | Course 1 | C1        | 0        |
8
    And the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student1 | user1     | Student1 | student1@example.com |
11
      | student2 | user2     | Student2 | student2@example.com |
12
      | student3 | user3     | Student3 | student3@example.com |
13
      | student4 | user4     | Student4 | student4@example.com |
14
      | student5 | user5     | student5 | student5@example.com |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | student1 | C1     | student        |
18
      | student2 | C1     | student        |
1441 ariadna 19
    And the following "activities" exist:
20
      | activity   | name    | intro              | course | idnumber |
21
      | quiz       | Quiz 1  | Quiz 1 description | C1     | quiz1    |
22
      | quiz       | Quiz 2  | Quiz 2 description | C1     | quiz2    |
23
      | qbank      | Qbank 1 | Question bank 1    | C1     | qbank1   |
1 efrain 24
    And the following "questions" exist:
1441 ariadna 25
      | questioncategory    | qtype       | name  | questiontext    |
26
      | Default for Qbank 1 | truefalse   | TF1   | First question  |
27
      | Default for Qbank 1 | truefalse   | TF2   | Second question |
28
      | Default for Qbank 1 | truefalse   | TF3   | Third question  |
29
      | Default for Qbank 1 | truefalse   | TF4   | Fourth question |
1 efrain 30
    And quiz "Quiz 1" contains the following questions:
31
      | question | page | maxmark |
32
      | TF1      | 1    | 1.0     |
33
      | TF2      | 1    | 1.0     |
34
      | TF3      | 1    | 1.0     |
35
      | TF4      | 1    | 1.0     |
36
    And quiz "Quiz 2" contains the following questions:
37
      | question | page | maxmark |
38
      | TF2      | 1    | 1.0     |
39
      | TF3      | 1    | 1.0     |
40
    And user "student1" has attempted "Quiz 1" with responses:
41
      | slot | response |
42
      |   1  | False    |
43
      |   2  | False    |
44
      |   3  | False    |
45
      |   4  | False    |
46
    And user "student2" has attempted "Quiz 1" with responses:
47
      | slot | response |
48
      |   1  | True     |
49
      |   2  | True     |
50
      |   3  | True     |
51
      |   4  | True     |
52
    And user "student3" has attempted "Quiz 1" with responses:
53
      | slot | response |
54
      |   1  | True     |
55
      |   2  | False    |
56
      |   3  | False    |
57
      |   4  | True     |
58
    And user "student4" has attempted "Quiz 1" with responses:
59
      | slot | response |
60
      |   1  | False    |
61
      |   2  | True     |
62
      |   3  | True     |
63
      |   4  | False    |
64
 
65
  Scenario: View facility index in question bank
66
    Given user "student1" has attempted "Quiz 2" with responses:
67
      | slot | response |
68
      |   1  | True    |
69
      |   2  | True    |
70
    And user "student2" has attempted "Quiz 2" with responses:
71
      | slot | response |
72
      | 1    | True     |
73
      | 2    | True     |
74
    And I run pending statistics recalculation tasks
1441 ariadna 75
    When I am on the "Qbank 1" "core_question > question bank" page logged in as "admin"
1 efrain 76
    Then I should see "50.00%" in the "TF1" "table_row"
77
    And I should see "75.00%" in the "TF2" "table_row"
78
    And I should see "75.00%" in the "TF3" "table_row"
79
    And I should see "50.00%" in the "TF4" "table_row"
80
 
81
  Scenario: View discriminative efficiency in question bank
82
    Given user "student1" has attempted "Quiz 2" with responses:
83
      | slot | response |
84
      | 1    | False    |
85
      | 2    | False    |
86
    And user "student2" has attempted "Quiz 2" with responses:
87
      | slot | response |
88
      | 1    | True     |
89
      | 2    | True     |
90
    And I run pending statistics recalculation tasks
1441 ariadna 91
    When I am on the "Qbank 1" "core_question > question bank" page logged in as "admin"
1 efrain 92
    Then I should see "50.00%" in the "TF1" "table_row"
93
    And I should see "75.00%" in the "TF2" "table_row"
94
    And I should see "75.00%" in the "TF3" "table_row"
95
    And I should see "50.00%" in the "TF4" "table_row"
96
 
97
  Scenario: View discrimination index in question bank, good questions
98
    Given user "student1" has attempted "Quiz 2" with responses:
99
      | slot | response |
100
      | 1    | False    |
101
      | 2    | False    |
102
    And user "student2" has attempted "Quiz 2" with responses:
103
      | slot | response |
104
      | 1    | True     |
105
      | 2    | True     |
106
    And I run pending statistics recalculation tasks
1441 ariadna 107
    When I am on the "Qbank 1" "core_question > question bank" page logged in as "admin"
1 efrain 108
    Then I should see "Likely" in the "TF1" "table_row"
109
    And I should see "Unlikely" in the "TF2" "table_row"
110
    And I should see "Unlikely" in the "TF3" "table_row"
111
    And I should see "Likely" in the "TF4" "table_row"
112
    And I should see "Likely" in the ".alert-warning" "css_element"
113
    And I should see "Unlikely" in the ".alert-success" "css_element"
114
 
115
  Scenario: View discrimination index in question bank, bad questions
116
    Given user "student1" has attempted "Quiz 2" with responses:
117
      | slot | response |
118
      | 1    | True     |
119
      | 2    | True     |
120
    And user "student2" has attempted "Quiz 2" with responses:
121
      | slot | response |
122
      | 1    | False    |
123
      | 2    | True     |
124
    And user "student3" has attempted "Quiz 2" with responses:
125
      | slot | response |
126
      | 1    | True     |
127
      | 2    | False    |
128
    And I run pending statistics recalculation tasks
1441 ariadna 129
    When I am on the "Qbank 1" "core_question > question bank" page logged in as "admin"
1 efrain 130
    Then I should see "Likely" in the "TF1" "table_row"
131
    And I should see "Very likely" in the "TF2" "table_row"
132
    And I should see "Very likely" in the "TF3" "table_row"
133
    And I should see "Likely" in the "TF4" "table_row"
134
    And I should see "Very likely" in the ".alert-danger" "css_element"
135
    And I should see "Likely" in the ".alert-warning" "css_element"
136
 
137
  Scenario: View discrimination index in question bank for bad multichoice questions
138
    Given the following "courses" exist:
139
      | fullname | shortname | category |
140
      | Course 2 | C2        | 0        |
141
    And the following "course enrolments" exist:
142
      | user     | course | role           |
143
      | student1 | C2     | student        |
144
      | student2 | C2     | student        |
145
      | student3 | C2     | student        |
146
      | student4 | C2     | student        |
147
      | student5 | C2     | student        |
148
    And the following "activities" exist:
149
      | activity   | name   | course | idnumber |
150
      | quiz       | Quiz 3 | C2     | quiz3    |
151
    And the following "questions" exist:
1441 ariadna 152
      | questioncategory   | qtype       | template    | name |
153
      | Default for Quiz 3 | multichoice | one_of_four | MCA  |
154
      | Default for Quiz 3 | multichoice | one_of_four | MCB  |
155
      | Default for Quiz 3 | multichoice | one_of_four | MCC  |
156
      | Default for Quiz 3 | multichoice | one_of_four | MCD  |
157
      | Default for Quiz 3 | multichoice | one_of_four | MCE  |
1 efrain 158
    And quiz "Quiz 3" contains the following questions:
159
      | question | page | maxmark |
160
      | MCA      | 1    | 1.0     |
161
      | MCB      | 1    | 1.0     |
162
      | MCC      | 1    | 1.0     |
163
      | MCD      | 1    | 1.0     |
164
      | MCE      | 1    | 1.0     |
165
    # student1 answers all correctly
166
    And user "student1" has attempted "Quiz 3" with responses:
167
      | slot | response |
168
      | 1    | One      |
169
      | 2    | One      |
170
      | 3    | One      |
171
      | 4    | One      |
172
      | 5    | One      |
173
    # student2 answers A and B correctly, C, D and E incorrectly
174
    And user "student2" has attempted "Quiz 3" with responses:
175
      | slot | response |
176
      | 1    | One      |
177
      | 2    | One      |
178
      | 3    | Two      |
179
      | 4    | Two      |
180
      | 5    | Two      |
181
    # student3 answers A, D and E correctly, B and C incorrectly
182
    And user "student3" has attempted "Quiz 3" with responses:
183
      | slot | response |
184
      | 1    | One      |
185
      | 2    | Two      |
186
      | 3    | Two      |
187
      | 4    | One      |
188
      | 5    | One      |
189
    # student4 answers A and D correctly, B, C and E incorrectly
190
    And user "student4" has attempted "Quiz 3" with responses:
191
      | slot | response |
192
      | 1    | One      |
193
      | 2    | Two      |
194
      | 3    | Two      |
195
      | 4    | One      |
196
      | 5    | Two      |
197
    # student5 answers E correctly, B, C, D and A incorrectly
198
    And user "student5" has attempted "Quiz 3" with responses:
199
      | slot | response |
200
      | 1    | Two      |
201
      | 2    | Two      |
202
      | 3    | Two      |
203
      | 4    | Two      |
204
      | 5    | One      |
205
    And I run pending statistics recalculation tasks
206
    # Confirm the "Needs checking?" column matches the expected values based on students' answers
207
    When I am on the "Quiz 3" "mod_quiz > question bank" page logged in as "admin"
208
    Then "Likely" "text" should exist in the "MCA" "table_row"
209
    And "Very likely" "text" should exist in the "MCB" "table_row"
210
    And "Unlikely" "text" should exist in the "MCC" "table_row"
211
    And "Likely" "text" should exist in the "MCD" "table_row"
212
    And "Very likely" "text" should exist in the "MCE" "table_row"