19declare(strict_types=1);
57 private UIFactory $ui_factory,
58 private UIRenderer $ui_renderer,
66 return $this->test_question_set_config;
71 return $this->test_obj;
76 return $this->test_player_gui;
81 return $this->test_session;
104 $this->infoMessages[] = $infoMessage;
114 $this->failureMessages[] = $failureMessage;
119 bool $a_multipart =
false,
120 string $a_target =
""
122 if ($this->global_toolbar instanceof parent) {
123 $this->global_toolbar->setFormAction($a_val, $a_multipart, $a_target);
125 parent::setFormAction($a_val, $a_multipart, $a_target);
131 if ($this->global_toolbar instanceof parent) {
132 $this->global_toolbar->setCloseFormTag($a_val);
134 parent::setCloseFormTag($a_val);
140 bool $a_output_label =
false
142 if ($this->global_toolbar instanceof parent) {
143 $this->global_toolbar->addInputItem($a_item, $a_output_label);
145 parent::addInputItem($a_item, $a_output_label);
151 if ($this->global_toolbar instanceof parent) {
152 $this->global_toolbar->addFormInput($formInput);
158 if ($this->global_toolbar instanceof parent) {
159 $this->global_toolbar->setItems([]);
167 if (is_object($target)) {
168 $target = get_class($target);
176 if (is_array($target)) {
180 return [$this->getClassName($target)];
185 return array_merge(self::$TARGET_CLASS_PATH_BASE, $this->getClassNameArray($target));
190 $this->
ctrl->setParameterByClass($this->getClassName($target), $parameter, $value);
195 return $this->
ctrl->getLinkTargetByClass($this->getClassPath($target), $cmd);
200 return $this->
ctrl->getFormActionByClass($this->getClassPath($target));
205 if ($this->getSessionLockString() ===
'') {
206 $this->setSessionLockString($this->buildSessionLockString());
212 return md5(
$_COOKIE[session_name()] . time());
217 if (!$this->test_obj->isFixedTest()) {
222 $assignmentList->setParentObjId($this->test_obj->getId());
223 $assignmentList->loadFromDb();
225 return $assignmentList->hasSkillsAssignedLowerThanBarrier();
231 $this->
lng->txt(
'tst_skill_triggerings_num_req_answers_not_reached_warn'),
232 $this->getTestOBJ()->getGlobalSettings()->getSkillTriggeringNumberOfAnswers()
238 $this->ensureInitialisedSessionLockString();
240 $this->setParameter($this->getTestPlayerGUI(),
'lock', $this->getSessionLockString());
241 $this->setParameter($this->getTestPlayerGUI(),
'sequence', $this->getTestSession()->getLastSequence());
242 $this->setParameter(
'ilObjTestGUI',
'ref_id', $this->getTestOBJ()->getRefId());
243 $this->setFormAction($this->buildFormAction($this->getTestPlayerGUI()));
245 if ($this->getTestOBJ()->getOfflineStatus()) {
250 if ($this->
access->checkAccess(
"write",
"", $this->getTestOBJ()->getRefId())) {
251 $links[] = $this->ui_factory->link()->standard(
252 $this->
lng->txt(
'test_edit_settings'),
253 $this->buildLinkTarget(SettingsMainGUI::class)
257 $msgBox = $this->ui_factory->messageBox()->info(
$message)->withLinks($links);
259 $this->populateMessage($this->ui_renderer->render($msgBox));
262 if ($this->
access->checkAccess(
"write",
"", $this->getTestOBJ()->getRefId())) {
266 if ($qsaImportFails->failedImportsRegistered() || $sltImportFails->failedImportsRegistered()) {
267 $importFailsMsg = [];
269 if ($qsaImportFails->failedImportsRegistered()) {
270 $importFailsMsg[] = $qsaImportFails->getFailedImportsMessage($this->
lng);
273 if ($sltImportFails->failedImportsRegistered()) {
274 $importFailsMsg[] = $sltImportFails->getFailedImportsMessage($this->
lng);
277 $message = implode(
'<br />', $importFailsMsg);
279 $button = $this->ui_factory->button()->standard(
280 $this->
lng->txt(
'ass_skl_import_fails_remove_btn'),
281 $this->ctrl->getLinkTargetByClass(
'ilObjTestGUI',
'removeImportFails')
284 $msgBox = $this->ui_factory->messageBox()->failure(
$message)->withButtons([$button]);
286 $this->populateMessage($this->ui_renderer->render($msgBox));
287 } elseif ($this->getTestOBJ()->isSkillServiceToBeConsidered()) {
288 if ($this->hasFixedQuestionSetSkillAssignsLowerThanBarrier()) {
289 $this->addInfoMessage($this->getSkillAssignBarrierInfo());
297 $this->main_tpl->setCurrentBlock(
'mess');
298 $this->main_tpl->setVariable(
'MESSAGE',
$message);
299 $this->main_tpl->parseCurrentBlock();
304 $info_messages = $this->getInfoMessages();
305 if ($info_messages !== []) {
306 $this->main_tpl->setOnScreenMessage(
'info', array_pop($info_messages));
309 $failure_messages = $this->getFailureMessages();
310 if ($failure_messages !== []) {
311 $this->main_tpl->setOnScreenMessage(
'failure', array_pop($failure_messages));
Builds a Color from either hex- or rgb values.
@ilCtrl_Calls ILIAS\Test\Settings\MainSettings\SettingsMainGUI: ilPropertyFormGUI @ilCtrl_Calls ILIAS...
An entity that renders components to a string output.
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists('../ilias.ini.php'))