Skip to content

Commit

Permalink
Personabilities feedback: display standarderrors
Browse files Browse the repository at this point in the history
For each scale, we also display the standarderror for this scale.
The standarderror changes after each question, and here we display the value
that was calculated after the last response.
  • Loading branch information
davidszkiba committed Jan 23, 2024
1 parent 150d12d commit 27d0494
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions classes/teststrategy/feedbackgenerator/personabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ public function generate_feedback(array $initialcontext, $personabilities, $cach

$catscales = catquiz::get_catscales(array_keys($personabilities));
$data = [];
$lastcontext = end($cachedcontexts);
foreach ($personabilities as $catscaleid => $ability) {
if (abs(floatval($ability)) === abs(floatval(LOCAL_CATQUIZ_PERSONABILITY_MAX))) {
if ($ability < 0) {
Expand Down Expand Up @@ -280,6 +281,7 @@ public function generate_feedback(array $initialcontext, $personabilities, $cach
}

$data[] = [
'standarderror' => sprintf("%.2f", $lastcontext['se'][$catscaleid]),
'ability' => $ability,
'name' => $catscales[$catscaleid]->name,
'catscaleid' => $catscaleid,
Expand Down
1 change: 1 addition & 0 deletions lang/de/local_catquiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
$string['pilotattemptsthreshold'] = 'Mindestanzahl an Bearbeitungen';
$string['pilotattemptsthreshold_help'] = 'Fragen mit weniger Testversuchen werden als Pilotfragen klassifiziert';
$string['includepilotquestions'] = 'Pilotierungsmodus aktivieren';
$string['standarderror'] = 'Standardfehler';
$string['standarderrorpersubscale'] = 'Standardfehler pro Skala in Prozent';
$string['standarderrorpersubscale_help'] = 'Sobald der Standardfehler einer Skala unter diesen Wert fällt, wird sie nicht weiter getestet.';
$string['maxquestionspersubscale'] = 'max. Frageanzahl pro Skala';
Expand Down
1 change: 1 addition & 0 deletions lang/en/local_catquiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
$string['pilotattemptsthreshold'] = 'Minimum number of adaptations';
$string['pilotattemptsthreshold_help'] = 'Questions with less attempts will be considered pilot questions';
$string['includepilotquestions'] = 'Activate pilot mode';
$string['standarderror'] = 'Standarderror';
$string['standarderrorpersubscale'] = 'Standarderror per subscale in percent';
$string['standarderrorpersubscale_help'] = 'If the standard error for a scale drops below this value, it will no longer be tested.';
$string['maxquestionspersubscale'] = 'Maximum number of questions returned per subscale';
Expand Down
12 changes: 7 additions & 5 deletions templates/feedback/personabilities.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"abilities": [
{
"ability": 1.23,
"standarderror": 3.21,
"name": "Mathematics",
"isselectedscale": 1,
"catscaleid": 3,
Expand All @@ -43,6 +44,7 @@
},
{
"ability": 3.21,
"standarderror": 1.23,
"name": "catscale2",
"isselectedscale": 0,
"catscaleid": 3,
Expand Down Expand Up @@ -76,26 +78,26 @@
<div class="row">
{{#numberofitemsplayed}}
<div {{#isselectedscale}}
class="font-weight-bold col-6 text-right"
class="font-weight-bold col-4 text-right"
data-toggle="tooltip"
data-placement="top"
title="{{tooltiptitle}}"
{{/isselectedscale}}
{{^isselectedscale}}
class="font-weight-normal col-6 text-right"
class="font-weight-normal col-4 text-right"
{{/isselectedscale}}>
{{name}} :
</div>
<div {{#isselectedscale}}
class="font-weight-bold col-2 text-left"
class="font-weight-bold col-4 text-left"
data-toggle="tooltip"
data-placement="top"
title="{{tooltiptitle}}"
{{/isselectedscale}}
{{^isselectedscale}}
class="font-weight-normal col-2 text-left"
class="font-weight-normal col-4 text-left"
{{/isselectedscale}}>
{{ability}}
{{ability}} ({{#str}}standarderror, local_catquiz{{/str}}: {{standarderror}})
</div>
{{#itemsplayed}}
<div class="btn btn-light btn-sm col" data-toggle="modal" data-target=".catquizfeedbackabilitiesplayedquestions_{{catscaleid}}">
Expand Down

0 comments on commit 27d0494

Please sign in to comment.