4 require_once
'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
5 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
6 require_once
'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
7 require_once
'Services/Form/classes/class.ilFormPropertyGUI.php';
8 require_once
'Services/Form/classes/class.ilHiddenInputGUI.php';
224 $this->infoMessages[] = $infoMessage;
240 $this->failureMessages[] = $failureMessage;
245 if($this->globalToolbar instanceof
parent)
247 $this->globalToolbar->setFormAction($formAction, $isMultipart,
$target);
251 parent::setFormAction($formAction, $isMultipart,
$target);
257 if($this->globalToolbar instanceof
parent)
259 $this->globalToolbar->addButtonInstance($btnInstance);
263 parent::addButtonInstance($btnInstance);
269 if($this->globalToolbar instanceof
parent)
271 $this->globalToolbar->setCloseFormTag($enabled);
275 parent::setCloseFormTag($enabled);
281 if($this->globalToolbar instanceof
parent)
283 $this->globalToolbar->addInputItem($inputItem, $outputLabel);
287 parent::addInputItem($inputItem, $outputLabel);
293 if($this->globalToolbar instanceof
parent)
295 $this->globalToolbar->addFormInput($formInput);
299 parent::addFormInput($formInput);
305 if($this->globalToolbar instanceof
parent)
307 $this->globalToolbar->setItems(
array());
385 if( !$this->
getTestOBJ()->isPassDeletionAllowed() )
404 require_once
'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
406 $this->ctrl->setParameterByClass(
414 $btn->setCaption(
'tst_delete_dyn_test_results_btn');
415 $btn->setUrl($this->
buildLinkTarget(
'iltestevaluationgui',
'confirmDeletePass'));
416 $btn->setPrimary(
false);
423 if( !$this->
getTestOBJ()->isSkillServiceEnabled() )
431 $questionContainerId = $questionSetConfig->getSourceQuestionPoolId();
435 $questionContainerId = $this->
getTestOBJ()->getId();
438 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
439 require_once
'Modules/Test/classes/class.ilTestSkillLevelThreshold.php';
442 $assignmentList->setParentObjId($questionContainerId);
443 $assignmentList->loadFromDb();
445 foreach($assignmentList->getUniqueAssignedSkills() as
$data)
447 foreach(
$data[
'skill']->getLevelData() as $level)
450 $treshold->setTestId($this->
getTestOBJ()->getTestId());
451 $treshold->setSkillBaseId(
$data[
'skill_base_id']);
452 $treshold->setSkillTrefId(
$data[
'skill_tref_id']);
453 $treshold->setSkillLevelId($level[
'id']);
455 if( !$treshold->dbRecordExists() )
467 require_once
'Modules/Test/classes/class.ilTestSkillLevelThresholdsGUI.php';
470 array(
'ilTestSkillAdministrationGUI',
'ilTestSkillLevelThresholdsGUI'),
474 $msg = $this->lng->txt(
'tst_skl_level_thresholds_missing');
475 $msg .=
'<br /><a href="'.$link.
'">'.$this->lng->txt(
'tst_skl_level_thresholds_link').
'</a>';
482 if( !$this->testOBJ->isFixedTest() )
487 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
489 $assignmentList->setParentObjId($this->testOBJ->getId());
490 $assignmentList->loadFromDb();
492 return $assignmentList->hasSkillsAssignedLowerThanBarrier();
497 require_once
'Modules/Test/classes/class.ilObjAssessmentFolder.php';
499 return sprintf( $this->lng->txt(
'tst_skill_triggerings_num_req_answers_not_reached_warn'),
514 $online_access =
false;
515 if ($this->
getTestOBJ()->getFixedParticipants())
517 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
519 if ($online_access_result ===
true)
521 $online_access =
true;
531 if ((!$this->
getTestOBJ()->getFixedParticipants() || $online_access) && $this->access->checkAccess(
"read",
"", $this->getTestOBJ()->getRefId()))
533 $executable = $this->
getTestOBJ()->isExecutable(
537 if ($executable[
"executable"])
541 $this->
addInfoMessage($this->lng->txt(
'tst_test_contains_obligatory_questions'));
547 require_once
'Modules/Test/classes/class.ilTestPassesSelector.php';
549 $testPassesSelector->setActiveId($this->
getTestSession()->getActiveId());
550 $testPassesSelector->setLastFinishedPass($this->
getTestSession()->getLastFinishedPass());
552 $closedPasses = $testPassesSelector->getClosedPasses();
553 $existingPasses = $testPassesSelector->getExistingPasses();
555 if ($existingPasses > $closedPasses)
558 $btn->setCaption(
'tst_resume_test');
559 $btn->setCommand(
'resumePlayer');
560 $btn->setPrimary(
true);
567 $btn->setCommand(
'startPlayer');
568 $btn->setPrimary(
true);
577 $btn->setCommand(
'startPlayer');
578 $btn->setPrimary(
true);
590 require_once
'Modules/Test/classes/class.ilTestPassesSelector.php';
592 $testPassesSelector->setActiveId($this->
getTestSession()->getActiveId());
593 $testPassesSelector->setLastFinishedPass($this->
getTestSession()->getLastFinishedPass());
598 $btn->setCaption(
'tst_show_results');
599 $btn->setUrl($this->
buildLinkTarget(
'ilTestEvaluationGUI',
'outUserResultsOverview'));
600 $btn->setPrimary(
false);
603 if ($this->
getTestOBJ()->getHighscoreEnabled())
607 $btn->setCaption(
'tst_show_toplist');
608 $btn->setUrl($this->
buildLinkTarget(
'ilTestToplistGUI',
'outResultsToplist'));
609 $btn->setPrimary(
false);
613 if( $this->
getTestOBJ()->isSkillServiceToBeConsidered() )
615 require_once
'Modules/Test/classes/class.ilTestSkillEvaluationGUI.php';
618 $btn->setCaption(
'tst_show_comp_results');
620 $btn->setPrimary(
false);
632 $btn->setCaption(
'tst_list_of_answers_show');
633 $btn->setUrl($this->
buildLinkTarget(
'ilTestEvaluationGUI',
'outUserListOfAnswerPasses'));
634 $btn->setPrimary(
false);
644 if(
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID)
651 require_once
'Services/Form/classes/class.ilTextInputGUI.php';
652 $anonymous_id =
new ilTextInputGUI($this->lng->txt(
'enter_anonymous_code'),
'anonymous_id');
655 $this->
addFormButton($this->lng->txt(
'submit'),
'setAnonymousId');
660 $message = $this->lng->txt(
"test_is_offline");
662 if($this->access->checkAccess(
"write",
"", $this->getTestOBJ()->getRefId()))
664 $message .=
"<br /><a href=\"".$this->buildLinkTarget(
'ilobjtestsettingsgeneralgui').
"\">".
665 $this->lng->txt(
"test_edit_settings").
"</a>";
671 if($this->access->checkAccess(
"write",
"", $this->getTestOBJ()->getRefId()))
673 require_once
'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
675 require_once
'Modules/Test/classes/class.ilTestSkillLevelThresholdImportFails.php';
678 if( $qsaImportFails->failedImportsRegistered() || $sltImportFails->failedImportsRegistered() )
680 $importFailsMsg =
array();
682 if( $qsaImportFails->failedImportsRegistered() )
684 $importFailsMsg[] = $qsaImportFails->getFailedImportsMessage($this->lng);
687 if( $sltImportFails->failedImportsRegistered() )
689 $importFailsMsg[] = $sltImportFails->getFailedImportsMessage($this->lng);
693 $button->setUrl($this->ctrl->getLinkTargetByClass(
'ilObjTestGUI',
'removeImportFails'));
694 $button->setCaption(
'ass_skl_import_fails_remove_btn');
695 $importFailsMsg[] = $button->render();
699 elseif( $this->
getTestOBJ()->isSkillServiceToBeConsidered() )
This class provides processing control methods.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Administration class for plugins.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _lookupOnlineTestAccess($a_test_id, $a_user_id)
Checks if a user is allowd to run an online exam.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
const CMD_SHOW_SKILL_THRESHOLDS
Create styles array
The data for the language used.
static getSkillTriggerAnswerNumberBarrier()
const CONTEXT_INFO_SCREEN
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.