19 declare(strict_types=1);
55 array $environment = null
57 $bool_with_optional_addition = $refinery->custom()->transformation(
60 return [
false,
false];
62 return [
true, array_shift($v)];
66 $optgroup_lists = $f->optionalGroup(
69 $lng->
txt(
'tst_results_print_best_solution'),
70 $lng->
txt(
'tst_results_print_best_solution_info')
73 $lng->
txt(
'tst_show_solution_details'),
74 $lng->
txt(
'tst_show_solution_details_desc')
78 $optgroup_lists = $optgroup_lists->withValue(null);
81 $optgroup_singlepage = $f->optionalGroup(
84 $lng->
txt(
'tst_results_print_best_solution_singlepage'),
85 $lng->
txt(
'tst_results_print_best_solution_singlepage_info')
88 $lng->
txt(
'tst_show_solution_details_singlepage'),
89 $lng->
txt(
'tst_show_solution_details_singlepage_desc')
92 $optgroup_singlepage = $optgroup_singlepage->withValue(null);
96 $taxonomy_options = $environment[
'taxonomy_options'];
97 $taxonomy_ids = $f->multiselect(
98 $lng->
txt(
'tst_results_tax_filters'),
104 'solution_details' => $optgroup_lists,
105 'solution_details_singlepage' => $optgroup_singlepage,
107 'solution_feedback' => $f->checkbox(
108 $lng->
txt(
'tst_show_solution_feedback'),
109 $lng->
txt(
'tst_show_solution_feedback_desc')
111 'solution_suggested' => $f->checkbox(
112 $lng->
txt(
'tst_show_solution_suggested'),
113 $lng->
txt(
'tst_show_solution_suggested_desc')
115 'solution_printview' => $f->checkbox(
116 $lng->
txt(
'tst_show_solution_printview'),
117 $lng->
txt(
'tst_show_solution_printview_desc')
119 'solution_hide_page' => $f->checkbox(
120 $lng->
txt(
'tst_hide_pagecontents'),
121 $lng->
txt(
'tst_hide_pagecontents_desc')
124 'solution_signature' => $f->checkbox(
125 $lng->
txt(
'tst_show_solution_signature'),
126 $lng->
txt(
'tst_show_solution_signature_desc')
131 'examid_in_test_res' => $f->checkbox(
132 $lng->
txt(
'examid_in_test_res'),
133 $lng->
txt(
'examid_in_test_res_desc')
135 'exp_sc_short' => $f->checkbox(
136 $lng->
txt(
'tst_exp_sc_short'),
137 $lng->
txt(
'tst_exp_sc_short_desc')
139 'result_tax_filters' => $taxonomy_ids
143 return $f->section($fields, $lng->
txt(
'tst_results_details_options'))
145 $refinery->custom()->transformation(
147 list($solution_list_details, $solution_list_best_solution) = $v[
'solution_details'];
148 list($solution_sp_details, $solution_sp_best_solution) = $v[
'solution_details_singlepage'];
150 ->withShowSolutionListOwnAnswers($solution_list_details)
151 ->withShowSolutionListComparison($solution_list_best_solution)
152 ->withShowSolutionDetails($solution_sp_details)
153 ->withPrintBestSolutionWithResult($solution_sp_best_solution)
154 ->withShowSolutionFeedback($v[
'solution_feedback'])
155 ->withShowSolutionSuggested($v[
'solution_suggested'])
156 ->withShowSolutionPrintview($v[
'solution_printview'])
157 ->withShowSolutionAnswersOnly($v[
'solution_hide_page'])
158 ->withShowSolutionSignature($v[
'solution_signature'])
159 ->withShowExamIdInTestResults($v[
"examid_in_test_res"])
160 ->withExportSettingsSingleChoiceShort($v[
"exp_sc_short"])
161 ->withTaxonomyFilterIds($v[
"result_tax_filters"] ?? []);
186 $clone = clone $this;
197 $clone = clone $this;
208 $clone = clone $this;
215 return ($this->results_presentation & $bit) > 0;
219 $clone = clone $this;
220 $v = $clone->results_presentation;
229 $clone->results_presentation = $v;
320 $clone = clone $this;
326 return ($this->exportsettings & $bit) > 0;
330 $clone = clone $this;
331 $v = $clone->exportsettings;
340 $clone->exportsettings = $v;
358 $clone = clone $this;
withShowSolutionPrintview(bool $flag)
const RESULTPRES_BIT_SOLUTION_SIGNATURE
int $results_presentation
withShowSolutionListOwnAnswers(bool $flag)
withShowSolutionSuggested(bool $flag)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
withExportSettingsSingleChoiceShort(bool $flag)
getShowSolutionFeedback()
getShowSolutionSignature()
modifyResultPresentation(int $bit, bool $flag)
withShowPassDetails(bool $flag)
withShowSolutionAnswersOnly(bool $flag)
withTaxonomyFilterIds(array $taxonomy_filter_ids)
getExportSettingsSingleChoiceShort()
const RESULTPRES_BIT_SOLUTION_FEEDBACK
const RESULTPRES_BIT_SOLUTION_ANSWERS_ONLY
getShowSolutionListComparison()
withShowExamIdInTestResults(bool $examid_in_test_res)
getShowSolutionPrintview()
const EXPORT_BIT_SINGLECHOICE_SHORT
const RESULTPRES_BIT_SOLUTION_SUGGESTED
const RESULTPRES_BIT_SOLUTION_LISTCOMPARE
getShowSolutionAnswersOnly()
toForm(\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment=null)
__construct(int $test_id)
withShowSolutionFeedback(bool $flag)
compareExportSetting(int $bit)
getShowExamIdInTestResults()
withPrintBestSolutionWithResult(bool $print_bs_with_res)
getShowSolutionListOwnAnswers()
const RESULTPRES_BIT_SOLUTION_DETAILS
getPrintBestSolutionWithResult()
const RESULTPRES_BIT_SOLUTION_PRINTVIEW
const RESULTPRES_BIT_SOLUTION_LISTOWNANSWERS
modifyExportSetting(int $bit, bool $flag)
withExportSettings(int $exportsettings)
__construct(Container $dic, ilPlugin $plugin)
compareResultPresentation(int $bit)
array $taxonomy_filter_ids
getShowSolutionSuggested()
withResultsPresentation(int $results_presentation)
withShowSolutionDetails(bool $flag)
withShowSolutionListComparison(bool $flag)
withShowSolutionSignature(bool $flag)
const RESULTPRES_BIT_PASS_DETAILS
Refinery Factory $refinery