4require_once 
'./Modules/Test/exceptions/class.ilTestException.php';
 
    5require_once 
'./Services/Object/classes/class.ilObjectGUI.php';
 
    6require_once 
'./Modules/Test/classes/inc.AssessmentConstants.php';
 
    7require_once 
'./Modules/Test/classes/class.ilObjAssessmentFolderGUI.php';
 
    8require_once 
'./Modules/Test/classes/class.ilObjAssessmentFolder.php';
 
    9require_once 
'./Modules/Test/classes/class.ilTestExpressPage.php';
 
   10require_once 
'Modules/OrgUnit/classes/Positions/Operation/class.ilOrgUnitOperation.php';
 
   11require_once 
'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
 
   55        'ilpublicuserprofilegui', 
'ilobjportfoliogui' 
  102        $ilPluginAdmin = 
$DIC[
'ilPluginAdmin'];
 
  104        $lng->loadLanguageModule(
"assessment");
 
  106        $this->
error = $DIC[
'ilErr'];
 
  108        $this->ctrl->saveParameter($this, array(
"ref_id", 
"test_ref_id", 
"calling_test", 
"test_express_mode", 
"q_id"));
 
  109        if (isset(
$_GET[
'ref_id']) && is_numeric(
$_GET[
'ref_id'])) {
 
  114        if ($this->
object instanceof 
ilObjTest) {
 
  115            require_once 
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
 
  118            require_once 
'Modules/Test/classes/class.ilTestPlayerFactory.php';
 
  121            require_once 
'Modules/Test/classes/class.ilTestSessionFactory.php';
 
  124            require_once 
'Modules/Test/classes/class.ilTestSequenceFactory.php';
 
  127            require_once 
'Modules/Test/classes/class.ilTestAccess.php';
 
  131        require_once 
'Modules/Test/classes/class.ilTestObjectiveOrientedContainer.php';
 
  134        if ($this->
object instanceof 
ilObjTest) {
 
  135            require_once 
'Modules/Test/classes/class.ilTestTabsManager.php';
 
  138            $tabsManager->setTestSession($this->testSessionFactory->getSession());
 
  139            $tabsManager->setTestQuestionSetConfig($this->testQuestionSetConfigFactory->getQuestionSetConfig());
 
  151        $ilAccess = 
$DIC[
'ilAccess'];
 
  152        $ilNavigationHistory = 
$DIC[
'ilNavigationHistory'];
 
  157        $ilTabs = 
$DIC[
'ilTabs'];
 
  158        $ilPluginAdmin = 
$DIC[
'ilPluginAdmin'];
 
  161        $ilias = 
$DIC[
'ilias'];
 
  164        $cmd = $this->ctrl->getCmd(
"infoScreen");
 
  166        $cmdsDisabledDueToOfflineStatus = array(
 
  167            'resumePlayer', 
'resumePlayer', 
'outUserResultsOverview', 
'outUserListOfAnswerPasses' 
  170        if (!$this->
getCreationMode() && $this->object->getOfflineStatus() && in_array($cmd, $cmdsDisabledDueToOfflineStatus)) {
 
  174        $next_class = $this->ctrl->getNextClass($this);
 
  175        $this->ctrl->setReturn($this, 
"infoScreen");
 
  177        if (method_exists($this->
object, 
"getTestStyleLocation")) {
 
  178            $this->tpl->addCss($this->object->getTestStyleLocation(
"output"), 
"screen");
 
  183            $ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"])
 
  185            $ilNavigationHistory->addItem(
 
  187                "ilias.php?baseClass=ilObjTestGUI&cmd=infoScreen&ref_id=" . 
$_GET[
"ref_id"],
 
  193        if ($_REQUEST[
'prev_qid']) {
 
  194            global $___prev_question_id;
 
  195            $___prev_question_id = $_REQUEST[
'prev_qid'];
 
  196            $this->ctrl->setParameter($this, 
'prev_qid', $_REQUEST[
'prev_qid']);
 
  199        if (!$this->
getCreationMode() && $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken()) {
 
  200            if (!$this->testQuestionSetConfigFactory->getQuestionSetConfig()->isValidRequestOnBrokenQuestionSetDepencies($next_class, $cmd)) {
 
  201                $this->ctrl->redirectByClass(
'ilObjTestGUI', 
'infoScreen');
 
  207        switch ($next_class) {
 
  208            case 'illtiproviderobjectsettinggui':
 
  209                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  210                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  214                $this->tabsManager->getSettingsSubTabs();
 
  215                $GLOBALS[
'DIC']->tabs()->activateTab(
'settings');
 
  216                $GLOBALS[
'DIC']->tabs()->activateSubTab(
'lti_provider');
 
  218                $lti_gui->setCustomRolesForSelection(
$GLOBALS[
'DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
 
  219                $lti_gui->offerLTIRolesForSelection(
false);
 
  220                $this->ctrl->forwardCommand($lti_gui);
 
  224            case 'iltestexportgui':
 
  225                if (!$ilAccess->checkAccess(
'write', 
'', $this->ref_id)) {
 
  226                    $ilErr->raiseError($this->lng->txt(
'permission_denied'), 
$ilErr->WARNING);
 
  232                require_once 
'Modules/Test/classes/class.ilTestExportGUI.php';
 
  236            case "ilinfoscreengui":
 
  237                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]) && !$ilAccess->checkAccess(
"visible", 
"", 
$_GET[
"ref_id"])) {
 
  238                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  244            case 'ilobjectmetadatagui':
 
  245                if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  246                    $ilErr->raiseError($this->lng->txt(
'permission_denied'), 
$ilErr->WARNING);
 
  252                include_once 
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
 
  254                $this->ctrl->forwardCommand($md_gui);
 
  257            case 'iltestdashboardgui':
 
  258                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  259                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  264                require_once 
'Modules/Test/classes/class.ilTestDashboardGUI.php';
 
  268                    $this->testQuestionSetConfigFactory->getQuestionSetConfig()
 
  275                $this->ctrl->forwardCommand($gui);
 
  278            case 'iltestresultsgui':
 
  279                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  280                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  285                require_once 
'Modules/Test/classes/class.ilTestResultsGUI.php';
 
  289                    $this->testQuestionSetConfigFactory->getQuestionSetConfig()
 
  293                $gui->setTestSession($this->testSessionFactory->getSession());
 
  297                $this->ctrl->forwardCommand($gui);
 
  300            case "iltestplayerfixedquestionsetgui":
 
  301                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  302                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  305                require_once 
"./Modules/Test/classes/class.ilTestPlayerFixedQuestionSetGUI.php";
 
  306                if (!$this->object->getKioskMode()) {
 
  311                $this->ctrl->forwardCommand($gui);
 
  314            case "iltestplayerrandomquestionsetgui":
 
  315                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  316                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  319                require_once 
"./Modules/Test/classes/class.ilTestPlayerRandomQuestionSetGUI.php";
 
  320                if (!$this->object->getKioskMode()) {
 
  325                $this->ctrl->forwardCommand($gui);
 
  328            case "iltestplayerdynamicquestionsetgui":
 
  329                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  330                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  333                require_once 
"./Modules/Test/classes/class.ilTestPlayerDynamicQuestionSetGUI.php";
 
  334                if (!$this->object->getKioskMode()) {
 
  339                $this->ctrl->forwardCommand($gui);
 
  342            case "iltestevaluationgui":
 
  343                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  344                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  349            case "iltestevalobjectiveorientedgui":
 
  350                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  351                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  353                $this->forwardToEvalObjectiveOrientedGUI();
 
  356            case "iltestservicegui":
 
  357                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  358                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  362                require_once 
"./Modules/Test/classes/class.ilTestServiceGUI.php";
 
  364                $this->ctrl->forwardCommand($serviceGUI);
 
  367            case 'ilpermissiongui':
 
  368                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  369                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  374                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  376                $ret = $this->ctrl->forwardCommand($perm_gui);
 
  379            case "illearningprogressgui":
 
  380                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  381                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  386                require_once 
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
 
  388                $this->ctrl->forwardCommand($new_gui);
 
  392            case "ilcertificategui":
 
  393                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  394                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  402                $output_gui = $guiFactory->create($this->
object);
 
  404                $this->ctrl->forwardCommand($output_gui);
 
  407            case "iltestscoringgui":
 
  408                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  409                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  413                require_once 
"./Modules/Test/classes/class.ilTestScoringGUI.php";
 
  416                $this->ctrl->forwardCommand($output_gui);
 
  419            case 'ilmarkschemagui':
 
  420                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  421                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  423                if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  425                    $this->ctrl->redirect($this, 
'infoScreen');
 
  429                require_once 
'Modules/Test/classes/class.ilMarkSchemaGUI.php';
 
  431                $this->ctrl->forwardCommand($mark_schema_gui);
 
  434            case 'iltestscoringbyquestionsgui':
 
  435                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  436                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  440                include_once 
'Modules/Test/classes/class.ilTestScoringByQuestionsGUI.php';
 
  443                $this->ctrl->forwardCommand($output_gui);
 
  446            case 'ilobjtestsettingsgeneralgui':
 
  447                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  448                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  452                require_once 
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
 
  463                $this->ctrl->forwardCommand($gui);
 
  466            case 'ilobjtestsettingsscoringresultsgui':
 
  467                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  468                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  472                require_once 
'Modules/Test/classes/class.ilObjTestSettingsScoringResultsGUI.php';
 
  482                $this->ctrl->forwardCommand($gui);
 
  485            case 'ilobjtestfixedquestionsetconfiggui':
 
  486                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  487                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  491                require_once 
'Modules/Test/classes/class.ilTestFixedQuestionSetConfigGUI.php';
 
  493                $this->ctrl->forwardCommand($gui);
 
  496            case 'iltestrandomquestionsetconfiggui':
 
  497                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  498                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  502                require_once 
'Modules/Test/classes/class.ilTestRandomQuestionSetConfigGUI.php';
 
  516                    ))->withContextId($this->object->getId())
 
  518                $this->ctrl->forwardCommand($gui);
 
  521            case 'ilobjtestdynamicquestionsetconfiggui':
 
  522                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  523                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  527                require_once 
'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfigGUI.php';
 
  529                $this->ctrl->forwardCommand($gui);
 
  532            case 'iltestquestionbrowsertablegui':
 
  533                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  534                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  538                require_once 
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
 
  540                $gui->setWriteAccess($ilAccess->checkAccess(
"write", 
"", $this->ref_id));
 
  542                $this->ctrl->forwardCommand($gui);
 
  545            case 'iltestskilladministrationgui':
 
  546                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  547                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  551                require_once 
'Modules/Test/classes/class.ilTestSkillAdministrationGUI.php';
 
  552                $gui = 
new ilTestSkillAdministrationGUI($ilias, $this->ctrl, $ilAccess, $ilTabs, $this->tpl, $this->lng, 
$ilDB, 
$tree, $ilPluginAdmin, $this->
object, $this->ref_id);
 
  553                $this->ctrl->forwardCommand($gui);
 
  556            case 'ilobjectcopygui':
 
  557                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  558                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  562                require_once 
'./Services/Object/classes/class.ilObjectCopyGUI.php';
 
  565                $this->ctrl->forwardCommand($cp);
 
  568            case 'ilpageeditorgui':
 
  569            case 'iltestexpresspageobjectgui':
 
  570            if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  571                $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  576                require_once 
'Modules/TestQuestionPool/classes/class.ilAssIncompleteQuestionPurger.php';
 
  578                $incompleteQuestionPurger->setOwnerId(
$ilUser->getId());
 
  579                $incompleteQuestionPurger->purge();
 
  588                if (!in_array($cmd, array(
'addQuestion', 
'browseForQuestions'))) {
 
  592                if (!$qid || in_array($cmd, array(
'insertQuestions', 
'browseForQuestions'))) {
 
  593                    require_once 
"./Modules/Test/classes/class.ilTestExpressPageObjectGUI.php";
 
  596                    $ret = &$this->ctrl->forwardCommand($pageObject);
 
  597                    $this->tpl->setContent(
$ret);
 
  600                require_once 
"./Services/Style/Content/classes/class.ilObjStyleSheet.php";
 
  601                $this->tpl->setCurrentBlock(
"ContentStyle");
 
  602                $this->tpl->setVariable(
 
  603                    "LOCATION_CONTENT_STYLESHEET",
 
  606                $this->tpl->parseCurrentBlock();
 
  609                $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  610                $this->tpl->setVariable(
 
  611                    "LOCATION_SYNTAX_STYLESHEET",
 
  614                $this->tpl->parseCurrentBlock();
 
  615                require_once 
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
 
  619                    $this->ctrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'q_id', 
'');
 
  620                    $this->ctrl->redirectByClass(
'iltestexpresspageobjectgui', $this->ctrl->getCmd());
 
  625                $q_gui->outAdditionalOutput();
 
  626                $q_gui->object->setObjId($this->object->getId());
 
  628                $q_gui->setTargetGuiClass(
null);
 
  629                $q_gui->setQuestionActionCmd(
null);
 
  631                $question = $q_gui->object;
 
  632                $this->ctrl->saveParameter($this, 
"q_id");
 
  634                #$this->lng->loadLanguageModule("content");
 
  635                $this->ctrl->setReturnByClass(
"ilTestExpressPageObjectGUI", 
"view");
 
  636                $this->ctrl->setReturn($this, 
"questions");
 
  638                require_once 
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php";
 
  639                require_once 
"./Modules/Test/classes/class.ilTestExpressPageObjectGUI.php";
 
  643                $page_gui->setEditPreview(
true);
 
  644                $page_gui->setEnabledTabs(
false);
 
  645                if (strlen($this->ctrl->getCmd()) == 0) {
 
  646                    $this->ctrl->setCmdClass(get_class($page_gui));
 
  647                    $this->ctrl->setCmd(
"preview");
 
  650                $page_gui->setQuestionHTML(array($q_gui->object->getId() => $q_gui->getPreview(
true)));
 
  651                $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
 
  653                $page_gui->setOutputMode($this->object->evalTotalPersons() == 0 ? 
"edit" : 
'preview');
 
  655                $page_gui->setHeader($question->getTitle());
 
  656                $page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this, 
"downloadFile"));
 
  657                $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, 
"fullscreen"));
 
  658                $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this));
 
  659                $page_gui->setPresentationTitle($question->getTitle() . 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . $question->getId() . 
']');
 
  660                $ret = $this->ctrl->forwardCommand($page_gui);
 
  666                $ilTabs = 
$DIC[
'ilTabs'];
 
  667                $ilTabs->activateTab(
'assQuestions');
 
  671            case 'ilassquestionpreviewgui':
 
  672                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  673                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  677                $this->ctrl->saveParameter($this, 
"q_id");
 
  679                require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
 
  683                $gui->initPreviewSettings($this->object->getRefId());
 
  684                $gui->initPreviewSession(
$ilUser->getId(), (
int) 
$_GET[
'q_id']);
 
  685                $gui->initHintTracking();
 
  686                $gui->initStyleSheets();
 
  688                $this->ctrl->forwardCommand($gui);
 
  692            case 'ilassquestionpagegui':
 
  693                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  694                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  698                require_once 
'Modules/Test/classes/class.ilAssQuestionPageCommandForwarder.php';
 
  700                $forwarder->setTestObj($this->
object);
 
  701                $forwarder->forward();
 
  704            case 'ilassspecfeedbackpagegui':
 
  705                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  706                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  708                require_once 
"./Modules/TestQuestionPool/classes/feedback/class.ilAssSpecFeedbackPageGUI.php";
 
  710                $this->ctrl->forwardCommand($pg_gui);
 
  713            case 'ilassgenfeedbackpagegui':
 
  714                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  715                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  717                require_once 
"./Modules/TestQuestionPool/classes/feedback/class.ilAssGenFeedbackPageGUI.php";
 
  719                $this->ctrl->forwardCommand($pg_gui);
 
  722            case 'illocalunitconfigurationgui':
 
  723                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  724                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  729                $this->ctrl->setReturn($this, 
"questions");
 
  732                require_once 
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
 
  734                $questionGUI->object->setObjId($this->object->getId());
 
  735                $questionGUI->setQuestionTabs();
 
  737                require_once 
'Modules/TestQuestionPool/classes/class.ilLocalUnitConfigurationGUI.php';
 
  738                require_once 
'Modules/TestQuestionPool/classes/class.ilUnitConfigurationRepository.php';
 
  742                $this->ctrl->forwardCommand($gui);
 
  745            case "ilcommonactiondispatchergui":
 
  746                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]) && !$ilAccess->checkAccess(
"visible", 
"", 
$_GET[
"ref_id"])) {
 
  747                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  749                require_once 
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
 
  751                $this->ctrl->forwardCommand($gui);
 
  754            case 'ilassquestionhintsgui':
 
  755                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  756                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  761                $this->ctrl->setReturn($this, 
"questions");
 
  764                require_once 
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
 
  766                $questionGUI->object->setObjId($this->object->getId());
 
  767                $questionGUI->setQuestionTabs();
 
  770                require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
 
  773                $gui->setEditingEnabled(
 
  774                    $DIC->access()->checkAccess(
'write', 
'', $this->object->getRefId())
 
  781            case 'ilassquestionfeedbackeditinggui':
 
  782                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  783                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  788                $this->ctrl->setReturn($this, 
"questions");
 
  791                require_once 
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
 
  793                $questionGUI->object->setObjId($this->object->getId());
 
  794                $questionGUI->setQuestionTabs();
 
  797                require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
 
  803            case 'iltestcorrectionsgui':
 
  804                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  805                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  808                require_once 
'./Modules/Test/classes/class.ilTestCorrectionsGUI.php';
 
  810                $this->ctrl->forwardCommand($gui);
 
  815            if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]) && !$ilAccess->checkAccess(
"visible", 
"", 
$_GET[
"ref_id"]))) {
 
  816                $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  820                if ((strcmp($cmd, 
"properties") == 0) && (
$_GET[
"browse"])) {
 
  821                    $this->questionBrowser();
 
  824                if ((strcmp($cmd, 
"properties") == 0) && (
$_GET[
"up"] || 
$_GET[
"down"])) {
 
  829                $ret = &$this->$cmd();
 
  832                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  833                    $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
 
  836                if ($_REQUEST[
'prev_qid']) {
 
  837                    global $___prev_question_id;
 
  838                    $___prev_question_id = $_REQUEST[
'prev_qid'];
 
  839                    $this->ctrl->setParameterByClass(
'ilassquestionpagegui', 
'prev_qid', $_REQUEST[
'prev_qid']);
 
  840                    $this->ctrl->setParameterByClass(
$_GET[
'sel_question_types'] . 
'gui', 
'prev_qid', $_REQUEST[
'prev_qid']);
 
  842                $this->create_question_mode = 
true;
 
  845                $this->ctrl->setReturn($this, 
"questions");
 
  856                    $questionGui->object->setObjId($this->object->getId());
 
  858                    $questionGuiClass = get_class($questionGui);
 
  859                    $this->ctrl->setParameterByClass($questionGuiClass, 
'prev_qid', $_REQUEST[
'prev_qid']);
 
  860                    $this->ctrl->setParameterByClass($questionGuiClass, 
'test_ref_id', $_REQUEST[
'ref_id']);
 
  861                    $this->ctrl->setParameterByClass($questionGuiClass, 
'q_id', $qid);
 
  863                    if (isset($_REQUEST[
'test_express_mode'])) {
 
  864                        $this->ctrl->setParameterByClass($questionGuiClass, 
'test_express_mode', 1);
 
  867                    if (!$questionGui->isSaveCommand()) {
 
  868                        $_GET[
'calling_test'] = $this->
object->getRefId();
 
  871                    $questionGui->setQuestionTabs();
 
  873                    $this->ctrl->forwardCommand($questionGui);
 
  875                    if (isset($_REQUEST[
'test_express_mode'])) {
 
  876                        $this->ctrl->redirect($this, 
'showPage');
 
  878                        $this->ctrl->redirect($this, 
'questions');
 
  883        if (!in_array(strtolower(
$_GET[
"baseClass"]), array(
'iladministrationgui', 
'ilrepositorygui')) &&
 
  885            $this->tpl->printToStdout();
 
  893        require_once 
'Services/Tracking/classes/class.ilChangeEvent.php';
 
  896            $this->object->getType(),
 
  897            $this->object->getRefId(),
 
  898            $this->object->getId(),
 
  899            $DIC->user()->getId()
 
  910        $DIC->ctrl()->redirectByClass(
'ilTestExportGUI');
 
  919        $qid = $_REQUEST[
'q_id'];
 
  921        if (!$qid || $qid == 
'Array') {
 
  922            $questions = $this->
object->getQuestionTitlesAndIndexes();
 
  924            $keys = array_keys($questions);
 
  925            $qid = (int) (
$keys[0] ?? 0);
 
  927            $_REQUEST[
'q_id'] = $qid;
 
  928            $_GET[
'q_id'] = $qid;
 
  932        if ($this->object->checkQuestionParent($qid)) {
 
  936        throw new ilTestException(
'question id does not relate to parent object!');
 
  941        switch ($this->object->getQuestionSetType()) {
 
  943                $this->ctrl->redirectByClass(
'ilTestExpressPageObjectGUI', 
'showPage');
 
  947                $this->ctrl->redirectByClass(
'ilTestRandomQuestionSetConfigGUI');
 
  951                $this->ctrl->redirectByClass(
'ilObjTestDynamicQuestionSetConfigGUI');
 
  957        $this->ctrl->setCmdClass(
'ilTestEvaluationGUI');
 
  958        $this->ctrl->setCmd(
'outUserResultsOverview');
 
  959        $this->tabs_gui->clearTargets();
 
 1001        require_once 
'Modules/Test/classes/class.ilTestEvaluationGUI.php';
 
 1006        $this->ctrl->forwardCommand($gui);
 
 1011        require_once 
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
 
 1028        $this->tpl->loadStandardTemplate();
 
 1042        $this->ctrl->redirect($this, 
"infoScreen");
 
 1047        $this->ctrl->redirectByClass(
"iltestevaluationgui", 
"outEvaluation");
 
 1056            $this->
error->raiseError($this->lng->txt(
"no_create_permission"));
 
 1060        if ($form->checkInput()) {
 
 1061            $this->ctrl->setParameter($this, 
"new_type", $this->type);
 
 1067        $form->setValuesByPost();
 
 1068        $this->tpl->setContent($form->getHTML());
 
 1073        include_once(
"./Modules/Test/classes/class.ilObjTest.php");
 
 1075        $defaults = $tst->getAvailableDefaults();
 
 1076        if (count($defaults)) {
 
 1077            foreach ($defaults as $row) {
 
 1078                $a_options[
"tstdef_" . $row[
"test_defaults_id"]] = array($row[
"name"],
 
 1079                    $this->lng->txt(
"tst_default_settings"));
 
 1084        include_once 
"Services/Administration/classes/class.ilSettingsTemplate.php";
 
 1087            foreach ($templates as $item) {
 
 1088                $a_options[
"tsttpl_" . $item[
"id"]] = array($item[
"title"],
 
 1089                    nl2br(trim($item[
"description"])));
 
 1102            $testDefaultsId = $tstdef;
 
 1104            $a_new_object->applyDefaults($testDefaults);
 
 1109            include_once 
"Services/Administration/classes/class.ilSettingsTemplate.php";
 
 1112            $template_settings = $template->getSettings();
 
 1113            if ($template_settings) {
 
 1117            $a_new_object->setTemplate($template_id);
 
 1120        $a_new_object->saveToDb();
 
 1123        ilUtil::sendSuccess($this->lng->txt(
"object_added"), 
true);
 
 1124        $this->ctrl->setParameter($this, 
'ref_id', $a_new_object->
getRefId());
 
 1125        $this->ctrl->redirectByClass(
'ilObjTestSettingsGeneralGUI');
 
 1130        include_once 
"./Services/Utilities/classes/class.ilUtil.php";
 
 1131        $path = $this->tree->getPathFull($this->object->getRefID());
 
 1140        if ($_FILES[
"xmldoc"][
"error"] > UPLOAD_ERR_OK) {
 
 1145        include_once(
"./Modules/Test/classes/class.ilObjTest.php");
 
 1150        $file = pathinfo($_FILES[
"xmldoc"][
"name"]);
 
 1151        $full_path = $basedir . 
"/" . $_FILES[
"xmldoc"][
"name"];
 
 1158        $subdir = basename($file[
"basename"], 
"." . $file[
"extension"]);
 
 1164        if (!is_file($qti_file)) {
 
 1172        include_once 
"./Services/QTI/classes/class.ilQTIParser.php";
 
 1174        $result = $qtiParser->startParsing();
 
 1175        $founditems = &$qtiParser->getFoundItems();
 
 1179        foreach ($founditems as $item) {
 
 1180            if (strlen($item[
"type"])) {
 
 1187        if (count($founditems) && $complete == 0) {
 
 1196        $_SESSION[
"tst_import_results_file"] = $results_file;
 
 1197        $_SESSION[
"tst_import_xml_file"] = $xml_file;
 
 1198        $_SESSION[
"tst_import_qti_file"] = $qti_file;
 
 1199        $_SESSION[
"tst_import_subdir"] = $subdir;
 
 1206        $importVerificationTpl = 
new ilTemplate(
'tpl.tst_import_verification.html', 
true, 
true, 
'Modules/Test');
 
 1208        include_once 
"./Services/QTI/classes/class.ilQTIItem.php";
 
 1214        $importVerificationTpl->setVariable(
"TEXT_TYPE", $this->lng->txt(
"question_type"));
 
 1215        $importVerificationTpl->setVariable(
"TEXT_TITLE", $this->lng->txt(
"question_title"));
 
 1216        $importVerificationTpl->setVariable(
"FOUND_QUESTIONS_INTRODUCTION", $this->lng->txt(
"tst_import_verify_found_questions"));
 
 1217        $importVerificationTpl->setVariable(
"VERIFICATION_HEADING", $this->lng->txt(
"import_tst"));
 
 1218        $importVerificationTpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
 1220        $importVerificationTpl->setVariable(
"QUESTIONPOOL_ID", $QplOrTstID);
 
 1221        $importVerificationTpl->setVariable(
"VALUE_IMPORT", $this->lng->txt(
"import"));
 
 1222        $importVerificationTpl->setVariable(
"VALUE_CANCEL", $this->lng->txt(
"cancel"));
 
 1224        $row_class = [
"tblrow1", 
"tblrow2"];
 
 1226        foreach ($founditems as $item) {
 
 1227            $importVerificationTpl->setCurrentBlock(
"verification_row");
 
 1228            $importVerificationTpl->setVariable(
"ROW_CLASS", $row_class[$counter++ % 2]);
 
 1229            $importVerificationTpl->setVariable(
"QUESTION_TITLE", $item[
"title"]);
 
 1230            $importVerificationTpl->setVariable(
"QUESTION_IDENT", $item[
"ident"]);
 
 1232            switch ($item[
"type"]) {
 
 1235                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMultipleChoice"));
 
 1239                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assSingleChoice"));
 
 1243                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assKprimChoice"));
 
 1247                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assLongMenu"));
 
 1251                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assNumeric"));
 
 1255                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFormulaQuestion"));
 
 1259                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextSubset"));
 
 1263                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assClozeTest"));
 
 1267                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assErrorText"));
 
 1271                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assImagemapQuestion"));
 
 1275                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assJavaApplet"));
 
 1279                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFlashApplet"));
 
 1283                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMatchingQuestion"));
 
 1287                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingQuestion"));
 
 1291                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingHorizontal"));
 
 1295                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextQuestion"));
 
 1299                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFileUpload"));
 
 1302            $importVerificationTpl->parseCurrentBlock();
 
 1305        $this->tpl->setContent($importVerificationTpl->get());
 
 1313        include_once 
"./Modules/Test/classes/class.ilObjTest.php";
 
 1317        $newObj->setType(
$_GET[
"new_type"]);
 
 1319        $newObj->setTitle(
"dummy");
 
 1321        $newObj->setDescription(
"test import");
 
 1323        $newObj->create(
true);
 
 1325        $newObj->createReference();
 
 1327        $newObj->putInTree(
$_GET[
"ref_id"]);
 
 1329        $newObj->setPermissions(
$_GET[
"ref_id"]);
 
 1331        $newObj->mark_schema->flush();
 
 1334        include_once 
"./Services/QTI/classes/class.ilQTIParser.php";
 
 1338        if (!isset(
$_POST[
"qpl"]) || 
"-1" === (
string) 
$_POST[
"qpl"]) {
 
 1339            $questionParentObjId = $newObj->getId();
 
 1341            $questionParentObjId = 
$_POST[
"qpl"];
 
 1344        if (is_file(
$_SESSION[
"tst_import_dir"] . 
'/' . 
$_SESSION[
"tst_import_subdir"] . 
"/manifest.xml")) {
 
 1345            $newObj->saveToDb();
 
 1348            $_SESSION[
'tst_import_qst_parent'] = $questionParentObjId;
 
 1350            $fileName = 
$_SESSION[
'tst_import_subdir'] . 
'.zip';
 
 1351            $fullPath = 
$_SESSION[
'tst_import_dir'] . 
'/' . $fileName;
 
 1353            include_once(
"./Services/Export/classes/class.ilImport.php");
 
 1355            $map = $imp->getMapping();
 
 1356            $map->addMapping(
'Modules/Test', 
'tst', 
'new_id', $newObj->getId());
 
 1357            $imp->importObject($newObj, $fullPath, $fileName, 
'tst', 
'Modules/Test', 
true);
 
 1360            if (!isset(
$_POST[
"ident"]) || !is_array(
$_POST[
"ident"]) || !count(
$_POST[
"ident"])) {
 
 1361                $qtiParser->setIgnoreItemsEnabled(
true);
 
 1363            $qtiParser->setTestObject($newObj);
 
 1364            $result = $qtiParser->startParsing();
 
 1365            $newObj->saveToDb();
 
 1368            include_once(
"./Modules/LearningModule/classes/class.ilContObjParser.php");
 
 1370            $contParser->setQuestionMapping($qtiParser->getImportMapping());
 
 1371            $contParser->startParsing();
 
 1373            if (isset(
$_POST[
"ident"]) && is_array(
$_POST[
"ident"]) && count(
$_POST[
"ident"]) == $qtiParser->getNumImportedItems()) {
 
 1375                if (@file_exists(
$_SESSION[
"tst_import_results_file"])) {
 
 1376                    include_once(
"./Modules/Test/classes/class.ilTestResultsImportParser.php");
 
 1378                    $results->setQuestionIdMapping($qtiParser->getQuestionIdMapping());
 
 1389        ilUtil::sendSuccess($this->lng->txt(
"object_imported"), 
true);
 
 1390        ilUtil::redirect(
"ilias.php?ref_id=" . $newObj->getRefId() . 
"&baseClass=ilObjTestGUI");
 
 1409        $file = explode(
"_", 
$_GET[
"file_id"]);
 
 1410        include_once(
"./Modules/File/classes/class.ilObjFile.php");
 
 1411        $fileObj = 
new ilObjFile($file[count($file) - 1], 
false);
 
 1412        $fileObj->sendFile();
 
 1421        include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
 
 1423        $page_gui->showMediaFullscreen();
 
 1431        include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php");
 
 1433        $pg_obj->send_paragraph(
$_GET[
"par_id"], 
$_GET[
"downloadtitle"]);
 
 1446        $this->questionBrowser();
 
 1458        $this->questionBrowser();
 
 1470        $this->ctrl->redirect($this, 
"questions");
 
 1485        $parent_ref = 
$tree->getParentId($this->object->getRefId());
 
 1486        include_once 
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
 
 1488        $qpl->setType(
"qpl");
 
 1489        $qpl->setTitle(
$name);
 
 1490        $qpl->setDescription($description);
 
 1492        $qpl->createReference();
 
 1493        $qpl->putInTree($parent_ref);
 
 1494        $qpl->setPermissions($parent_ref);
 
 1497        return $qpl->getRefId();
 
 1506        $form->setTitle($this->lng->txt(
'random_selection'));
 
 1507        $form->setFormAction($this->ctrl->getFormAction($this, 
'cancelRandomSelect'));
 
 1509        $form->addCommandButton(
'createRandomSelection', $this->lng->txt(
'submit'));
 
 1510        $form->addCommandButton(
'cancelRandomSelect', $this->lng->txt(
'cancel'));
 
 1512        $amount = 
new ilNumberInputGUI($this->lng->txt(
'tst_random_nr_of_questions'), 
'nr_of_questions');
 
 1513        $amount->allowDecimals(
false);
 
 1514        $amount->setSize(5);
 
 1515        $amount->setMinValue(1);
 
 1516        $amount->setValue(5);
 
 1517        $form->addItem($amount);
 
 1519        $poolSelection = 
new ilSelectInputGUI($this->lng->txt(
'tst_source_question_pool'), 
'sel_qpl');
 
 1520        $poolSelection->setInfo($this->lng->txt(
'tst_random_select_questionpool'));
 
 1521        $poolSelection->setRequired(
true);
 
 1523        $questionpools = $this->
object->getAvailableQuestionpools(
false, 
false, 
false, 
true);
 
 1524        foreach ($questionpools as $key => $value) {
 
 1525            $poolOptions[$key] = $value[
'title'];
 
 1527        $poolSelection->setOptions(
 
 1528            [
'0' => $this->lng->txt(
'all_available_question_pools')] + $poolOptions
 
 1530        $form->addItem($poolSelection);
 
 1534        $form->addItem($questionType);
 
 1536        $this->tpl->setContent($form->getHTML());
 
 1541        $this->ctrl->redirect($this, 
"questions");
 
 1551        $this->tpl->setContent(
 
 1552            $randomQuestionSelectionTable
 
 1553                ->build((
int) 
$_POST[
'nr_of_questions'], (
int) 
$_POST[
'sel_qpl'])
 
 1567        $selected_array = explode(
",", 
$_POST[
"chosen_questions"]);
 
 1568        if (!count($selected_array)) {
 
 1571            $total = $this->
object->evalTotalPersons();
 
 1578            foreach ($selected_array as $key => $value) {
 
 1579                $this->
object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value);
 
 1581            $this->
object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
 
 1582            ilUtil::sendSuccess($this->lng->txt(
"tst_questions_inserted"), 
true);
 
 1583            $this->ctrl->redirect($this, 
"questions");
 
 1590        $this->questionBrowser();
 
 1602        $qpl_ref_id = $_REQUEST[
"sel_qpl"];
 
 1604        $qpl_mode = $_REQUEST[
'usage'];
 
 1606        if (isset($_REQUEST[
'qtype'])) {
 
 1607            include_once 
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
 
 1609        } elseif (isset($_REQUEST[
'sel_question_types'])) {
 
 1610            $sel_question_types = $_REQUEST[
"sel_question_types"];
 
 1613        if (!$qpl_mode || ($qpl_mode == 2 && strcmp($_REQUEST[
"txt_qpl"], 
"") == 0) || ($qpl_mode == 3 && strcmp($qpl_ref_id, 
"") == 0)) {
 
 1616            $_REQUEST[
'sel_question_types'] = $sel_question_types;
 
 1621            $_SESSION[
"test_id"] = $this->
object->getRefId();
 
 1622            if ($qpl_mode == 2 && strcmp($_REQUEST[
"txt_qpl"], 
"") != 0) {
 
 1625            } elseif ($qpl_mode == 1) {
 
 1626                $qpl_ref_id = 
$_GET[
"ref_id"];
 
 1629            include_once 
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php";
 
 1630            $baselink = 
"ilias.php?baseClass=ilObjQuestionPoolGUI&ref_id=" . $qpl_ref_id . 
"&cmd=createQuestionForTest&test_ref_id=" . 
$_GET[
"ref_id"] . 
"&calling_test=" . 
$_GET[
"ref_id"] . 
"&sel_question_types=" . $sel_question_types;
 
 1632            if (isset($_REQUEST[
'prev_qid'])) {
 
 1633                $baselink .= 
'&prev_qid=' . $_REQUEST[
'prev_qid'];
 
 1634            } elseif (isset($_REQUEST[
'position'])) {
 
 1635                $baselink .= 
'&prev_qid=' . $_REQUEST[
'position'];
 
 1638            if ($_REQUEST[
'test_express_mode']) {
 
 1639                $baselink .= 
'&test_express_mode=1';
 
 1642            if (isset($_REQUEST[
'add_quest_cont_edit_mode'])) {
 
 1645                    "add_quest_cont_edit_mode={$_REQUEST['add_quest_cont_edit_mode']}",
 
 1650            #var_dump($_REQUEST['prev_qid']); 
 1666        $this->ctrl->redirect($this, 
"questions");
 
 1683        $questionpools = &$this->
object->getAvailableQuestionpools(
false, 
false, 
false, 
true, 
false, 
"write");
 
 1685        if ($this->object->getPoolUsage()) {
 
 1691            include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
 1694            $form->setFormAction(
$ilCtrl->getFormAction($this, 
"executeCreateQuestion"));
 
 1695            $form->setTitle(
$lng->txt(
"ass_create_question"));
 
 1696            include_once 
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
 
 1700            $hidden->setValue($_REQUEST[
"sel_question_types"]);
 
 1701            $form->addItem($hidden);
 
 1708                    $lng->txt(
'tst_add_quest_cont_edit_mode_default'),
 
 1713                    $lng->txt(
'tst_add_quest_cont_edit_mode_page_object'),
 
 1719                $form->addItem($ri, 
true);
 
 1723                $form->addItem($hi, 
true);
 
 1728            $usage->setRequired(
true);
 
 1729            $no_pool = 
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
 
 1730            $usage->addOption($no_pool);
 
 1731            $existing_pool = 
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
 
 1732            $usage->addOption($existing_pool);
 
 1733            $new_pool = 
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
 
 1734            $usage->addOption($new_pool);
 
 1735            $form->addItem($usage);
 
 1737            $usage->setValue(1);
 
 1740            $pools_data = array();
 
 1741            foreach ($questionpools as $key => $p) {
 
 1742                $pools_data[$key] = $p[
'title'];
 
 1744            $pools = 
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"), 
"sel_qpl");
 
 1745            $pools->setOptions($pools_data);
 
 1746            $existing_pool->addSubItem($pools);
 
 1749            $this->lng->loadLanguageModule(
'rbac');
 
 1752            $name->setMaxLength(50);
 
 1753            $new_pool->addSubItem(
$name);
 
 1755            $form->addCommandButton(
"executeCreateQuestion", 
$lng->txt(
"submit"));
 
 1756            $form->addCommandButton(
"cancelCreateQuestion", 
$lng->txt(
"cancel"));
 
 1758            return $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
 
 1763            $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'sel_question_types', $_REQUEST[
"sel_question_types"]);
 
 1764            $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'add_quest_cont_edit_mode', $_REQUEST[
"add_quest_cont_edit_mode"]);
 
 1765            $link = 
$ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui', 
'handleToolbarCommand', 
'', 
false, 
false);
 
 1775        $removeQuestionIds = (array) 
$_POST[
"q_id"];
 
 1777        $questions = $this->
object->getQuestionTitlesAndIndexes();
 
 1779        $this->
object->removeQuestions($removeQuestionIds);
 
 1781        $this->
object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
 
 1783        ilUtil::sendSuccess($this->lng->txt(
"tst_questions_removed"));
 
 1785        if ($_REQUEST[
'test_express_mode']) {
 
 1788            $deleted_tmp = $removeQuestionIds;
 
 1789            $first = array_shift($deleted_tmp);
 
 1790            foreach ((array) $questions as $key => $value) {
 
 1791                if (!in_array($key, $removeQuestionIds)) {
 
 1799                } elseif ($key == $first) {
 
 1804                    $first = array_shift($deleted_tmp);
 
 1809                count($questions) == count($removeQuestionIds) ||
 
 1812                $this->ctrl->setParameter($this, 
'q_id', 
'');
 
 1813                $this->ctrl->redirect($this, 
'showPage');
 
 1816            $this->ctrl->setParameter($this, 
'q_id', $return_to);
 
 1817            $this->ctrl->redirect($this, 
"showPage");
 
 1819            $this->ctrl->setParameter($this, 
'q_id', 
'');
 
 1820            $this->ctrl->redirect($this, 
'questions');
 
 1833        if ($_REQUEST[
'test_express_mode']) {
 
 1834            $this->ctrl->setParameter($this, 
'q_id', $_REQUEST[
'q_id']);
 
 1835            $this->ctrl->redirect($this, 
"showPage");
 
 1837            $this->ctrl->redirect($this, 
"questions");
 
 1850        $total = $this->
object->evalTotalPersons();
 
 1853            $question = sprintf($this->lng->txt(
"tst_remove_questions_and_results"), 
$total);
 
 1855            if (count($checked_questions) == 1) {
 
 1856                $question = $this->lng->txt(
"tst_remove_question");
 
 1858                $question = $this->lng->txt(
"tst_remove_questions");
 
 1862        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 1864        $cgui->setHeaderText($question);
 
 1866        $this->ctrl->saveParameter($this, 
'test_express_mode');
 
 1867        $this->ctrl->saveParameter($this, 
'q_id');
 
 1869        $cgui->setFormAction($this->ctrl->getFormAction($this));
 
 1870        $cgui->setCancel($this->lng->txt(
"cancel"), 
"cancelRemoveQuestions");
 
 1871        $cgui->setConfirm($this->lng->txt(
"confirm"), 
"confirmRemoveQuestions");
 
 1873        include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
 1874        $removablequestions = &$this->
object->getTestQuestions();
 
 1875        if (count($removablequestions)) {
 
 1876            foreach ($removablequestions as 
$data) {
 
 1877                if (in_array(
$data[
"question_id"], $checked_questions)) {
 
 1879                    $txt .= 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . 
$data[
'question_id'] . 
']';
 
 1881                    if (
$data[
"description"]) {
 
 1882                        $txt .= 
"<div class=\"small\">" . 
$data[
"description"] . 
"</div>";
 
 1885                    $cgui->addItem(
"q_id[]", 
$data[
"question_id"], 
$txt);
 
 1890        $this->tpl->setContent($cgui->getHTML());
 
 1900        $checked_questions = $_REQUEST[
"q_id"];
 
 1902        if (!is_array($checked_questions) && $checked_questions) {
 
 1903            $checked_questions = array($checked_questions);
 
 1906        if (!is_array($checked_questions)) {
 
 1907            $checked_questions = [];
 
 1910        if (count($checked_questions) > 0) {
 
 1912        } elseif (0 === count($checked_questions)) {
 
 1914            $this->ctrl->redirect($this, 
"questions");
 
 1923        $selected_questions = 
null;
 
 1924        $selected_questions = 
$_POST[
'q_id'];
 
 1925        if (is_array($selected_questions)) {
 
 1926            $_SESSION[
'tst_qst_move_' . $this->
object->getTestId()] = 
$_POST[
'q_id'];
 
 1927            ilUtil::sendSuccess($this->lng->txt(
"msg_selected_for_move"), 
true);
 
 1931        $this->ctrl->redirect($this, 
'questions');
 
 1940        $move_questions = 
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
 
 1942        if (!is_array(
$_POST[
'q_id']) || 0 === count(
$_POST[
'q_id'])) {
 
 1944            $this->ctrl->redirect($this, 
'questions');
 
 1946        if (count(
$_POST[
'q_id']) > 1) {
 
 1948            $this->ctrl->redirect($this, 
'questions');
 
 1951        $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()], 
$_POST[
'q_id'][0], $insert_mode);
 
 1952        ilUtil::sendSuccess($this->lng->txt(
"msg_questions_moved"), 
true);
 
 1953        unset(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]);
 
 1954        $this->ctrl->redirect($this, 
"questions");
 
 1963        $move_questions = 
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
 
 1964        if (!is_array(
$_POST[
'q_id']) || 0 === count(
$_POST[
'q_id'])) {
 
 1966            $this->ctrl->redirect($this, 
'questions');
 
 1968        if (count(
$_POST[
'q_id']) > 1) {
 
 1970            $this->ctrl->redirect($this, 
'questions');
 
 1973        $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()], 
$_POST[
'q_id'][0], $insert_mode);
 
 1974        ilUtil::sendSuccess($this->lng->txt(
"msg_questions_moved"), 
true);
 
 1975        unset(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]);
 
 1976        $this->ctrl->redirect($this, 
"questions");
 
 1986        $selected_array = (is_array(
$_POST[
'q_id'])) ? 
$_POST[
'q_id'] : array();
 
 1987        if (!count($selected_array)) {
 
 1989            $this->ctrl->redirect($this, 
"browseForQuestions");
 
 1991            include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
 1992            $manscoring = 
false;
 
 1993            foreach ($selected_array as $key => $value) {
 
 1994                $this->
object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value);
 
 1999            $this->
object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
 
 2003                ilUtil::sendSuccess($this->lng->txt(
"tst_questions_inserted"), 
true);
 
 2005            $this->ctrl->redirect($this, 
"questions");
 
 2017        $ilHelp = 
$DIC[
'ilHelp']; 
 
 2022        $subScreenId = array(
'createQuestion');
 
 2024        include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
 2026        $ilCtrl->setParameter($this, 
'qtype', $_REQUEST[
'qtype']);
 
 2030        $form->setFormAction(
$ilCtrl->getFormAction($this, 
"executeCreateQuestion"));
 
 2031        $form->setTitle(
$lng->txt(
"ass_create_question"));
 
 2032        include_once 
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
 
 2035        $questionTypes = $pool->getQuestionTypes(
false, 
true, 
false);
 
 2039        foreach ($questionTypes as $label => 
$data) {
 
 2040            $options[
$data[
'question_type_id']] = $label;
 
 2043        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 2045        $si->setOptions($options);
 
 2046        $form->addItem(
$si, 
true);
 
 2049        $questions = $this->
object->getQuestionTitlesAndIndexes();
 
 2052            $options = array(
'0' => 
$lng->txt(
'first'));
 
 2053            foreach ($questions as $key => $title) {
 
 2054                $options[$key] = 
$lng->txt(
'behind') . 
' ' . $title . 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . $key . 
']';
 
 2056            $si->setOptions($options);
 
 2057            $si->setValue($_REQUEST[
'q_id']);
 
 2058            $form->addItem(
$si, 
true);
 
 2063            $subScreenId[] = 
'editMode';
 
 2068                $lng->txt(
'tst_add_quest_cont_edit_mode_page_object'),
 
 2073                $lng->txt(
'tst_add_quest_cont_edit_mode_default'),
 
 2079            $form->addItem($ri, 
true);
 
 2083            $form->addItem($hi, 
true);
 
 2086        if ($this->object->getPoolUsage()) {
 
 2087            $subScreenId[] = 
'poolSelect';
 
 2091            $usage->setRequired(
true);
 
 2092            $no_pool = 
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
 
 2093            $usage->addOption($no_pool);
 
 2094            $existing_pool = 
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
 
 2095            $usage->addOption($existing_pool);
 
 2096            $new_pool = 
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
 
 2097            $usage->addOption($new_pool);
 
 2098            $form->addItem($usage);
 
 2100            $usage->setValue(1);
 
 2103            $pools_data = array();
 
 2104            foreach ($questionpools as $key => $p) {
 
 2105                $pools_data[$key] = $p[
'title'];
 
 2107            $pools = 
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"), 
"sel_qpl");
 
 2108            $pools->setOptions($pools_data);
 
 2109            $existing_pool->addSubItem($pools);
 
 2113            $name->setMaxLength(50);
 
 2114            $new_pool->addSubItem(
$name);
 
 2117        $form->addCommandButton(
"executeCreateQuestion", 
$lng->txt(
"create"));
 
 2118        $form->addCommandButton(
"questions", 
$lng->txt(
"cancel"));
 
 2120        $DIC->tabs()->activateTab(
'assQuestions');
 
 2121        $ilHelp->setScreenId(
'assQuestions');
 
 2122        $ilHelp->setSubScreenId(implode(
'_', $subScreenId));
 
 2124        return $tpl->setContent($form->getHTML());
 
 2130        $ilAccess = 
$DIC[
'ilAccess'];
 
 2131        $ilTabs = 
$DIC[
'ilTabs'];
 
 2134        $this->ctrl->setParameter($this, 
'test_express_mode', 
'');
 
 2136        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 2139            $this->ctrl->redirect($this, 
"infoScreen");
 
 2142        if (
$_GET[
'browse']) {
 
 2143            return $this->questionbrowser();
 
 2150        $this->ctrl->setParameter($this, 
'q_id', 
'');
 
 2153            ilUtil::redirect(
"ilias.php?baseClass=ilObjQuestionPoolGUI&ref_id=" . 
$_GET[
"eqpl"] . 
"&cmd=editQuestionForTest&calling_test=" . 
$_GET[
"ref_id"] . 
"&q_id=" . 
$_GET[
"eqid"]);
 
 2156        if (
$_GET[
"up"] > 0) {
 
 2157            $this->
object->questionMoveUp(
$_GET[
"up"]);
 
 2159        if (
$_GET[
"down"] > 0) {
 
 2160            $this->
object->questionMoveDown(
$_GET[
"down"]);
 
 2164            $selected_array = array();
 
 2165            array_push($selected_array, 
$_GET[
"add"]);
 
 2166            $total = $this->
object->evalTotalPersons();
 
 2173            $this->insertQuestions($selected_array);
 
 2177        $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.il_as_tst_questions.html", 
"Modules/Test");
 
 2179        $total = $this->
object->evalTotalPersons();
 
 2180        if ($ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 2182                $link = 
$DIC->ui()->factory()->link()->standard(
 
 2183                    $DIC->language()->txt(
"test_has_datasets_warning_page_view_link"),
 
 2184                    $DIC->ctrl()->getLinkTargetByClass(array(
'ilTestResultsGUI', 
'ilParticipantsTestResultsGUI'))
 
 2187                $message = 
$DIC->language()->txt(
"test_has_datasets_warning_page_view");
 
 2189                $msgBox = 
$DIC->ui()->factory()->messageBox()->info(
$message)->withLinks(array($link));
 
 2191                $DIC->ui()->mainTemplate()->setCurrentBlock(
'mess');
 
 2192                $DIC->ui()->mainTemplate()->setVariable(
 
 2194                    $DIC->ui()->renderer()->render($msgBox)
 
 2196                $DIC->ui()->mainTemplate()->parseCurrentBlock();
 
 2199                $ilToolbar = 
$DIC[
'ilToolbar'];
 
 2201                $ilToolbar->addButton($this->lng->txt(
"ass_create_question"), $this->ctrl->getLinkTarget($this, 
"addQuestion"));
 
 2203                if ($this->object->getPoolUsage()) {
 
 2204                    $ilToolbar->addSeparator();
 
 2206                    require_once 
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
 
 2211                $ilToolbar->addSeparator();
 
 2212                $ilToolbar->addButton($this->lng->txt(
"random_selection"), $this->ctrl->getLinkTarget($this, 
"randomselect"));
 
 2216                $ilAccess = 
$DIC[
'ilAccess'];
 
 2220                $online_access = 
false;
 
 2221                if ($this->object->getFixedParticipants()) {
 
 2222                    include_once 
"./Modules/Test/classes/class.ilObjTestAccess.php";
 
 2224                    if ($online_access_result === 
true) {
 
 2225                        $online_access = 
true;
 
 2229                if (!$this->object->getOfflineStatus() && $this->object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
 
 2230                    if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read", 
"", $this->ref_id)) {
 
 2231                        $testSession = $this->testSessionFactory->getSession();
 
 2232                        $testSequence = $this->testSequenceFactory->getSequenceByTestSession($testSession);
 
 2234                        $testPlayerGUI = $this->testPlayerFactory->getPlayerGUI();
 
 2236                        $executable = $this->
object->isExecutable($testSession, 
$ilUser->getId(), $allowPassIncrease = 
true);
 
 2238                        if ($executable[
"executable"]) {
 
 2239                            if ($testSession->getActiveId() > 0) {
 
 2242                                if ($testSequence->hasStarted($testSession)) {
 
 2243                                    $execTestLabel = $this->lng->txt(
"tst_resume_test");
 
 2244                                    $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI, 
'resumePlayer');
 
 2246                                    $execTestLabel = $this->
object->getStartTestLabel($testSession->getActiveId());
 
 2247                                    $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI, 
'startPlayer');
 
 2252                                $execTestLabel = $this->
object->getStartTestLabel($testSession->getActiveId());
 
 2253                                $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI, 
'startPlayer');
 
 2256                            $ilToolbar->addSeparator();
 
 2257                            $ilToolbar->addButton($execTestLabel, $execTestLink);
 
 2267            $this->object->getRefId()
 
 2270        $table_gui->setPositionInsertCommandsEnabled(
 
 2271            is_array(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()])
 
 2272            && count(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()])
 
 2275        $table_gui->setQuestionTitleLinksEnabled(!
$total);
 
 2276        $table_gui->setQuestionPositioningEnabled(!
$total);
 
 2277        $table_gui->setQuestionManagingEnabled(!
$total);
 
 2278        $table_gui->setObligatoryQuestionsHandlingEnabled($this->object->areObligationsEnabled());
 
 2280        $table_gui->setTotalPoints($this->object->getFixedQuestionSetTotalPoints());
 
 2281        $table_gui->setTotalWorkingTime($this->object->getFixedQuestionSetTotalWorkingTime());
 
 2285        $table_gui->setData($this->object->getTestQuestions());
 
 2287        $this->tpl->setCurrentBlock(
"adm_content");
 
 2288        $this->tpl->setVariable(
"ACTION_QUESTION_FORM", $this->ctrl->getFormAction($this));
 
 2289        $this->tpl->setVariable(
'QUESTIONBROWSER', $table_gui->getHTML());
 
 2290        $this->tpl->parseCurrentBlock();
 
 2299        require_once 
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
 
 2329        include_once 
"./Modules/Test/classes/tables/class.ilTestHistoryTableGUI.php";
 
 2331        $table_gui->setTestObject($this->
object);
 
 2332        include_once 
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
 
 2334        $table_gui->setData(
$log);
 
 2335        $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
 
 2340        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 2342        $form->setTarget(
"_top");
 
 2344        $this->ctrl->setParameter($this, 
"new_type", $new_type);
 
 2345        $form->setFormAction($this->ctrl->getFormAction($this));
 
 2346        $form->setTitle($this->lng->txt(
"import_tst"));
 
 2349        include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
 2350        $fi = 
new ilFileInputGUI($this->lng->txt(
"import_file"), 
"xmldoc");
 
 2351        $fi->setSuffixes(array(
"zip"));
 
 2352        $fi->setRequired(
true);
 
 2353        $form->addItem($fi);
 
 2356        include_once(
"./Modules/Test/classes/class.ilObjTest.php");
 
 2358        $questionpools = $tst->getAvailableQuestionpools(
true, 
false, 
true, 
true);
 
 2359        if (count($questionpools)) {
 
 2360            $options = array(
"-1" => $this->lng->txt(
"dont_use_questionpool"));
 
 2361            foreach ($questionpools as $key => $value) {
 
 2362                $options[$key] = $value[
"title"];
 
 2365            $pool = 
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"), 
"qpl");
 
 2366            $pool->setInfo($this->lng->txt(
'select_question_pool_info'));
 
 2367            $pool->setOptions($options);
 
 2368            $form->addItem($pool);
 
 2371        $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
 
 2372        $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
 
 2384        $command = 
$_POST[
"command"];
 
 2385        if (strlen($command)) {
 
 2386            $method = $command . 
"Object";
 
 2387            if (method_exists($this, $method)) {
 
 2392        $this->ctrl->redirect($this, 
"participants");
 
 2405        $ilAccess = 
$DIC[
'ilAccess'];
 
 2406        $ilias = 
$DIC[
'ilias'];
 
 2407        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 2410            $this->ctrl->redirect($this, 
"infoScreen");
 
 2413        $isPdfDeliveryRequest = isset(
$_GET[
'pdf']) && 
$_GET[
'pdf'];
 
 2416        $template = 
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html", 
true, 
true, 
"Modules/Test");
 
 2418        if (!$isPdfDeliveryRequest) { 
 
 2419            $this->ctrl->setParameter($this, 
"pdf", 
"1");
 
 2420            $template->setCurrentBlock(
"pdf_export");
 
 2421            $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this, 
"print"));
 
 2422            $this->ctrl->setParameter($this, 
"pdf", 
"");
 
 2423            $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
 
 2424            $template->parseCurrentBlock();
 
 2426            $template->setCurrentBlock(
"navigation_buttons");
 
 2427            $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
 
 2428            $template->parseCurrentBlock();
 
 2439        $print_date = mktime(date(
"H"), date(
"i"), date(
"s"), date(
"m"), date(
"d"), date(
"Y"));
 
 2443        require_once 
'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
 
 2445        $questionHeaderBlockBuilder->setHeaderMode($this->object->getTitleOutput());
 
 2447        if ($isPdfDeliveryRequest) {
 
 2448            require_once 
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
 
 2452        foreach ($this->object->questions as $question) {
 
 2453            $template->setCurrentBlock(
"question");
 
 2454            $question_gui = $this->
object->createQuestionGUI(
"", $question);
 
 2456            if ($isPdfDeliveryRequest) {
 
 2460            $questionHeaderBlockBuilder->setQuestionTitle($question_gui->object->getTitle());
 
 2461            $questionHeaderBlockBuilder->setQuestionPoints($question_gui->object->getMaximumPoints());
 
 2462            $questionHeaderBlockBuilder->setQuestionPosition($counter);
 
 2463            $template->setVariable(
"QUESTION_HEADER", $questionHeaderBlockBuilder->getHTML());
 
 2465            $template->setVariable(
"TXT_QUESTION_ID", $this->lng->txt(
'question_id_short'));
 
 2466            $template->setVariable(
"QUESTION_ID", $question_gui->object->getId());
 
 2467            $result_output = $question_gui->getSolutionOutput(
"", 
null, 
false, 
true, 
false, $this->object->getShowSolutionFeedback());
 
 2468            $template->setVariable(
"SOLUTION_OUTPUT", $result_output);
 
 2469            $template->parseCurrentBlock(
"question");
 
 2471            $max_points += $question_gui->object->getMaximumPoints();
 
 2481        if ($isPdfDeliveryRequest) {
 
 2484            $this->tpl->setVariable(
"PRINT_CONTENT", $template->get());
 
 2498        $ilAccess = 
$DIC[
'ilAccess'];
 
 2500        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 2503            $this->ctrl->redirect($this, 
"infoScreen");
 
 2506        $template = 
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html", 
true, 
true, 
"Modules/Test");
 
 2510        $isPdfDeliveryRequest = isset(
$_GET[
'pdf']) && 
$_GET[
'pdf'];
 
 2515        require_once 
'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
 
 2517        $questionHeaderBlockBuilder->setHeaderMode($this->object->getTitleOutput());
 
 2519        if ($isPdfDeliveryRequest) {
 
 2520            require_once 
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
 
 2527        foreach ($this->object->questions as $question) {
 
 2528            $template->setCurrentBlock(
"question");
 
 2529            $question_gui = $this->
object->createQuestionGUI(
"", $question);
 
 2532            $questionHeaderBlockBuilder->setQuestionTitle($question_gui->object->getTitle());
 
 2533            $questionHeaderBlockBuilder->setQuestionPoints($question_gui->object->getMaximumPoints());
 
 2534            $questionHeaderBlockBuilder->setQuestionPosition($counter);
 
 2535            $template->setVariable(
"QUESTION_HEADER", $questionHeaderBlockBuilder->getHTML());
 
 2537            $template->setVariable(
"SOLUTION_OUTPUT", $question_gui->getPreview(
false));
 
 2538            $template->parseCurrentBlock(
"question");
 
 2540            $max_points += $question_gui->object->getMaximumPoints();
 
 2548        $template->setVariable(
 
 2556        if ($isPdfDeliveryRequest) {
 
 2559            $this->ctrl->setParameter($this, 
"pdf", 
"1");
 
 2560            $template->setCurrentBlock(
"pdf_export");
 
 2561            $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this, 
"review"));
 
 2562            $this->ctrl->setParameter($this, 
"pdf", 
"");
 
 2563            $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
 
 2564            $template->parseCurrentBlock();
 
 2566            $template->setCurrentBlock(
"navigation_buttons");
 
 2567            $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
 
 2568            $template->parseCurrentBlock();
 
 2571            $this->tpl->setVariable(
"PRINT_CONTENT", $template->get());
 
 2578    public function defaultsObject()
 
 2586        $ilAccess = 
$DIC[
'ilAccess'];
 
 2587        $ilToolbar = 
$DIC[
'ilToolbar'];
 
 2590        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 2592            $this->ctrl->redirect($this, 
"infoScreen");
 
 2599        $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 
'addDefaults'));
 
 2600        $ilToolbar->addFormButton($this->lng->txt(
'add'), 
'addDefaults');
 
 2601        require_once 
'Services/Form/classes/class.ilTextInputGUI.php';
 
 2602        $ilToolbar->addInputItem(
new ilTextInputGUI($this->lng->txt(
'tst_defaults_defaults_of_test'), 
'name'), 
true);
 
 2604        require_once 
'Modules/Test/classes/tables/class.ilTestPersonalDefaultSettingsTableGUI.php';
 
 2606        $defaults = $this->
object->getAvailableDefaults();
 
 2607        $table->setData((array) $defaults);
 
 2608        $tpl->setContent($table->getHTML());
 
 2616        if (isset(
$_POST[
'chb_defaults']) && is_array(
$_POST[
'chb_defaults']) && count(
$_POST[
'chb_defaults'])) {
 
 2617            foreach (
$_POST[
'chb_defaults'] as $test_default_id) {
 
 2618                $this->
object->deleteDefaults($test_default_id);
 
 2623        $this->defaultsObject();
 
 2640        if (!is_array(
$_POST[
"chb_defaults"]) || 1 !== count(
$_POST[
"chb_defaults"])) {
 
 2642                $this->lng->txt(
"tst_defaults_apply_select_one")
 
 2645            return $this->defaultsObject();
 
 2649        if ($this->object->evalTotalPersons() > 0) {
 
 2651                $this->lng->txt(
"tst_defaults_apply_not_possible")
 
 2654            return $this->defaultsObject();
 
 2657        $defaults = &$this->
object->getTestDefaults(
$_POST[
"chb_defaults"][0]);
 
 2658        $defaultSettings = unserialize($defaults[
"defaults"]);
 
 2660        if (isset($defaultSettings[
'isRandomTest'])) {
 
 2661            if ($defaultSettings[
'isRandomTest']) {
 
 2668        } elseif (isset($defaultSettings[
'questionSetType'])) {
 
 2669            $newQuestionSetType = $defaultSettings[
'questionSetType'];
 
 2671        $oldQuestionSetType = $this->
object->getQuestionSetType();
 
 2672        $questionSetTypeSettingSwitched = ($oldQuestionSetType != $newQuestionSetType);
 
 2674        $oldQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfigByType($oldQuestionSetType);
 
 2677            case !$questionSetTypeSettingSwitched:
 
 2678            case !$oldQuestionSetConfig->doesQuestionSetRelatedDataExist():
 
 2685                require_once 
'Modules/Test/classes/confirmations/class.ilTestSettingsChangeConfirmationGUI.php';
 
 2688                $confirmation->setFormAction($this->ctrl->getFormAction($this));
 
 2689                $confirmation->setCancel($this->lng->txt(
'cancel'), 
'defaults');
 
 2690                $confirmation->setConfirm($this->lng->txt(
'confirm'), 
'confirmedApplyDefaults');
 
 2692                $confirmation->setOldQuestionSetType($this->object->getQuestionSetType());
 
 2693                $confirmation->setNewQuestionSetType($newQuestionSetType);
 
 2694                $confirmation->setQuestionLossInfoEnabled(
false);
 
 2695                $confirmation->build();
 
 2697                $confirmation->populateParametersFromPost();
 
 2699                $this->tpl->setContent($this->ctrl->getHTML($confirmation));
 
 2704        if ($questionSetTypeSettingSwitched && !$this->object->getOfflineStatus()) {
 
 2705            $this->
object->setOfflineStatus(
true);
 
 2707            $info = $this->lng->txt(
"tst_set_offline_due_to_switched_question_set_type_setting");
 
 2712        $this->
object->applyDefaults($defaults);
 
 2714        ilUtil::sendSuccess($this->lng->txt(
"tst_defaults_applied"), 
true);
 
 2716        if ($questionSetTypeSettingSwitched && $oldQuestionSetConfig->doesQuestionSetRelatedDataExist()) {
 
 2717            $oldQuestionSetConfig->removeQuestionSetRelatedData();
 
 2720        $this->ctrl->redirect($this, 
'defaults');
 
 2728        if (strlen(
$_POST[
"name"]) > 0) {
 
 2729            $this->
object->addDefaults(
$_POST[
'name']);
 
 2733        $this->defaultsObject();
 
 2738        if (in_array($this->ctrl->getCmdClass(), self::$infoScreenChildClasses)) {
 
 2752        #if( !include 'competenzenRocker.php' ) exit; 
 2754        $this->ctrl->setCmd(
"showSummary");
 
 2755        $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
 2756        $this->infoScreen();
 
 2761        $this->ctrl->setCmd(
"showSummary");
 
 2762        $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
 2763        $this->infoScreen(
$_GET[
'lock']);
 
 2769    public function infoScreen($session_lock = 
"")
 
 2778        $ilAccess = 
$DIC[
'ilAccess'];
 
 2780        $ilToolbar = 
$DIC[
'ilToolbar'];
 
 2782        if (!$ilAccess->checkAccess(
"visible", 
"", $this->ref_id) && !$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"])) {
 
 2783            $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
 
 2788        if ($ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"])) {
 
 2793        include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
 2795        $info->setOpenFormTag(
false);
 
 2798            return $this->ctrl->forwardCommand($info);
 
 2801        require_once 
'Modules/Test/classes/class.ilTestInfoScreenToolbarFactory.php';
 
 2803        $toolbarFactory->setTestOBJ($this->
object);
 
 2804        $toolbar = $toolbarFactory->getToolbarInstance();
 
 2809        $toolbar->setSessionLockString($session_lock);
 
 2813        if ($this->object->getShowInfo()) {
 
 2814            $info->enablePrivateNotes();
 
 2817        if (strlen($this->object->getIntroduction())) {
 
 2818            $info->addSection($this->lng->txt(
"tst_introduction"));
 
 2819            $info->addProperty(
"", $this->object->prepareTextareaOutput($this->object->getIntroduction(), 
true) .
 
 2820                    $info->getHiddenToggleButton());
 
 2822            $info->addSection(
"");
 
 2823            $info->addProperty(
"", $info->getHiddenToggleButton());
 
 2826        $info->addSection($this->lng->txt(
"tst_general_properties"));
 
 2827        if ($this->object->getShowInfo()) {
 
 2828            $info->addProperty($this->lng->txt(
"author"), $this->object->getAuthor());
 
 2829            $info->addProperty($this->lng->txt(
"title"), $this->object->getTitle());
 
 2831        if (!$this->object->getOfflineStatus() && $this->object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
 
 2833            if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read", 
"", $this->ref_id)) {
 
 2834                if ($this->object->getShowInfo() || !$this->object->getForceJS()) {
 
 2836                    $checked_javascript = 
false;
 
 2837                    if ($this->object->getJavaScriptOutput()) {
 
 2838                        $checked_javascript = 
true;
 
 2842                if (!$this->object->isRandomTest() && !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
 
 2843                    if ($this->object->getNrOfTries() != 1) {
 
 2844                        if ($this->object->getUsePreviousAnswers() == 0) {
 
 2845                            if ($this->object->getShowInfo()) {
 
 2846                                $info->addProperty($this->lng->txt(
"tst_use_previous_answers"), $this->lng->txt(
"tst_dont_use_previous_answers"));
 
 2849                            $use_previous_answers = 
false;
 
 2850                            if (
$ilUser->prefs[
"tst_use_previous_answers"]) {
 
 2851                                $checked_previous_answers = 
true;
 
 2853                            $info->addPropertyCheckbox($this->lng->txt(
"tst_use_previous_answers"), 
"chb_use_previous_answers", 1, $this->lng->txt(
"tst_use_previous_answers_user"), $checked_previous_answers);
 
 2860        $info->hideFurtherSections(
false);
 
 2862        if ($this->object->getShowInfo()) {
 
 2863            $info->addSection($this->lng->txt(
"tst_sequence_properties"));
 
 2864            $info->addProperty($this->lng->txt(
"tst_sequence"), $this->lng->txt(($this->object->getSequenceSettings() == 
TEST_FIXED_SEQUENCE)? 
"tst_sequence_fixed":
"tst_sequence_postpone"));
 
 2866            $info->addSection($this->lng->txt(
"tst_heading_scoring"));
 
 2867            $info->addProperty($this->lng->txt(
"tst_text_count_system"), $this->lng->txt(($this->object->getCountSystem() == 
COUNT_PARTIAL_SOLUTIONS)? 
"tst_count_partial_solutions":
"tst_count_correct_solutions"));
 
 2868            $info->addProperty($this->lng->txt(
"tst_score_mcmr_questions"), $this->lng->txt(($this->object->getMCScoring() == 
SCORE_ZERO_POINTS_WHEN_UNANSWERED)? 
"tst_score_mcmr_zero_points_when_unanswered":
"tst_score_mcmr_use_scoring_system"));
 
 2869            if ($this->object->isRandomTest()) {
 
 2870                $info->addProperty($this->lng->txt(
"tst_pass_scoring"), $this->lng->txt(($this->object->getPassScoring() == 
SCORE_BEST_PASS)? 
"tst_pass_best_pass":
"tst_pass_last_pass"));
 
 2873            $info->addSection($this->lng->txt(
"tst_score_reporting"));
 
 2874            $score_reporting_text = 
"";
 
 2875            switch ($this->object->getScoreReporting()) {
 
 2877                    $score_reporting_text = $this->lng->txt(
"tst_report_after_test");
 
 2880                    $score_reporting_text = $this->lng->txt(
"tst_report_after_first_question");
 
 2883                    $score_reporting_text = $this->lng->txt(
"tst_report_after_date");
 
 2886                    $score_reporting_text = $this->lng->txt(
"tst_report_after_passed");
 
 2889                    $score_reporting_text = $this->lng->txt(
"tst_report_never");
 
 2892            $info->addProperty($this->lng->txt(
"tst_score_reporting"), $score_reporting_text);
 
 2893            $reporting_date = $this->
object->getReportingDate();
 
 2894            if ($reporting_date) {
 
 2895                #preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches);
 
 2896                #$txt_reporting_date = date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]));
 
 2897                #$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date);
 
 2899                    $this->lng->txt(
'tst_score_reporting_date'),
 
 2904            $info->addSection($this->lng->txt(
"tst_session_settings"));
 
 2905            $info->addProperty($this->lng->txt(
"tst_nr_of_tries"), ($this->object->getNrOfTries() == 0)?$this->lng->txt(
"unlimited"):$this->object->getNrOfTries());
 
 2906            if ($this->object->getNrOfTries() != 1) {
 
 2907                $info->addProperty($this->lng->txt(
"tst_nr_of_tries_of_user"), (
$toolbar->getTestSession()->getPass() == 
false)?$this->lng->txt(
"tst_no_tries"):
$toolbar->getTestSequence()->getPass());
 
 2910            if ($this->object->getEnableProcessingTime()) {
 
 2911                $info->addProperty($this->lng->txt(
"tst_processing_time"), $this->object->getProcessingTime());
 
 2913            if (strlen($this->object->getAllowedUsers()) && ($this->object->getAllowedUsersTimeGap())) {
 
 2914                $info->addProperty($this->lng->txt(
"tst_allowed_users"), $this->object->getAllowedUsers());
 
 2917            $starting_time = $this->
object->getStartingTime();
 
 2918            if ($this->object->isStartingTimeEnabled() && $starting_time != 0) {
 
 2921            $ending_time = $this->
object->getEndingTime();
 
 2922            if ($this->object->isEndingTimeEnabled() && $ending_time != 0) {
 
 2925            $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
 
 2929        $this->ctrl->forwardCommand($info);
 
 2934        require_once 
'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
 
 2936        $qsaImportFails->deleteRegisteredImportFails();
 
 2938        require_once 
'Modules/Test/classes/class.ilTestSkillLevelThresholdImportFails.php';
 
 2940        $sltImportFails->deleteRegisteredImportFails();
 
 2942        $this->ctrl->redirect($this, 
'infoScreen');
 
 2948        $ilLocator = 
$DIC[
'ilLocator'];
 
 2949        switch ($this->ctrl->getCmd()) {
 
 2952            case "redirectToInfoScreen":
 
 2959            case "outCorrectSolution":
 
 2961            case "showAnswersOfUser":
 
 2962            case "outUserResultsOverview":
 
 2963            case "backFromSummary":
 
 2964            case "show_answers":
 
 2967            case "outTestSummary":
 
 2968            case "outQuestionSummary":
 
 2969            case "gotoQuestion":
 
 2970            case "selectImagemapRegion":
 
 2971            case "confirmSubmitAnswers":
 
 2972            case "finalSubmission":
 
 2974            case "outUserPassDetails":
 
 2975            case "checkPassword":
 
 2976                $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 
"infoScreen"), 
"", 
$_GET[
"ref_id"]);
 
 2979            case "evalAllUsers":
 
 2980            case "evalUserDetail":
 
 2981                $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 
"eval_stat"), 
"", 
$_GET[
"ref_id"]);
 
 2988            case "importVerifiedFile":
 
 2989            case "cancelImport":
 
 2992                $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 
""), 
"", 
$_GET[
"ref_id"]);
 
 3011        $output_gui = $guiFactory->create($this->
object);
 
 3013        $output_gui->certificateEditor();
 
 3024        $help = 
$DIC[
'ilHelp'];
 
 3025        $help->setScreenIdComponent(
"tst");
 
 3028            require_once 
'Services/Link/classes/class.ilLink.php';
 
 3030            $this->
getTabsManager()->setParentBackLabel($this->lng->txt(
'back_to_objective_container'));
 
 3042        $DIC->ctrl()->redirectByClass(
'ilObjTestGUI', 
"infoScreen");
 
 3056        $ilAccess = 
$DIC[
'ilAccess'];
 
 3060        if ($ilAccess->checkAccess(
"read", 
"", $a_target) || $ilAccess->checkAccess(
"visible", 
"", $a_target)) {
 
 3062            $_GET[
"baseClass"] = 
"ilObjTestGUI";
 
 3063            $_GET[
"cmd"] = 
"infoScreen";
 
 3064            $_GET[
"ref_id"] = $a_target;
 
 3065            include_once(
"ilias.php");
 
 3068        } elseif ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID)) {
 
 3070                $lng->txt(
"msg_no_perm_read_item"),
 
 3087        if ($this->create_question_mode) {
 
 3092        $ilToolbar = 
$DIC[
'ilToolbar'];
 
 3096        require_once 
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
 
 3098        $ilCtrl->saveParameter($this, 
'q_mode');
 
 3100        $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'test_express_mode', 1);
 
 3101        $ilCtrl->setParameter($this, 
'test_express_mode', 1);
 
 3102        $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'q_id', $_REQUEST[
'q_id']);
 
 3103        $ilCtrl->setParameter($this, 
'q_id', $_REQUEST[
'q_id']);
 
 3104        $ilToolbar->setFormAction(
$ilCtrl->getFormActionByClass(
'iltestexpresspageobjectgui', 
'edit'));
 
 3106        if ($this->object->evalTotalPersons() == 0) {
 
 3127            $ilToolbar->addFormButton(
$lng->txt(
"ass_create_question"), 
"addQuestion");
 
 3129            $ilToolbar->addSeparator();
 
 3131            if ($this->object->getPoolUsage()) {
 
 3132                require_once 
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
 
 3136                $show_separator = 
true;
 
 3140        $questions = $this->
object->getQuestionTitlesAndIndexes();
 
 3144        foreach ($questions as $id => $label) {
 
 3145            $options[$id] = $label . 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . $id . 
']';
 
 3148        $optionKeys = array_keys($options);
 
 3151            $options[] = 
$lng->txt(
'none');
 
 3177        if (count($questions)) {
 
 3178            if (isset($show_separator) && $show_separator) {
 
 3179                $ilToolbar->addSeparator();
 
 3183            $btn->setCaption(
"test_prev_question");
 
 3184            $btn->setUrl(
$ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui', 
'prevQuestion'));
 
 3185            $ilToolbar->addButtonInstance($btn);
 
 3187            if (count($options) <= 1 || $optionKeys[0] == $qid) {
 
 3188                $btn->setDisabled(
true);
 
 3192            $btn->setCaption(
"test_next_question");
 
 3193            $btn->setUrl(
$ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui', 
'nextQuestion'));
 
 3194            $ilToolbar->addButtonInstance($btn);
 
 3196            if (count($options) <= 1 || $optionKeys[count($optionKeys) - 1] == $qid) {
 
 3197                $btn->setDisabled(
true);
 
 3201        if (count($questions) > 1) {
 
 3202            $ilToolbar->addSeparator();
 
 3204            include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 3206            $si->addCustomAttribute(
"onChange=\"forms['ilToolbar'].submit();\"");
 
 3207            $si->setOptions($options);
 
 3210                $si->setValue($qid);
 
 3213            $ilToolbar->addInputItem(
$si, 
true);
 
 3216        $total = $this->
object->evalTotalPersons();
 
 3231        if (count($questions) && !
$total) {
 
 3232            $ilCtrl->setParameter($this, 
'q_id', $_REQUEST[
'q_id']);
 
 3233            $ilToolbar->addSeparator();
 
 3234            $ilToolbar->addButton(
$lng->txt(
"test_delete_page"), 
$ilCtrl->getLinkTarget($this, 
"removeQuestions"));
 
 3237        if (count($questions) > 1 && !
$total) {
 
 3238            $ilToolbar->addSeparator();
 
 3239            $ilToolbar->addButton(
$lng->txt(
"test_move_page"), 
$ilCtrl->getLinkTarget($this, 
"movePageForm"));
 
 3243        $ilAccess = 
$DIC[
'ilAccess'];
 
 3246        $online_access = 
false;
 
 3247        if ($this->object->getFixedParticipants()) {
 
 3248            include_once 
"./Modules/Test/classes/class.ilObjTestAccess.php";
 
 3250            if ($online_access_result === 
true) {
 
 3251                $online_access = 
true;
 
 3255        if (!$this->object->getOfflineStatus() && $this->object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
 
 3256            if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read", 
"", $this->ref_id)) {
 
 3257                $testSession = $this->testSessionFactory->getSession();
 
 3259                $executable = $this->
object->isExecutable($testSession, 
$ilUser->getId(), $allowPassIncrease = 
true);
 
 3261                if ($executable[
"executable"]) {
 
 3263                    $player_instance = $player_factory->getPlayerGUI();
 
 3265                    if ($testSession->getActiveId() > 0) {
 
 3266                        $ilToolbar->addSeparator();
 
 3267                        $ilToolbar->addButton(
$lng->txt(
'tst_resume_test'), 
$ilCtrl->getLinkTarget($player_instance, 
'resumePlayer'));
 
 3269                        $ilToolbar->addSeparator();
 
 3270                        $ilToolbar->addButton(
$lng->txt(
'tst_start_test'), 
$ilCtrl->getLinkTarget($player_instance, 
'startTest'));
 
 3280        $this->ctrl->redirect($this, 
'questions');
 
 3286        foreach ($questionIds as $q_id) {
 
 3288            $newIds[$q_id] = $newId;
 
 3300        require_once 
'Modules/TestQuestionPool/classes/class.assQuestion.php';
 
 3303        $newtitle = $question_gui->object->getTitle();
 
 3304        if ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle())) {
 
 3306            while ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle() . 
" ($counter)")) {
 
 3309            $newtitle = $question_gui->object->getTitle() . 
" ($counter)";
 
 3312        return $question_gui->object->createNewOriginalFromThisDuplicate($targetParentId, $newtitle);
 
 3321        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
 3323        if (!(
int) $_REQUEST[
'sel_qpl']) {
 
 3328        $qplId = $ilObjDataCache->lookupObjId($_REQUEST[
'sel_qpl']);
 
 3331        foreach (
$result->ids as $oldId => $newId) {
 
 3336                $oldOriginal->delete($oldOriginal->getId());
 
 3339            $questionInstance->setNewOriginalId($newId);
 
 3342        ilUtil::sendSuccess($this->lng->txt(
'tst_qst_added_to_pool_' . (count(
$result->ids) > 1 ? 
'p' : 
's')), 
true);
 
 3343        $this->ctrl->redirect($this, 
'questions');
 
 3350        include_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
 3354        $title->setRequired(
true);
 
 3355        $form->addItem($title);
 
 3358        $form->addItem($description);
 
 3360        $form->addCommandButton(
'createQuestionPoolAndCopy', 
$lng->txt(
'create'));
 
 3362        if (isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id'])) {
 
 3363            foreach ($_REQUEST[
'q_id'] as $id) {
 
 3365                $hidden->setValue($id);
 
 3366                $form->addItem($hidden);
 
 3383        require_once 
'Modules/TestQuestionPool/classes/class.assQuestion.php';
 
 3387            'copyAndLinkToQuestionpool' == $this->ctrl->getCmd() &&
 
 3388            (!isset($_REQUEST[
'q_id']) || !is_array($_REQUEST[
'q_id']))
 
 3391            $this->ctrl->redirect($this, 
'questions');
 
 3394        if (isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id'])) {
 
 3395            foreach ($_REQUEST[
'q_id'] as $q_id) {
 
 3402                if (
$type !== 
'tst') {
 
 3404                    $this->ctrl->redirect($this, 
'questions');
 
 3415        if ($_REQUEST[
'title']) {
 
 3416            $title = $_REQUEST[
'title'];
 
 3418            $title = $_REQUEST[
'txt_qpl'];
 
 3427        $_REQUEST[
'sel_qpl'] = 
$ref_id;
 
 3452        $questionpools = $this->
object->getAvailableQuestionpools(
 
 3461        if (count($questionpools) == 0) {
 
 3467                case 'copyQuestionsToPool':
 
 3470                case 'copyAndLinkQuestionsToPool':
 
 3472                    $hidden->setValue(1);
 
 3473                    $form->addItem($hidden);
 
 3478        $DIC->ui()->mainTemplate()->setContent($form->getHTML());
 
 3486        $form->setFormAction(
$DIC->ctrl()->getFormAction($this));
 
 3487        $form->addCommandButton($cmd, 
$DIC->language()->txt(
'submit'));
 
 3488        $form->addCommandButton(
'cancelCreateQuestion', 
$DIC->language()->txt(
'cancel'));
 
 3490        if (count($questionpools) == 0) {
 
 3491            $form->setTitle($this->lng->txt(
"tst_enter_questionpool"));
 
 3494            $title->setRequired(
true);
 
 3495            $form->addItem($title);
 
 3498            $form->addItem($description);
 
 3500            $form->setTitle($this->lng->txt(
"tst_select_questionpool"));
 
 3503                '' => 
$DIC->language()->txt(
'please_select')
 
 3506            foreach ($questionpools as $key => $value) {
 
 3507                $selectOptions[$key] = $value[
"title"];
 
 3511            $select->setRequired(
true);
 
 3512            $select->setOptions($selectOptions);
 
 3514            $form->addItem($select);
 
 3517        if (isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id'])) {
 
 3518            foreach ($_REQUEST[
'q_id'] as $id) {
 
 3520                $hidden->setValue($id);
 
 3521                $form->addItem($hidden);
 
 3533        $simpleSetters = array(
 
 3536            'use_pool' => 
'setPoolUsage',
 
 3537            'question_set_type' => 
'setQuestionSetType',
 
 3540            'intro_enabled' => 
'setIntroductionEnabled',
 
 3541            'showinfo' => 
'setShowInfo',
 
 3544            'chb_starting_time' => 
'setStartingTimeEnabled',
 
 3545            'chb_ending_time' => 
'setEndingTimeEnabled',
 
 3546            'password_enabled' => 
'setPasswordEnabled',
 
 3547            'fixedparticipants' => 
'setFixedParticipants',
 
 3548            'limitUsers' => 
'setLimitUsersEnabled',
 
 3551            'nr_of_tries' => 
'setNrOfTries',
 
 3552            'chb_processing_time' => 
'setEnableProcessingTime',
 
 3553            'kiosk' => 
'setKiosk',
 
 3554            'examid_in_test_pass' => 
'setShowExamIdInTestPassEnabled',
 
 3557            'title_output' => 
'setTitleOutput',
 
 3559            'chb_shuffle_questions' => 
'setShuffleQuestions',
 
 3560            'offer_hints' => 
'setOfferingQuestionHintsEnabled',
 
 3561            'instant_feedback_contents' => 
'setInstantFeedbackOptionsByArray',
 
 3562            'instant_feedback_trigger' => 
'setForceInstantFeedbackEnabled',
 
 3563            'answer_fixation_handling' => 
null, 
 
 3564            'obligations_enabled' => 
'setObligationsEnabled',
 
 3567            'chb_use_previous_answers' => 
'setUsePreviousAnswers',
 
 3568            'chb_show_cancel' => 
'setShowCancel',
 
 3569            'chb_postpone' => 
'setPostponingEnabled',
 
 3570            'list_of_questions' => 
'setListOfQuestionsSettings',
 
 3571            'chb_show_marker' => 
'setShowMarker',
 
 3574            'enable_examview' => 
'setEnableExamview',
 
 3575            'showfinalstatement' => 
'setShowFinalStatement',
 
 3576            'redirection_enabled' => 
null, 
 
 3577            'sign_submission' => 
'setSignSubmission',
 
 3578            'mailnotification' => 
'setMailNotification',
 
 3581            'count_system' => 
'setCountSystem',
 
 3582            'mc_scoring' => 
'setMCScoring',
 
 3583            'score_cutting' => 
'setScoreCutting',
 
 3584            'pass_scoring' => 
'setPassScoring',
 
 3585            'pass_deletion_allowed' => 
'setPassDeletionAllowed',
 
 3588            'results_access_enabled' => 
'setScoreReporting',
 
 3589            'grading_status' => 
'setShowGradingStatusEnabled',
 
 3590            'grading_mark' => 
'setShowGradingMarkEnabled',
 
 3593            'solution_details' => 
'setShowSolutionDetails',
 
 3594            'solution_feedback' => 
'setShowSolutionFeedback',
 
 3595            'solution_suggested' => 
'setShowSolutionSuggested',
 
 3596            'solution_printview' => 
'setShowSolutionPrintview',
 
 3597            'highscore_enabled' => 
'setHighscoreEnabled',
 
 3598            'solution_signature' => 
'setShowSolutionSignature',
 
 3599            'examid_in_test_res' => 
'setShowExamIdInTestResultsEnabled',
 
 3600            'exp_sc_short' => 
'setExportSettingsSingleChoiceShort',
 
 3603            'anonymity' => 
'setAnonymity',
 
 3604            'enable_archiving' => 
'setEnableArchiving' 
 3607        if (!$templateData[
'results_presentation'][
'value']) {
 
 3608            $templateData[
'results_presentation'][
'value'] = array();
 
 3611        foreach ($simpleSetters as $field => $setter) {
 
 3612            if ($templateData[$field] && strlen($setter)) {
 
 3613                $object->$setter($templateData[$field][
'value']);
 
 3619                    if ($templateData[$field][
'value'] > 0) {
 
 3621                        $object->setAutosaveIval($templateData[$field][
'value'] * 1000);
 
 3627                case 'redirection_enabled':
 
 3636                    if (strlen($templateData[$field][
'value'])) {
 
 3638                        $object->setRedirectionUrl($templateData[$field][
'value']);
 
 3641                        $object->setRedirectionUrl(
'');
 
 3645                case 'answer_fixation_handling':
 
 3646                    switch ($templateData[$field][
'value']) {
 
 3648                            $object->setInstantFeedbackAnswerFixationEnabled(
false);
 
 3649                            $object->setFollowupQuestionAnswerFixationEnabled(
false);
 
 3653                            $object->setInstantFeedbackAnswerFixationEnabled(
true);
 
 3654                            $object->setFollowupQuestionAnswerFixationEnabled(
false);
 
 3658                            $object->setInstantFeedbackAnswerFixationEnabled(
false);
 
 3659                            $object->setFollowupQuestionAnswerFixationEnabled(
true);
 
 3663                            $object->setInstantFeedbackAnswerFixationEnabled(
true);
 
 3664                            $object->setFollowupQuestionAnswerFixationEnabled(
true);
 
 3675        $ilAccess = 
$DIC[
'ilAccess'];
 
 3676        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 3679            $this->ctrl->redirect($this, 
"infoScreen");
 
 3685        $orders = $obligations = array();
 
 3687        foreach ((array) $_REQUEST[
'order'] as $qId => $order) {
 
 3688            $id = (int) str_replace(
'q_', 
'', $qId);
 
 3690            $orders[$id] = $order;
 
 3693        if ($this->object->areObligationsEnabled() && isset($_REQUEST[
'obligatory']) && is_array($_REQUEST[
'obligatory'])) {
 
 3694            foreach ($_REQUEST[
'obligatory'] as $qId => $obligation) {
 
 3695                $id = (int) str_replace(
'q_', 
'', $qId);
 
 3698                    $obligations[$id] = $obligation;
 
 3703        $this->
object->setQuestionOrderAndObligations(
 
 3708        ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'), 
true);
 
 3709        $ilCtrl->redirect($this, 
'questions');
 
 3722        include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
 3724        $form->setFormAction(
$ilCtrl->getFormAction($this, 
"movePage"));
 
 3725        $form->setTitle(
$lng->txt(
"test_move_page"));
 
 3728        $old_pos->setValue($_REQUEST[
'q_id']);
 
 3729        $form->addItem($old_pos);
 
 3731        $questions = $this->
object->getQuestionTitlesAndIndexes();
 
 3732        if (!is_array($questions)) {
 
 3733            $questions = array();
 
 3736        foreach ($questions as $k => $q) {
 
 3737            if ($k == $_REQUEST[
'q_id']) {
 
 3738                unset($questions[$k]);
 
 3741            $questions[$k] = 
$lng->txt(
'behind') . 
' ' . $q;
 
 3743        #$questions['0'] = $lng->txt('first'); 
 3746            0 => 
$lng->txt(
'first')
 
 3748        foreach ($questions as $k => $q) {
 
 3749            $options[$k] = $q . 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . $k . 
']';
 
 3753        $pos->setOptions($options);
 
 3754        $form->addItem($pos);
 
 3756        $form->addCommandButton(
"movePage", 
$lng->txt(
"submit"));
 
 3757        $form->addCommandButton(
"showPage", 
$lng->txt(
"cancel"));
 
 3759        return $tpl->setContent($form->getHTML());
 
 3765        $ilAccess = 
$DIC[
'ilAccess'];
 
 3766        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 3769            $this->ctrl->redirect($this, 
"infoScreen");
 
 3772        $this->
object->moveQuestionAfter($_REQUEST[
'q_id'], $_REQUEST[
'position_after']);
 
 3781        $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'q_id', $_REQUEST[
'q_id']);
 
 3782        $ilCtrl->redirectByClass(
'iltestexpresspageobjectgui', 
'showPage');
 
 3788        $ilAccess = 
$DIC[
'ilAccess'];
 
 3789        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 3792            $this->ctrl->redirect($this, 
"infoScreen");
 
 3795        if ($_REQUEST[
'q_id'] && !is_array($_REQUEST[
'q_id'])) {
 
 3796            $ids = array($_REQUEST[
'q_id']);
 
 3797        } elseif ($_REQUEST[
'q_id']) {
 
 3798            $ids = $_REQUEST[
'q_id'];
 
 3801            $this->ctrl->redirect($this, 
'questions');
 
 3806        $questionTitles = $this->
object->getQuestionTitles();
 
 3808        foreach ($ids as $id) {
 
 3809            include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
 3812                $title = $question->object->getTitle();
 
 3814                while (in_array($title . 
' (' . 
$i . 
')', $questionTitles)) {
 
 3818                $title .= 
' (' . 
$i . 
')';
 
 3820                $questionTitles[] = $title;
 
 3822                $new_id = $question->object->duplicate(
false, $title);
 
 3825                $clone->object->setObjId($this->object->getId());
 
 3826                $clone->object->saveToDb();
 
 3828                $this->
object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $new_id, 
true);
 
 3834        ilUtil::sendSuccess($this->lng->txt(
'copy_questions_success'), 
true);
 
 3836        $this->ctrl->redirect($this, 
'questions');
 
 3841        require_once 
'Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
 3846        $this->objectiveOrientedContainer->setObjId($containerObjId);
 
 3847        $this->objectiveOrientedContainer->setRefId($containerRefId);
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
const QT_MULTIPLE_CHOICE_MR
const QT_ORDERING_HORIZONTAL
const QT_MULTIPLE_CHOICE_SR
Basic GUI class for assessment questions.
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
const RENDER_PURPOSE_PRINT_PDF
const EDIT_CONTEXT_AUTHORING
const RENDER_PURPOSE_PREVIEW
static _getOriginalId($question_id)
Returns the original id of a question.
static instantiateQuestionGUI($a_question_id)
Creates an instance of a question gui with a given question id.
static originalQuestionExists($questionId)
const ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT
constant for additional content editing mode "default"
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
static _needsManualScoring($question_id)
static & _instanciateQuestionGUI($question_id)
Creates an instance of a question gui with a given question id.
static lookupParentObjId($questionId)
@global ilDBInterface $ilDB
const ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT
constant for additional content editing mode "pageobject"
static _instanciateQuestion($question_id)
Creates an instance of a question with a given question id.
Generic feedback page GUI class.
Specific feedback page GUI class.
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
static setUseRelativeDates($a_status)
set use relative dates
static useRelativeDates()
check if relative dates are used
@classDescription Date and time handling
static isObjectiveTest($a_trst_ref_id)
Check if test ref_id is used in an objective course.
GUI class for LTI provider object settings.
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
Class ilLocalUnitConfigurationGUI.
static getSettingsTemplateConfig()
static isAdditionalQuestionContentEditingModePageObjectEnabled()
returns the fact wether content editing with ilias page editor is enabled for questions or not
static _getLog($ts_from, $ts_to, $test_id, $test_only=false)
Retrieve assessment log datasets from the database.
static getQuestionTypeByTypeId($type_id)
static _getAvailableQuestionpools($use_object_id=false, $equal_points=false, $could_be_offline=false, $showPath=false, $with_questioncount=false, $permission="read", $usr_id="")
Returns the available question pools for the active user.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
static _lookupOnlineTestAccess($a_test_id, $a_user_id)
Checks if a user is allowd to run an online exam.
importFileObject($parent_id=null, $a_catch_errors=true)
form for new test object import
trackTestObjectReadEvent()
createQuestionObject()
Called when a new question should be created from a test.
createQuestionpoolTargetObject($cmd)
Called when a new question should be created from a test Important: $cmd may be overwritten if no que...
browseForQuestionsObject()
download_paragraphObject()
download source code paragraph
setTestAccess($testAccess)
printobject()
Print tab to create a print of all questions with points and solutions.
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
userResultsGatewayObject()
backObject()
Called when the back button in the question browser was pressed.
removeQuestionsForm($checked_questions)
Displays a form to confirm the removal of questions from the test.
$objectiveOrientedContainer
insertQuestionsBeforeObject()
Insert checked questions before the actual selection.
cancelRemoveQuestionsObject()
Cancels the removal of questions from the test.
createQuestionPool($name="dummy", $description="")
Creates a new questionpool and returns the reference id.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
static $infoScreenChildClasses
copyAndLinkQuestionsToPoolObject()
@global ilObjectDataCache $ilObjDataCache
addDidacticTemplateOptions(array &$a_options)
Add custom templates.
createQuestionPoolAndCopyObject()
afterSave(ilObject $a_new_object)
save object @access public
movePageFormObject()
Move current page.
prepareSubGuiOutput()
prepares ilias to get output rendered by sub gui class
buildPageViewToolbar($qid=0)
Questions per page.
participantsActionObject()
Evaluates the actions on the participants page.
isCommandClassAnyInfoScreenChild()
executeCreateQuestionObject()
Called when a new question should be created from a test after confirmation.
executeCommand()
execute command
insertQuestionsObject()
Insert questions from the questionbrowser into the test.
fetchAuthoringQuestionIdParameter()
getObjectiveOrientedContainer()
determineObjectiveOrientedContainer()
static _goto($a_target)
Redirect script to call a test with the test reference id.
copyQuestionToPool($sourceQuestionId, $targetParentId)
$testQuestionSetConfigFactory
cancelRandomSelectObject()
insertRandomSelectionObject()
Inserts a random selection into the test.
applyDefaultsObject($confirmed=false)
Applies the selected test defaults.
removeQuestionsObject()
Called when a selection of questions should be removed from the test.
createRandomSelectionObject()
downloadFileObject()
download file
copyQuestionsToPoolObject()
importVerifiedFileObject()
imports question(s) into the questionpool (after verification)
setTabsManager($tabsManager)
copyToQuestionpoolObject()
uploadObject($redirect=true)
display status information or report errors messages in case of error
moveQuestionsObject()
Marks selected questions for moving.
copyAndLinkToQuestionpoolObject()
getTabs()
adds tabs to tab gui object
questionsTabGatewayObject()
fullscreenObject()
show fullscreen view
redirectTo_ilObjTestSettingsGeneralGUI_showForm_Object()
confirmRemoveQuestionsObject()
Remove questions from the test after confirmation.
redirectToInfoScreenObject()
getTargetQuestionpoolForm($questionpools, $cmd)
cancelCreateQuestionObject()
Called when the creation of a new question is cancelled.
populateQuestionBrowserToolbarButtons(ilToolbarGUI $toolbar, $context)
__construct($refId=null)
Constructor @access public.
reviewobject()
Review tab to create a print of all questions without points and solutions.
initImportForm($a_new_type)
Init object import form.
exportObject()
Gateway for exports initiated from workspace, as there is a generic forward to {objTypeMainGUI}::expo...
deleteDefaultsObject()
Deletes selected test defaults.
historyObject()
Creates the change history for a test.
uploadTstObject()
imports test and question(s)
insertQuestionsAfterObject()
Insert checked questions after the actual selection.
getQuestionpoolCreationForm()
copyQuestionsToPool($questionIds, $qplId)
applyTemplate($templateData, ilObjTest $object)
resetFilterObject()
Resets the filter for the question browser.
removeImportFailsObject()
saveOrderAndObligationsObject()
confirmedApplyDefaultsObject()
addDefaultsObject()
Adds the defaults of this test to the defaults.
filterObject()
Sets the filter for the question browser.
certificateObject()
Shows the certificate editor.
static accessViolationRedirect()
const ANSWER_FIXATION_ON_IFB_OR_FUQST
const ANSWER_FIXATION_ON_INSTANT_FEEDBACK
const ANSWER_FIXATION_NONE
const CMD_SHOW_FORM
command constants
const ANSWER_FIXATION_ON_FOLLOWUP_QUESTION
const QUESTION_SET_TYPE_DYNAMIC
type setting value for dynamic question set (continues testing mode)
static _getTestDefaults($test_defaults_id)
const QUESTION_SET_TYPE_RANDOM
type setting value for random question set
const SCORE_REPORTING_IMMIDIATLY
const QUESTION_SET_TYPE_FIXED
type setting value for fixed question set
const SCORE_REPORTING_FINISHED
const SCORE_REPORTING_AFTER_PASSED
static _setImportDirectory($a_import_dir=null)
set import directory
static _getImportDirectory()
Get the import directory location of the test.
static isQuestionObligationPossible($questionId)
checks wether the obligation for question with given id is possible or not
static _createImportDirectory()
creates data directory for import files (data_dir/tst_data/tst_<id>/import, depending on data directo...
const SCORE_REPORTING_DATE
GUI class for the workflow of copying objects.
Class ilObjectGUI Basic methods of all Output classes.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
prepareOutput($a_show_subobjects=true)
prepare output
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
addHeaderAction()
Add header action menu.
createObject()
create new object form
setTitleAndDescription()
called by prepare output
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
getRefId()
get reference id @access public
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
static prepareGenerationRequest($service, $purpose)
Prepare the content processing for a PDF generation request This function should be called as in a re...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
Settings template application class.
static getAllSettingsTemplates($a_type, $a_include_auto_generated=false)
Get all settings templates of type.
special template class to simplify handling of ITX/PEAR
Output class for assessment test evaluation.
Base Exception for all Exceptions relating to Modules/Test.
Export User Interface Class.
@ilCtrl_Calls ilTestExpressPageObjectGUI: assMultipleChoiceGUI, assClozeTestGUI, assMatchingQuestionG...
static generatePDF($pdf_output, $output_mode, $filename=null, $purpose=null)
const PDF_OUTPUT_DOWNLOAD
Class ilTestPersonalDefaultSettingsTableGUI.
const CMD_BROWSE_QUESTIONS
Class ilTestRandomQuestionSelectionTableGUI.
Test results import parser.
ilTestScoringByQuestionsGUI
Service GUI class for tests.
const SUBTAB_ID_QST_LIST_VIEW
const SUBTAB_ID_QST_PAGE_VIEW
const TAB_ID_LEARNING_PROGRESS
This class represents a text area property in a property form.
This class represents a text property in a property form.
Class ilUnitConfigurationRepository.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static infoPanel($a_keep=true)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
static setTokenMaxLifetimeInSeconds($token_max_lifetime_in_seconds)
const CLOZE_TEST_IDENTIFIER
Question identifier constants.
const REDIRECT_NONE
Redirect after finishing test constants.
const FLASHAPPLET_QUESTION_IDENTIFIER
const IMAGEMAP_QUESTION_IDENTIFIER
const SINGLE_CHOICE_QUESTION_IDENTIFIER
const FORMULA_QUESTION_IDENTIFIER
const ERROR_TEXT_IDENTIFIER
const SCORE_ZERO_POINTS_WHEN_UNANSWERED
const TEXTSUBSET_QUESTION_IDENTIFIER
const COUNT_PARTIAL_SOLUTIONS
const NUMERIC_QUESTION_IDENTIFIER
const JAVAAPPLET_QUESTION_IDENTIFIER
const TEST_FIXED_SEQUENCE
Test constants.
const FILE_UPLOAD_IDENTIFIER
const TEXT_QUESTION_IDENTIFIER
const PDF_PRINT_VIEW_QUESTIONS
const LONG_MENU_QUESTION_IDENTIFIER
const KPRIM_CHOICE_QUESTION_IDENTIFIER
const ORDERING_HORIZONTAL_IDENTIFIER
const MATCHING_QUESTION_IDENTIFIER
const MULTIPLE_CHOICE_QUESTION_IDENTIFIER
const ORDERING_QUESTION_IDENTIFIER
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
redirection script todo: (a better solution should control the processing via a xml file)