19 declare(strict_types=1);
212 'tst_finish_notification_simple',
213 'tst_finish_notification_advanced',
214 'test_question_set_type_fixed',
215 'tst_title_output_full',
216 'tst_title_output_hide_points',
217 'tst_title_output_no_title',
218 'tst_title_output_only_points',
219 'tst_instant_feedback_trigger_forced',
220 'tst_instant_feedback_trigger_manual',
221 'tst_answer_fixation_none',
222 'tst_answer_fixation_on_instantfb_or_followupqst',
223 'tst_answer_fixation_on_instant_feedback',
224 'tst_answer_fixation_on_followup_question',
225 'tst_highscore_own_table',
226 'tst_highscore_top_table',
227 'tst_highscore_all_tables',
228 'tst_results_access_setting',
229 'tst_results_access_finished',
230 'tst_results_access_always',
231 'tst_results_access_setting',
232 'tst_results_access_passed',
233 'tst_count_partial_solutions',
234 'tst_count_correct_solutions',
235 'tst_score_cut_question',
236 'tst_score_cut_test',
237 'tst_pass_last_pass',
238 'tst_pass_best_pass',
239 'tst_inp_quest_amount_cfg_mode_pool',
240 'tst_imap_qst_mode_mc',
241 'tst_imap_qst_mode_sc',
242 'option_label_right_wrong',
243 'option_label_plus_minus',
244 'option_label_applicable_or_not',
245 'option_label_adequate_or_not',
246 'option_label_custom',
247 'qpl_qst_inp_matching_mode_one_on_one',
248 'qpl_qst_inp_matching_mode_all_on_all',
249 'essay_scoring_mode_without_keywords',
250 'essay_scoring_mode_keyword_relation_any',
251 'essay_scoring_mode_keyword_relation_all',
252 'essay_scoring_mode_keyword_relation_one',
253 'qst_nested_nested_answers_off',
254 'qst_nested_nested_answers_on',
255 'oq_btn_use_order_pictures',
256 'oq_btn_use_order_terms',
268 private readonly \Mustache_Engine $mustache,
274 $lng->loadLanguageModule(
'assessment');
275 $lng->loadLanguageModule(
'crs');
280 array $additional_info,
290 return $this->ui_factory->listing()->descriptive(
294 array_keys($additional_info)
297 fn(
string $k):
string => $this->
parseValue($k, $additional_info[$k], $environment),
298 array_keys($additional_info)
305 array $additional_info,
311 fn(
string $k) =>
"{$this->getCorrectedTranslationForKey($k)}: {$this->parseValue($k, $additional_info[$k] ?? '', $environment)}",
312 array_keys($additional_info)
319 return $bool ? self::TAG_TRUE : self::TAG_FALSE;
324 return $bool ? self::TAG_ENABLED : self::TAG_DISABLED;
329 return $bool ? self::TAG_CHECKED : self::TAG_UNCHECKED;
334 return self::TAG_NONE;
339 return "{{ {$lang_var} }}";
345 if (array_key_exists($key, self::LEGACY_TAGS)) {
346 $lang_var = self::LEGACY_TAGS[$key];
349 return $this->
lng->exists($lang_var) ? $this->
lng->txt($lang_var) : $key;
354 string|
int|
float|array $value,
359 return \ilUserUtil::getNamePresentation(
366 case self::KEY_USERS:
368 case self::KEY_QUESTION_TYPE:
369 return $this->
lng->txt($value);
370 case self::KEY_QUESTIONS:
374 fn(
int $usr):
string => $this->questions_repo
375 ->getForQuestionId($usr)?->
getTitle() ?? $this->
lng->txt(
'deleted'),
379 case self::KEY_QUESTION_ID:
380 if (is_int($value)) {
381 return $this->
refinery->encode()->htmlSpecialCharsAsEntities()->transform(
382 $this->questions_repo->getForQuestionId($value)?->getTitle() ?? $this->
lng->txt(
'deleted')
409 string|
int|
float|array $value,
413 || is_float($value)) {
414 return (
string) $value;
416 if (is_array($value)) {
420 return $this->
lng->txt(
'none');
422 if (strpos($value,
'+0000') !==
false 423 && ($date = \DateTimeImmutable::createFromFormat(self::DATE_STORAGE_FORMAT, $value)) !==
false) {
425 ->setTimezone($environment[
'timezone'])
426 ->format($environment[
'date_format']);
428 return $this->mustache->render(
429 $this->
refinery->string()->stripTags()->transform($value),
438 function (
$c, $k) use ($value, $environment):
string {
446 return "{$c}{$label}: {$this->parseValue($k, $value[$k], $environment)}";
454 return array_combine(
457 fn(
string $v):
string => $this->
lng->txt($v),
461 array_keys(self::LEGACY_TAGS),
462 function (array
$c,
string $k): array {
463 $c[$k] = $this->
lng->txt(self::LEGACY_TAGS[$k]);
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='ilpublicuserprofilegui')
Default behaviour is:
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...