19declare(strict_types=1);
204 'test_question_set_type_fixed',
205 'tst_title_output_full',
206 'tst_title_output_hide_points',
207 'tst_title_output_no_title',
208 'tst_title_output_only_points',
209 'tst_instant_feedback_trigger_forced',
210 'tst_instant_feedback_trigger_manual',
211 'tst_answer_fixation_none',
212 'tst_answer_fixation_on_instantfb_or_followupqst',
213 'tst_answer_fixation_on_instant_feedback',
214 'tst_answer_fixation_on_followup_question',
215 'tst_highscore_own_table',
216 'tst_highscore_top_table',
217 'tst_highscore_all_tables',
218 'tst_results_access_setting',
219 'tst_results_access_finished',
220 'tst_results_access_always',
221 'tst_results_access_setting',
222 'tst_results_access_passed',
223 'tst_count_partial_solutions',
224 'tst_count_correct_solutions',
225 'tst_score_cut_question',
226 'tst_score_cut_test',
227 'tst_pass_last_pass',
228 'tst_pass_best_pass',
229 'tst_inp_quest_amount_cfg_mode_pool',
230 'tst_imap_qst_mode_mc',
231 'tst_imap_qst_mode_sc',
232 'option_label_right_wrong',
233 'option_label_plus_minus',
234 'option_label_applicable_or_not',
235 'option_label_adequate_or_not',
236 'option_label_custom',
237 'qpl_qst_inp_matching_mode_one_on_one',
238 'qpl_qst_inp_matching_mode_all_on_all',
239 'essay_scoring_mode_without_keywords',
240 'essay_scoring_mode_keyword_relation_any',
241 'essay_scoring_mode_keyword_relation_all',
242 'essay_scoring_mode_keyword_relation_one',
243 'qst_nested_nested_answers_off',
244 'qst_nested_nested_answers_on',
245 'oq_btn_use_order_pictures',
246 'oq_btn_use_order_terms',
258 private readonly \Mustache_Engine $mustache,
260 private readonly UIFactory $ui_factory,
264 $lng->loadLanguageModule(
'assessment');
265 $lng->loadLanguageModule(
'crs');
270 array $additional_info,
272 ): DescriptiveListing {
284 array_keys($additional_info)
287 fn(string $k): string => $this->
parseValue($k, $additional_info[$k], $environment),
288 array_keys($additional_info)
295 array $additional_info,
301 fn(string $k) =>
"{$this->getCorrectedTranslationForKey($k)}: {$this->parseValue($k, $additional_info[$k] ?? '', $environment)}",
302 array_keys($additional_info)
309 return $bool ? self::TAG_TRUE : self::TAG_FALSE;
314 return $bool ? self::TAG_ENABLED : self::TAG_DISABLED;
319 return $bool ? self::TAG_CHECKED : self::TAG_UNCHECKED;
324 return self::TAG_NONE;
329 return "{{ {$lang_var} }}";
335 if (array_key_exists($key, self::LEGACY_TAGS)) {
336 $lang_var = self::LEGACY_TAGS[$key];
339 return $this->
lng->exists($lang_var) ? $this->
lng->txt($lang_var) : $key;
344 string|
int|
float|array $value,
349 return \ilUserUtil::getNamePresentation(
356 case self::KEY_USERS:
357 return $this->buildListOfUsers($value);
358 case self::KEY_QUESTION_TYPE:
359 return $this->
lng->txt($value);
360 case self::KEY_QUESTIONS:
364 fn(
int $usr):
string => $this->questions_repo
365 ->getForQuestionId($usr)?->
getTitle() ?? $this->
lng->txt(
'deleted'),
369 case self::KEY_QUESTION_ID:
370 if (is_int($value)) {
371 return $this->
refinery->encode()->htmlSpecialCharsAsEntities()->transform(
372 $this->questions_repo->getForQuestionId($value)?->getTitle() ?? $this->lng->txt(
'deleted')
377 return $this->buildDefaultValueString($value, $environment);
399 string|
int|
float|array $value,
403 || is_float($value)) {
404 return (
string) $value;
406 if (is_array($value)) {
407 return $this->buildValueStringFromArray($value, $environment);
410 return $this->
lng->txt(
'none');
412 if (strpos($value,
'+0000') !==
false
413 && ($date = \DateTimeImmutable::createFromFormat(self::DATE_STORAGE_FORMAT, $value)) !==
false) {
415 ->setTimezone($environment[
'timezone'])
416 ->format($environment[
'date_format']);
418 return $this->mustache->render(
419 $this->
refinery->string()->stripTags()->transform($value),
428 function (
$c, $k) use ($value, $environment):
string {
431 $label = $this->getCorrectedTranslationForKey($k);
436 return "{$c}{$label}: {$this->parseValue($k, $value[$k], $environment)}";
444 return array_combine(
447 fn(
string $v):
string => $this->
lng->txt($v),
451 array_keys(self::LEGACY_TAGS),
452 function (array
$c,
string $k): array {
453 $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'))