19 declare(strict_types=1);
41 $this->assertInstanceOf(ilObjTestScoreSettings::class, $s);
42 $this->assertEquals(
$id, $s->getTestId());
43 $this->assertInstanceOf(ilObjTestSettingsScoring::class, $s->getScoringSettings());
44 $this->assertInstanceOf(ilObjTestSettingsResultSummary::class, $s->getResultSummarySettings());
45 $this->assertInstanceOf(ilObjTestSettingsResultDetails::class, $s->getResultDetailsSettings());
46 $this->assertInstanceOf(ilObjTestSettingsGamification::class, $s->getGamificationSettings());
52 $this->assertEquals(-667, $s->withTestId(-667)->getTestId());
53 $this->assertEquals(2, $s->withCountSystem(2)->getCountSystem());
54 $this->assertEquals(4, $s->withScoreCutting(4)->getScoreCutting());
55 $this->assertEquals(5, $s->withPassScoring(5)->getPassScoring());
60 $dat = new \DateTimeImmutable();
62 $this->assertEquals(5, $s->withScoreReporting(5)->getScoreReporting());
63 $this->assertTrue($s->withScoreReporting(1)->getScoreReportingEnabled());
64 $this->assertFalse($s->withScoreReporting(0)->getScoreReportingEnabled());
65 $this->assertEquals($dat, $s->withReportingDate($dat)->getReportingDate());
66 $this->assertTrue($s->withShowGradingStatusEnabled(
true)->getShowGradingStatusEnabled());
67 $this->assertFalse($s->withShowGradingStatusEnabled(
false)->getShowGradingStatusEnabled());
68 $this->assertTrue($s->withShowGradingMarkEnabled(
true)->getShowGradingMarkEnabled());
69 $this->assertFalse($s->withShowGradingMarkEnabled(
false)->getShowGradingMarkEnabled());
70 $this->assertTrue($s->withPassDeletionAllowed(
true)->getPassDeletionAllowed());
71 $this->assertFalse($s->withPassDeletionAllowed(
false)->getPassDeletionAllowed());
72 $this->assertTrue($s->withShowPassDetails(
true)->getShowPassDetails());
73 $this->assertFalse($s->withShowPassDetails(
false)->getShowPassDetails());
79 $this->assertEquals(192, $s->withResultsPresentation(192)->getResultsPresentation(192));
80 $this->assertTrue($s->withShowExamIdInTestResults(
true)->getShowExamIdInTestResults());
81 $this->assertTrue($s->withShowPassDetails(
true)->getShowPassDetails());
82 $this->assertFalse($s->withShowPassDetails(
false)->getShowPassDetails());
83 $this->assertTrue($s->withShowSolutionPrintview(
true)->getShowSolutionPrintview());
84 $this->assertFalse($s->withShowSolutionPrintview(
false)->getShowSolutionPrintview());
85 $this->assertTrue($s->withShowSolutionFeedback(
true)->getShowSolutionFeedback());
86 $this->assertFalse($s->withShowSolutionFeedback(
false)->getShowSolutionFeedback());
87 $this->assertTrue($s->withShowSolutionAnswersOnly(
true)->getShowSolutionAnswersOnly());
88 $this->assertFalse($s->withShowSolutionAnswersOnly(
false)->getShowSolutionAnswersOnly());
89 $this->assertTrue($s->withShowSolutionSignature(
true)->getShowSolutionSignature());
90 $this->assertFalse($s->withShowSolutionSignature(
false)->getShowSolutionSignature());
91 $this->assertTrue($s->withShowSolutionSuggested(
true)->getShowSolutionSuggested());
92 $this->assertFalse($s->withShowSolutionSuggested(
false)->getShowSolutionSuggested());
93 $this->assertTrue($s->withShowSolutionListComparison(
true)->getShowSolutionListComparison());
94 $this->assertFalse($s->withShowSolutionListComparison(
false)->getShowSolutionListComparison());
95 $this->assertTrue($s->withShowPassDetails(
true)->getShowPassDetails());
101 $this->assertTrue($s->withHighscoreEnabled(
true)->getHighscoreEnabled());
102 $this->assertFalse($s->withHighscoreEnabled(
false)->getHighscoreEnabled());
103 $this->assertTrue($s->withHighscoreAnon(
true)->getHighscoreAnon());
104 $this->assertFalse($s->withHighscoreAnon(
false)->getHighscoreAnon());
105 $this->assertTrue($s->withHighscoreAchievedTS(
true)->getHighscoreAchievedTS());
106 $this->assertFalse($s->withHighscoreAchievedTS(
false)->getHighscoreAchievedTS());
107 $this->assertTrue($s->withHighscoreScore(
true)->getHighscoreScore());
108 $this->assertFalse($s->withHighscoreScore(
false)->getHighscoreScore());
109 $this->assertTrue($s->withHighscorePercentage(
true)->getHighscorePercentage());
110 $this->assertFalse($s->withHighscorePercentage(
false)->getHighscorePercentage());
111 $this->assertTrue($s->withHighscoreHints(
true)->getHighscoreHints());
112 $this->assertFalse($s->withHighscoreHints(
false)->getHighscoreHints());
113 $this->assertTrue($s->withHighscoreWTime(
true)->getHighscoreWTime());
114 $this->assertFalse($s->withHighscoreWTime(
false)->getHighscoreWTime());
115 $this->assertTrue($s->withHighscoreOwnTable(
true)->getHighscoreOwnTable());
116 $this->assertFalse($s->withHighscoreOwnTable(
false)->getHighscoreOwnTable());
117 $this->assertTrue($s->withHighscoreTopTable(
true)->getHighscoreTopTable());
118 $this->assertFalse($s->withHighscoreTopTable(
false)->getHighscoreTopTable());
119 $this->assertEquals(15, $s->withHighscoreTopNum(15)->getHighscoreTopNum());
126 $factory =
new I\Input\Field\Factory(
127 $this->createMock(
I\Input\UploadLimitResolver::class),
149 $s->toForm(...$this->getUIPack())
153 <div
class=
"il-section-input">
154 <div
class=
"il-section-input-header"><h2>test_scoring</h2></div>
156 <div
class=
"form-group row">
157 <label
class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_text_count_system</label>
158 <div
class=
"col-sm-8 col-md-9 col-lg-10">
159 <div
id=
"id_1" class=
"il-input-radio">
161 <div
class=
"form-control form-control-sm il-input-radiooption">
162 <input type=
"radio" id=
"id_1_0_opt" value=
"0" checked=
"checked" />
163 <label
for=
"id_1_0_opt">tst_count_partial_solutions</label>
164 <div
class=
"help-block">tst_count_partial_solutions_desc</div>
166 <div
class=
"form-control form-control-sm il-input-radiooption">
167 <input type=
"radio" id=
"id_1_1_opt" value=
"1" />
168 <label
for=
"id_1_1_opt">tst_count_correct_solutions</label>
169 <div
class=
"help-block">tst_count_correct_solutions_desc</div>
176 <div
class=
"form-group row">
177 <label
class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_score_cutting</label>
178 <div
class=
"col-sm-8 col-md-9 col-lg-10">
179 <div
id=
"id_2" class=
"il-input-radio">
181 <div
class=
"form-control form-control-sm il-input-radiooption">
182 <input type=
"radio" id=
"id_2_0_opt" value=
"0" checked=
"checked" />
183 <label
for=
"id_2_0_opt">tst_score_cut_question</label>
184 <div
class=
"help-block">tst_score_cut_question_desc</div>
186 <div
class=
"form-control form-control-sm il-input-radiooption">
187 <input type=
"radio" id=
"id_2_1_opt" value=
"1" />
188 <label
for=
"id_2_1_opt">tst_score_cut_test</label>
189 <div
class=
"help-block">tst_score_cut_test_desc</div>
196 <div
class=
"form-group row">
197 <label
class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_pass_scoring</label>
198 <div
class=
"col-sm-8 col-md-9 col-lg-10">
199 <div
id=
"id_3" class=
"il-input-radio">
200 <div
class=
"form-control form-control-sm il-input-radiooption">
201 <input type=
"radio" id=
"id_3_0_opt" value=
"0" checked=
"checked" />
202 <label
for=
"id_3_0_opt">tst_pass_last_pass</label>
203 <div
class=
"help-block">tst_pass_last_pass_desc</div>
205 <div
class=
"form-control form-control-sm il-input-radiooption">
206 <input type=
"radio" id=
"id_3_1_opt" value=
"1" />
207 <label
for=
"id_3_1_opt">tst_pass_best_pass</label>
208 <div
class=
"help-block">tst_pass_best_pass_desc</div>
226 public function symbol(): C\Symbol\Factory
239 $data_factory = new \ILIAS\Data\Factory();
241 $refinery = new \ILIAS\Refinery\Factory($data_factory, $language);
250 $ui = [$language, $field_factory,
$refinery];
254 $s->toForm(...array_merge($ui, [[
255 'user_time_zone' =>
'Europe/Berlin',
256 'user_date_format' => $data_factory->dateFormat()->withTime24(
257 $data_factory->dateFormat()->standard()
263 <div
class=
"il-section-input">
264 <div
class=
"il-section-input-header"><h2>test_results</h2></div>
265 <div
class=
"form-group row">
266 <label
for=
"id_8" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_results_access_enabled</label>
267 <div
class=
"col-sm-8 col-md-9 col-lg-10">
268 <input type=
"checkbox" id=
"id_8" value=
"checked" class=
"form-control form-control-sm form-has-collapsible-form" />
269 <div
class=
"help-block">tst_results_access_enabled_desc</div>
270 <div
class=
"form-group row">
271 <label
class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_results_access_setting<span
class=
"asterisk">*</span></label>
272 <div
class=
"col-sm-8 col-md-9 col-lg-10">
273 <div
id=
"id_2" class=
"il-input-radio">
274 <div
class=
"form-control form-control-sm il-input-radiooption form-has-collapsible-form">
275 <input type=
"radio" id=
"id_2_2_opt" value=
"2" />
276 <label
for=
"id_2_2_opt">tst_results_access_always</label>
277 <div
class=
"help-block">tst_results_access_always_desc</div>
279 <div
class=
"form-control form-control-sm il-input-radiooption form-has-collapsible-form">
280 <input type=
"radio" id=
"id_2_1_opt" value=
"1" />
281 <label
for=
"id_2_1_opt">tst_results_access_finished</label>
282 <div
class=
"help-block">tst_results_access_finished_desc</div>
284 <div
class=
"form-control form-control-sm il-input-radiooption form-has-collapsible-form">
285 <input type=
"radio" id=
"id_2_4_opt" value=
"4" />
286 <label
for=
"id_2_4_opt">tst_results_access_passed</label>
287 <div
class=
"help-block">tst_results_access_passed_desc</div>
290 <div
class=
"form-control form-control-sm il-input-radiooption form-has-collapsible-form">
291 <input type=
"radio" id=
"id_2_3_opt" value=
"3" />
292 <label
for=
"id_2_3_opt">tst_results_access_date</label>
293 <div
class=
"form-group row">
294 <label
for=
"id_3" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_reporting_date<span
class=
"asterisk">*</span></label>
295 <div
class=
"col-sm-8 col-md-9 col-lg-10">
296 <div
class=
"input-group date il-input-datetime">
297 <input
id=
"id_3" type=
"datetime-local" class=
"form-control form-control-sm" />
301 <div
class=
"help-block">tst_results_access_date_desc</div>
307 <div
class=
"form-group row">
308 <label
for=
"id_4" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_results_grading_opt_show_status</label>
309 <div
class=
"col-sm-8 col-md-9 col-lg-10">
310 <input type=
"checkbox" id=
"id_4" value=
"checked" class=
"form-control form-control-sm" />
311 <div
class=
"help-block">tst_results_grading_opt_show_status_desc</div>
314 <div
class=
"form-group row">
315 <label
for=
"id_5" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_results_grading_opt_show_mark</label>
316 <div
class=
"col-sm-8 col-md-9 col-lg-10">
317 <input type=
"checkbox" id=
"id_5" value=
"checked" class=
"form-control form-control-sm" />
318 <div
class=
"help-block">tst_results_grading_opt_show_mark_desc</div>
321 <div
class=
"form-group row">
322 <label
for=
"id_6" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_results_grading_opt_show_details</label>
323 <div
class=
"col-sm-8 col-md-9 col-lg-10">
324 <input type=
"checkbox" id=
"id_6" value=
"checked" class=
"form-control form-control-sm" />
325 <div
class=
"help-block">tst_results_grading_opt_show_details_desc</div>
328 <div
class=
"form-group row">
329 <label
for=
"id_7" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_pass_deletion</label>
330 <div
class=
"col-sm-8 col-md-9 col-lg-10">
331 <input type=
"checkbox" id=
"id_7" value=
"checked" class=
"form-control form-control-sm" />
332 <div
class=
"help-block">tst_pass_deletion_allowed</div>
357 [[
'taxonomy_options' => $tax_ids]]
363 <div
class=
"il-section-input">
364 <div
class=
"il-section-input-header"><h2>tst_results_details_options</h2></div>
366 <div
class=
"form-group row">
367 <label
for=
"id_1" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_results_print_best_solution</label>
368 <div
class=
"col-sm-8 col-md-9 col-lg-10">
369 <input type=
"checkbox" id=
"id_1" value=
"checked" class=
"form-control form-control-sm" /><div
class=
"help-block">tst_results_print_best_solution_info</div>
373 <div
class=
"form-group row">
374 <label
for=
"id_2" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_show_solution_feedback</label>
375 <div
class=
"col-sm-8 col-md-9 col-lg-10">
376 <input type=
"checkbox" id=
"id_2" value=
"checked" class=
"form-control form-control-sm" /><div
class=
"help-block">tst_show_solution_feedback_desc</div>
380 <div
class=
"form-group row">
381 <label
for=
"id_3" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_show_solution_suggested</label><div
class=
"col-sm-8 col-md-9 col-lg-10">
382 <input type=
"checkbox" id=
"id_3" value=
"checked" class=
"form-control form-control-sm" /><div
class=
"help-block">tst_show_solution_suggested_desc</div>
386 <div
class=
"form-group row">
387 <label
for=
"id_4" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_show_solution_printview</label><div
class=
"col-sm-8 col-md-9 col-lg-10">
388 <input type=
"checkbox" id=
"id_4" value=
"checked" class=
"form-control form-control-sm" /><div
class=
"help-block">tst_show_solution_printview_desc</div>
392 <div
class=
"form-group row">
393 <label
for=
"id_5" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_hide_pagecontents</label><div
class=
"col-sm-8 col-md-9 col-lg-10">
394 <input type=
"checkbox" id=
"id_5" value=
"checked" class=
"form-control form-control-sm" /><div
class=
"help-block">tst_hide_pagecontents_desc</div>
398 <div
class=
"form-group row">
399 <label
for=
"id_6" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_show_solution_signature</label><div
class=
"col-sm-8 col-md-9 col-lg-10">
400 <input type=
"checkbox" id=
"id_6" value=
"checked" class=
"form-control form-control-sm" /><div
class=
"help-block">tst_show_solution_signature_desc</div>
404 <div
class=
"form-group row">
405 <label
for=
"id_7" class=
"control-label col-sm-4 col-md-3 col-lg-2">examid_in_test_res</label><div
class=
"col-sm-8 col-md-9 col-lg-10">
406 <input type=
"checkbox" id=
"id_7" value=
"checked" checked=
"checked" class=
"form-control form-control-sm" /><div
class=
"help-block">examid_in_test_res_desc</div>
424 $s->toForm(...$this->getUIPack())
428 <div
class=
"il-section-input">
430 <div
class=
"il-section-input-header"><h2>tst_results_gamification</h2></div>
432 <div
class=
"form-group row">
433 <label
for=
"id_10" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_highscore_enabled</label>
434 <div
class=
"col-sm-8 col-md-9 col-lg-10">
435 <input type=
"checkbox" id=
"id_10" value=
"checked" class=
"form-control form-control-sm form-has-collapsible-form" />
436 <div
class=
"help-block">tst_highscore_description</div>
438 <div
class=
"form-group row">
439 <label
class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_highscore_mode<span
class=
"asterisk">*</span></label>
440 <div
class=
"col-sm-8 col-md-9 col-lg-10">
441 <div
id=
"id_2" class=
"il-input-radio">
442 <div
class=
"form-control form-control-sm il-input-radiooption">
443 <input type=
"radio" id=
"id_2_1_opt" value=
"1" />
444 <label
for=
"id_2_1_opt">tst_highscore_own_table</label>
445 <div
class=
"help-block">tst_highscore_own_table_description</div>
448 <div
class=
"form-control form-control-sm il-input-radiooption">
449 <input type=
"radio" id=
"id_2_2_opt" value=
"2" />
450 <label
for=
"id_2_2_opt">tst_highscore_top_table</label>
451 <div
class=
"help-block">tst_highscore_top_table_description</div>
454 <div
class=
"form-control form-control-sm il-input-radiooption">
455 <input type=
"radio" id=
"id_2_3_opt" value=
"3" checked=
"checked" />
456 <label
for=
"id_2_3_opt">tst_highscore_all_tables</label>
457 <div
class=
"help-block">tst_highscore_all_tables_description</div>
463 <div
class=
"form-group row">
464 <label
for=
"id_3" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_highscore_top_num<span
class=
"asterisk">*</span></label>
465 <div
class=
"col-sm-8 col-md-9 col-lg-10">
466 <input
id=
"id_3" type=
"number" value=
"10" class=
"form-control form-control-sm" />
467 <div
class=
"help-block">tst_highscore_top_num_description</div>
471 <div
class=
"form-group row">
472 <label
for=
"id_4" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_highscore_anon</label>
473 <div
class=
"col-sm-8 col-md-9 col-lg-10">
474 <input type=
"checkbox" id=
"id_4" value=
"checked" checked=
"checked" class=
"form-control form-control-sm" />
475 <div
class=
"help-block">tst_highscore_anon_description</div>
478 <div
class=
"form-group row">
479 <label
for=
"id_5" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_highscore_achieved_ts</label>
480 <div
class=
"col-sm-8 col-md-9 col-lg-10">
481 <input type=
"checkbox" id=
"id_5" value=
"checked" checked=
"checked" class=
"form-control form-control-sm" />
482 <div
class=
"help-block">tst_highscore_achieved_ts_description</div>
485 <div
class=
"form-group row">
486 <label
for=
"id_6" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_highscore_score</label>
487 <div
class=
"col-sm-8 col-md-9 col-lg-10">
488 <input type=
"checkbox" id=
"id_6" value=
"checked" checked=
"checked" class=
"form-control form-control-sm" />
489 <div
class=
"help-block">tst_highscore_score_description</div>
492 <div
class=
"form-group row">
493 <label
for=
"id_7" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_highscore_percentage</label>
494 <div
class=
"col-sm-8 col-md-9 col-lg-10">
495 <input type=
"checkbox" id=
"id_7" value=
"checked" checked=
"checked" class=
"form-control form-control-sm" />
496 <div
class=
"help-block">tst_highscore_percentage_description</div>
499 <div
class=
"form-group row">
500 <label
for=
"id_8" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_highscore_hints</label>
501 <div
class=
"col-sm-8 col-md-9 col-lg-10">
502 <input type=
"checkbox" id=
"id_8" value=
"checked" checked=
"checked" class=
"form-control form-control-sm" />
503 <div
class=
"help-block">tst_highscore_hints_description</div>
506 <div
class=
"form-group row">
507 <label
for=
"id_9" class=
"control-label col-sm-4 col-md-3 col-lg-2">tst_highscore_wtime</label>
508 <div
class=
"col-sm-8 col-md-9 col-lg-10">
509 <input type=
"checkbox" id=
"id_9" value=
"checked" checked=
"checked" class=
"form-control form-control-sm" />
510 <div
class=
"help-block">tst_highscore_wtime_description</div>
540 $this->score_settings = $s;
544 $this->assertIsInt($t->getCountSystem());
545 $this->assertIsInt($t->getScoreCutting());
546 $this->assertIsInt($t->getPassScoring());
547 $this->assertNull($t->getReportingDate());
548 $this->assertIsBool($t->getShowPassDetails());
549 $this->assertIsBool($t->getShowSolutionAnswersOnly());
550 $this->assertIsBool($t->getShowSolutionSignature());
551 $this->assertIsBool($t->getShowSolutionSuggested());
552 $this->assertIsBool($t->getShowSolutionListComparison());
553 $this->assertIsBool($t->isPassDeletionAllowed());
554 $this->assertIsInt($t->getExportSettings());
555 $this->assertIsBool($t->getHighscoreEnabled());
556 $this->assertIsBool($t->getHighscoreAnon());
557 $this->assertIsBool($t->getHighscoreAchievedTS());
558 $this->assertIsBool($t->getHighscoreScore());
559 $this->assertIsBool($t->getHighscorePercentage());
560 $this->assertIsBool($t->getHighscoreHints());
561 $this->assertIsBool($t->getHighscoreWTime());
562 $this->assertIsBool($t->getHighscoreOwnTable());
563 $this->assertIsBool($t->getHighscoreTopTable());
564 $this->assertIsInt($t->getHighscoreTopNum());
565 $this->assertIsInt($t->getHighscoreMode());
580 $s = $s->withTestId($nu_id);
581 $this->assertEquals($nu_id, $s->getTestId());
582 $this->assertEquals($nu_id, $s->getScoringSettings()->getTestId());
583 $this->assertEquals($nu_id, $s->getResultSummarySettings()->getTestId());
584 $this->assertEquals($nu_id, $s->getResultDetailsSettings()->getTestId());
585 $this->assertEquals($nu_id, $s->getGamificationSettings()->getTestId());
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
testScoreSettingsSectionGamification()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
testScoreSettingsRelayingTestId()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
testScoreSettingsSectionDetails()
testScoreSettingsSummary()
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
testScoreSettingsDetails()
testScoreSettingsSectionSummary()
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
Provides common functionality for UI tests.
testScoreSettingsScoring()
testScoreSettingsSectionScoring()
testScoreSettingsGamification()
testScoreSettingsDirectlyAccessedByTestObj()
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
brutallyTrimSignals(string $html)
A naive replacement of all il_signal-ids with dots to ease comparisons of rendered output...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Refinery Factory $refinery