@@ -187,20 +187,20 @@ public function return_next_testitem(array $context) {
187
187
}
188
188
}
189
189
190
- if ($ this ->pre_check_first_question_selector ()) {
191
- $ res = $ this ->first_question_selector ();
192
- if ($ res ->iserr ()) {
193
- return $ res ;
194
- }
195
- $ val = $ res ->unwrap ();
196
- // If the result contains a single object, this is the question to be returned.
197
- // Othewise, it contains the updated $context array with the ability and standarderror set in such a way, that the
198
- // teststrategy will return the correct question (e.g. the question corresponding to mean ability of all students).
199
- if (is_object ($ val )) {
200
- return $ res ;
201
- }
202
- $ this ->context = $ val ;
203
- }
190
+ // if ($this->pre_check_first_question_selector()) {
191
+ // $res = $this->first_question_selector();
192
+ // if ($res->iserr()) {
193
+ // return $res;
194
+ // }
195
+ // $val = $res->unwrap();
196
+ // // If the result contains a single object, this is the question to be returned.
197
+ // // Othewise, it contains the updated $context array with the ability and standarderror set in such a way, that the
198
+ // // teststrategy will return the correct question (e.g. the question corresponding to mean ability of all students).
199
+ // if (is_object($val)) {
200
+ // return $res;
201
+ // }
202
+ // $this->context = $val;
203
+ // }
204
204
205
205
// Core methods called in every strategy.
206
206
$ res = $ this ->update_personability ();
@@ -209,6 +209,19 @@ public function return_next_testitem(array $context) {
209
209
}
210
210
$ context = $ res ->unwrap ();
211
211
212
+ $ res = $ this ->first_question_selector ();
213
+ if ($ res ->iserr ()) {
214
+ return $ res ;
215
+ }
216
+ $ val = $ res ->unwrap ();
217
+ // If the result contains a single object, this is the question to be returned.
218
+ // Othewise, it contains the updated $context array with the ability and standarderror set in such a way, that the
219
+ // teststrategy will return the correct question (e.g. the question corresponding to mean ability of all students).
220
+ if (is_object ($ val )) {
221
+ return $ res ;
222
+ }
223
+ $ this ->context = $ val ;
224
+
212
225
foreach ($ this ->get_preselecttasks () as $ modifier ) {
213
226
// When this is called for running tests, check if there is a
214
227
// X_testing class and if so, use that one.
0 commit comments