Skip to content

Commit

Permalink
Teststrategies: add standarderror before stopping quiz
Browse files Browse the repository at this point in the history
Even if the maximum question limit is reached, calculate the ability
and standarderror based on the last response before finishing.
This means moving the `updatepersonability` and `addscalestandarderror`
classes to the top of the pre-select task lists.
  • Loading branch information
davidszkiba committed Jan 23, 2024
1 parent db51498 commit c535218
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions classes/teststrategy/strategy/classicalcat.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ class classicalcat extends strategy {
*/
public function get_preselecttasks(): array {
return [
updatepersonability::class,
addscalestandarderror::class,
maximumquestionscheck::class,
removeplayedquestions::class,
noremainingquestions::class,
mayberemovescale::class,
fisherinformation::class,
updatepersonability::class,
addscalestandarderror::class,
strategyclassicscore::class,
];
}
Expand Down
4 changes: 2 additions & 2 deletions classes/teststrategy/strategy/inferallsubscales.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ class inferallsubscales extends strategy {
*/
public function get_preselecttasks(): array {
return [
maximumquestionscheck::class, // Cancel quiz attempt if we reached maximum of questions.
updatepersonability::class,
addscalestandarderror::class,
maximumquestionscheck::class, // Cancel quiz attempt if we reached maximum of questions.
removeplayedquestions::class,
noremainingquestions::class,
fisherinformation::class, // Add the fisher information to each question.
Expand All @@ -85,7 +86,6 @@ public function get_preselecttasks(): array {
mayberemovescale::class, // Remove questions from excluded subscales.
maybe_return_pilot::class,
remove_uncalculated::class, // Remove items that do not have item parameters.
addscalestandarderror::class,
filterbystandarderror::class,
noremainingquestions::class, // Cancel quiz attempt if no questions are left.
strategyfastestscore::class,
Expand Down
5 changes: 2 additions & 3 deletions classes/teststrategy/strategy/inferlowestskillgap.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ class inferlowestskillgap extends strategy {
*/
public function get_preselecttasks(): array {
return [
maximumquestionscheck::class, // Cancel quiz attempt if we reached maximum of questions.
updatepersonability::class,
addscalestandarderror::class,
maximumquestionscheck::class, // Cancel quiz attempt if we reached maximum of questions.
removeplayedquestions::class,
noremainingquestions::class,
fisherinformation::class, // Add the fisher information to each question.
Expand All @@ -86,8 +87,6 @@ public function get_preselecttasks(): array {
maybe_return_pilot::class,
remove_uncalculated::class, // Remove items that do not have item parameters.
noremainingquestions::class, // Cancel quiz attempt if no questions are left.
// Keep only questions that are assigned to the subscale where the user has the lowest ability.
addscalestandarderror::class,
filterbystandarderror::class,
strategydeficitscore::class,
];
Expand Down
4 changes: 2 additions & 2 deletions classes/teststrategy/strategy/teststrategy_fastest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ class teststrategy_fastest extends strategy {
*/
public function get_preselecttasks(): array {
return [
updatepersonability::class,
addscalestandarderror::class,
maximumquestionscheck::class,
removeplayedquestions::class,
remove_uncalculated::class,
noremainingquestions::class,
mayberemovescale::class,
firstquestionselector::class,
updatepersonability::class,
lasttimeplayedpenalty::class,
fisherinformation::class,
addscalestandarderror::class,
strategyfastestscore::class,
];
}
Expand Down

0 comments on commit c535218

Please sign in to comment.