19declare(strict_types=1);
206 'tst_finish_notification_simple',
207 'tst_finish_notification_advanced',
208 'test_question_set_type_fixed',
209 'tst_title_output_full',
210 'tst_title_output_hide_points',
211 'tst_title_output_no_title',
212 'tst_title_output_only_points',
213 'tst_instant_feedback_trigger_forced',
214 'tst_instant_feedback_trigger_manual',
215 'tst_answer_fixation_none',
216 'tst_answer_fixation_on_instantfb_or_followupqst',
217 'tst_answer_fixation_on_instant_feedback',
218 'tst_answer_fixation_on_followup_question',
219 'tst_highscore_own_table',
220 'tst_highscore_top_table',
221 'tst_highscore_all_tables',
222 'tst_results_access_setting',
223 'tst_results_access_finished',
224 'tst_results_access_always',
225 'tst_results_access_setting',
226 'tst_results_access_passed',
227 'tst_count_partial_solutions',
228 'tst_count_correct_solutions',
229 'tst_score_cut_question',
230 'tst_score_cut_test',
231 'tst_pass_last_pass',
232 'tst_pass_best_pass',
233 'tst_inp_quest_amount_cfg_mode_pool',
234 'tst_imap_qst_mode_mc',
235 'tst_imap_qst_mode_sc',
236 'option_label_right_wrong',
237 'option_label_plus_minus',
238 'option_label_applicable_or_not',
239 'option_label_adequate_or_not',
240 'option_label_custom',
241 'qpl_qst_inp_matching_mode_one_on_one',
242 'qpl_qst_inp_matching_mode_all_on_all',
243 'essay_scoring_mode_without_keywords',
244 'essay_scoring_mode_keyword_relation_any',
245 'essay_scoring_mode_keyword_relation_all',
246 'essay_scoring_mode_keyword_relation_one',
247 'qst_nested_nested_answers_off',
248 'qst_nested_nested_answers_on',
249 'oq_btn_use_order_pictures',
250 'oq_btn_use_order_terms',
262 private readonly \Mustache_Engine $mustache,
264 private readonly UIFactory $ui_factory,
268 $lng->loadLanguageModule(
'assessment');
269 $lng->loadLanguageModule(
'crs');
274 array $additional_info,
276 ): DescriptiveListing {
288 array_keys($additional_info)
291 fn(string $k): string => $this->
parseValue($k, $additional_info[$k], $environment),
292 array_keys($additional_info)
299 array $additional_info,
305 fn(string $k) =>
"{$this->getCorrectedTranslationForKey($k)}: {$this->parseValue($k, $additional_info[$k] ?? '', $environment)}",
306 array_keys($additional_info)
313 return $bool ? self::TAG_TRUE : self::TAG_FALSE;
318 return $bool ? self::TAG_ENABLED : self::TAG_DISABLED;
323 return $bool ? self::TAG_CHECKED : self::TAG_UNCHECKED;
328 return self::TAG_NONE;
333 return "{{ {$lang_var} }}";
339 if (array_key_exists($key, self::LEGACY_TAGS)) {
340 $lang_var = self::LEGACY_TAGS[$key];
343 return $this->
lng->exists($lang_var) ? $this->
lng->txt($lang_var) : $key;
348 string|
int|
float|array $value,
353 return \ilUserUtil::getNamePresentation(
360 case self::KEY_USERS:
361 return $this->buildListOfUsers($value);
362 case self::KEY_QUESTION_TYPE:
363 return $this->
lng->txt($value);
364 case self::KEY_QUESTIONS:
368 fn(
int $usr):
string => $this->questions_repo
369 ->getForQuestionId($usr)?->
getTitle() ?? $this->
lng->txt(
'deleted'),
373 case self::KEY_QUESTION_ID:
374 if (is_int($value)) {
375 return $this->
refinery->encode()->htmlSpecialCharsAsEntities()->transform(
376 $this->questions_repo->getForQuestionId($value)?->getTitle() ?? $this->lng->txt(
'deleted')
381 return $this->buildDefaultValueString($value, $environment);
403 string|
int|
float|array $value,
407 || is_float($value)) {
408 return (
string) $value;
410 if (is_array($value)) {
411 return $this->buildValueStringFromArray($value, $environment);
414 return $this->
lng->txt(
'none');
416 if (strpos($value,
'+0000') !==
false
417 && ($date = \DateTimeImmutable::createFromFormat(self::DATE_STORAGE_FORMAT, $value)) !==
false) {
419 ->setTimezone($environment[
'timezone'])
420 ->format($environment[
'date_format']);
422 return $this->mustache->render(
423 $this->
refinery->string()->stripTags()->transform($value),
432 function (
$c, $k) use ($value, $environment):
string {
435 $label = $this->getCorrectedTranslationForKey($k);
440 return "{$c}{$label}: {$this->parseValue($k, $value[$k], $environment)}";
448 return array_combine(
451 fn(
string $v):
string => $this->
lng->txt($v),
455 array_keys(self::LEGACY_TAGS),
456 function (array
$c,
string $k): array {
457 $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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists('../ilias.ini.php'))