Skip to content

Commit

Permalink
GH-777 Remove passinglevel quiz setting
Browse files Browse the repository at this point in the history
  • Loading branch information
davidszkiba committed Dec 23, 2024
1 parent 2750bf4 commit 19ce374
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 22 deletions.
9 changes: 0 additions & 9 deletions classes/catquiz_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@ public static function instance_form_definition(MoodleQuickForm &$mform) {
'data-action' => 'submitCatScale',
]);

$elements[] = $mform->addElement('text', 'catquiz_passinglevel', get_string('passinglevel', 'local_catquiz'));
$mform->addHelpButton('catquiz_passinglevel', 'passinglevel', 'local_catquiz');
$mform->setType('catquiz_passinglevel', PARAM_INT);

info::instance_form_definition($mform, $elements);

return $elements;
Expand Down Expand Up @@ -413,11 +409,6 @@ public static function instance_form_validation(array $data) {
self::check_if_positive_int($errors, $data, "catquiz_maxtimeperattempt", 'catquiz_timelimitgroup');
self::check_if_positive_int($errors, $data, "catquiz_maxtimeperitem", 'catquiz_timelimitgroup');

// Validate higher and lower values.
if (0 > (int) $data['catquiz_passinglevel'] || 100 < (int) $data['catquiz_passinglevel']) {
$errors['catquiz_passinglevel'] = get_string('formelementwrongpercent', 'local_catquiz');
}

if (isset($data['catquiz_pilotratio'])) {
if (0 > (int) $data['catquiz_pilotratio'] || 100 < (int) $data['catquiz_pilotratio']) {
$errors['catquiz_pilotratio'] = get_string('formelementwrongpercent', 'local_catquiz');
Expand Down
2 changes: 0 additions & 2 deletions lang/de/local_catquiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,6 @@
$string['parentid'] = 'Übergeordnete ID';
$string['parentscale'] = 'Inhaltsbereich (Globalskala)';
$string['parentscalenamesinformation'] = 'Präzisieren Sie hier die übergeordneten Skalen der Skala um eine eindeutige Zuordnung zu ermöglichen. Übergeordnete Skalen können beim Import angelegt werden. Starten sie mit dem Namen der höchsten Skala und fügen sie alle Kinder mit „|“ (Vertikaler String Unicode U+007C - nicht zu verwechseln mit „/“ Slash) getrennt hinzu. Vergessen Sie dabei nicht die Globalskala. Für den Import von Items in die Globalskala, geben Sie bitte „0“ in diesem Feld an.';
$string['passinglevel'] = 'Bestehensgrenze in %';
$string['passinglevel_help'] = 'Die Bestehensgenze bezieht sich auf die Personenkompetenz und kann für jeden Test individuell gesetzt werden.';
$string['perattempt'] = 'pro Versuch ';
$string['peritem'] = 'pro Item ';
$string['personabilities'] = 'Fähigkeits-Werte';
Expand Down
2 changes: 0 additions & 2 deletions lang/en/local_catquiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,6 @@
$string['parentid'] = 'Parent id';
$string['parentscale'] = 'Parentscale';
$string['parentscalenamesinformation'] = 'To match the an item via the scalename, make sure to name all parent scales including root scale. For new - yet to be created - scales, you can enter parent scales for the defined scale. Start with the highest parent and separate all children with “|” (vertical line unicode U+007C - do not mistake for slash “/”). To enable import to parent scales, set “0” here.';
$string['passinglevel'] = 'Passing level in %';
$string['passinglevel_help'] = 'There is a level of personal competency that can be set for the test.';
$string['perattempt'] = 'per attempt ';
$string['peritem'] = 'per item ';
$string['personabilities'] = 'Ability scores';
Expand Down
7 changes: 1 addition & 6 deletions tests/behat/catquiz_settings.feature
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ Feature: As a teacher I setup adaptive quiz with CATquiz Scales and Feedbacks.
And I set the following fields to these values:
| catmodel | Catquiz CAT model |
| Select CAT scale | Simulation |
| Passing level in % | 500 |
| Purpose of test | Infer lowest skill gap |
| Activate pilot mode | 1 |
| Proportion of questions to be piloted in % | 20 |
Expand All @@ -165,15 +164,12 @@ Feature: As a teacher I setup adaptive quiz with CATquiz Scales and Feedbacks.
| catquiz_standarderrorgroup[catquiz_standarderror_max] | 2 |
When I click on "Save and display" "button"
## Errors validation 1: invalid numbers or min > max or no values
Then I should see "Input a number from 0 to 100" in the "#fitem_id_catquiz_passinglevel" "css_element"
And I should see "Minimum must be less than maximum" in the "#fgroup_id_maxquestionsgroup" "css_element"
Then I should see "Minimum must be less than maximum" in the "#fgroup_id_maxquestionsgroup" "css_element"
And I should see "Minimum must be less than maximum" in the "#fgroup_id_maxquestionsscalegroup" "css_element"
And I should see "Input at least one value of time limit" in the "#fgroup_id_catquiz_timelimitgroup" "css_element"
## Errors validation 1: SE min must be positive
And I should see "Input a positive number" in the "#fgroup_id_catquiz_standarderrorgroup" "css_element"
And I set the following fields to these values:
## Fix errors
| Passing level in % | 50 |
## Intentional error - empty catquiz_standarderror_min
| catquiz_standarderrorgroup[catquiz_standarderror_min] | |
## Intentional error catquiz_minquestionspersubscale > catquiz_maxquestions
Expand Down Expand Up @@ -220,7 +216,6 @@ Feature: As a teacher I setup adaptive quiz with CATquiz Scales and Feedbacks.
And the following fields match these values:
| catmodel | Catquiz CAT model |
| Select CAT scale | Simulation |
| Passing level in % | 50 |
| Purpose of test | Infer lowest skill gap |
| Activate pilot mode | 1 |
| Proportion of questions to be piloted in % | 20 |
Expand Down
1 change: 0 additions & 1 deletion tests/fixtures/testenvironment.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"catquiz_maxtimeperitem": "300",
"catquiz_timeselect_item": "sec"
},
"catquiz_passinglevel": "",
"catquiz_selectfirstquestion": "0",
"catquiz_firstquestionreuseexistingdata": "1",
"catquiz_selectteststrategy": "5",
Expand Down
1 change: 0 additions & 1 deletion tests/fixtures/testenvironmentdummy.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"catquiz_maxtimeperitem": "300",
"catquiz_timeselect_item": "sec"
},
"catquiz_passinglevel": "",
"catquiz_selectfirstquestion": "startwithcurrentability",
"catquiz_selectteststrategy": "5",
"choosetemplate": "0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,6 @@ private static function return_quizsettings(): array {
"catquiz_subscalecheckbox_293" => "1",
"catquiz_subscalecheckbox_294" => "1",
"catquiz_subscalecheckbox_295" => "1",
"catquiz_passinglevel" => "",
"catquiz_selectteststrategy" => "4",
"catquiz_includepilotquestions" => "0",
"catquiz_selectfirstquestion" => "startwitheasiestquestion",
Expand Down

0 comments on commit 19ce374

Please sign in to comment.