19declare(strict_types=1);
205 'test_question_set_type_fixed',
206 'tst_title_output_full',
207 'tst_title_output_hide_points',
208 'tst_title_output_no_title',
209 'tst_title_output_only_points',
210 'tst_instant_feedback_trigger_forced',
211 'tst_instant_feedback_trigger_manual',
212 'tst_answer_fixation_none',
213 'tst_answer_fixation_on_instantfb_or_followupqst',
214 'tst_answer_fixation_on_instant_feedback',
215 'tst_answer_fixation_on_followup_question',
216 'tst_highscore_own_table',
217 'tst_highscore_top_table',
218 'tst_highscore_all_tables',
219 'tst_results_access_setting',
220 'tst_results_access_finished',
221 'tst_results_access_always',
222 'tst_results_access_setting',
223 'tst_results_access_passed',
224 'tst_count_partial_solutions',
225 'tst_count_correct_solutions',
226 'tst_score_cut_question',
227 'tst_score_cut_test',
228 'tst_pass_last_pass',
229 'tst_pass_best_pass',
230 'tst_inp_quest_amount_cfg_mode_pool',
231 'tst_imap_qst_mode_mc',
232 'tst_imap_qst_mode_sc',
233 'option_label_right_wrong',
234 'option_label_plus_minus',
235 'option_label_applicable_or_not',
236 'option_label_adequate_or_not',
237 'option_label_custom',
238 'qpl_qst_inp_matching_mode_one_on_one',
239 'qpl_qst_inp_matching_mode_all_on_all',
240 'essay_scoring_mode_without_keywords',
241 'essay_scoring_mode_keyword_relation_any',
242 'essay_scoring_mode_keyword_relation_all',
243 'essay_scoring_mode_keyword_relation_one',
244 'qst_nested_nested_answers_off',
245 'qst_nested_nested_answers_on',
246 'oq_btn_use_order_pictures',
247 'oq_btn_use_order_terms',
261 private readonly UIFactory $ui_factory,
265 $lng->loadLanguageModule(
'assessment');
266 $lng->loadLanguageModule(
'crs');
271 array $additional_info,
273 ): DescriptiveListing {
285 array_keys($additional_info)
288 fn(string $k): string => $this->
parseValue($k, $additional_info[$k], $environment),
289 array_keys($additional_info)
296 array $additional_info,
302 fn(string $k) =>
"{$this->getCorrectedTranslationForKey($k)}: {$this->parseValue($k, $additional_info[$k] ?? '', $environment)}",
303 array_keys($additional_info)
310 return $bool ? self::TAG_TRUE : self::TAG_FALSE;
315 return $bool ? self::TAG_ENABLED : self::TAG_DISABLED;
320 return $bool ? self::TAG_CHECKED : self::TAG_UNCHECKED;
325 return self::TAG_NONE;
330 return "{{ {$lang_var} }}";
336 if (array_key_exists($key, self::LEGACY_TAGS)) {
337 $lang_var = self::LEGACY_TAGS[$key];
340 return $this->
lng->exists($lang_var) ? $this->
lng->txt($lang_var) : $key;
345 string|
int|
float|array $value,
350 return \ilUserUtil::getNamePresentation(
357 case self::KEY_USERS:
358 return $this->buildListOfUsers($value);
359 case self::KEY_QUESTION_TYPE:
360 return $this->
lng->txt($value);
361 case self::KEY_QUESTIONS:
365 fn(
int $usr):
string => $this->questions_repo
366 ->getForQuestionId($usr)?->
getTitle() ?? $this->
lng->txt(
'deleted'),
370 case self::KEY_QUESTION_ID:
371 if (is_int($value)) {
372 return $this->
refinery->encode()->htmlSpecialCharsAsEntities()->transform(
373 $this->questions_repo->getForQuestionId($value)?->getTitle() ?? $this->lng->txt(
'deleted')
378 return $this->buildDefaultValueString($value, $environment);
400 string|
int|
float|array $value,
404 || is_float($value)) {
405 return (
string) $value;
407 if (is_array($value)) {
408 return $this->buildValueStringFromArray($value, $environment);
411 return $this->
lng->txt(
'none');
413 if (strpos($value,
'+0000') !==
false
414 && ($date = \DateTimeImmutable::createFromFormat(self::DATE_STORAGE_FORMAT, $value)) !==
false) {
416 ->setTimezone($environment[
'timezone'])
417 ->format($environment[
'date_format']);
419 return $this->template_engine->render(
420 $this->
refinery->string()->stripTags()->transform($value),
429 function (
$c, $k) use ($value, $environment):
string {
432 $label = $this->getCorrectedTranslationForKey($k);
437 return "{$c}{$label}: {$this->parseValue($k, $value[$k], $environment)}";
445 return array_combine(
448 fn(
string $v):
string => $this->
lng->txt($v),
452 array_keys(self::LEGACY_TAGS),
453 function (array
$c,
string $k): array {
454 $c[$k] = $this->
lng->txt(self::LEGACY_TAGS[$k]);
Builds a Color from either hex- or rgb values.
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is:
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface for template engine functionality used in Mail and related components.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists('../ilias.ini.php'))