18require_once 
'./Modules/Test/exceptions/class.ilTestException.php';
 
   19require_once 
'./Services/Object/classes/class.ilObjectGUI.php';
 
   20require_once 
'./Modules/Test/classes/inc.AssessmentConstants.php';
 
   21require_once 
'./Modules/Test/classes/class.ilObjAssessmentFolderGUI.php';
 
   22require_once 
'./Modules/Test/classes/class.ilObjAssessmentFolder.php';
 
   23require_once 
'./Modules/Test/classes/class.ilTestExpressPage.php';
 
   24require_once 
'Modules/OrgUnit/classes/Positions/Operation/class.ilOrgUnitOperation.php';
 
   25require_once 
'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
 
   69        'ilpublicuserprofilegui', 
'ilobjportfoliogui' 
  114        $ilCtrl = 
$DIC[
'ilCtrl'];
 
  116        $refinery = 
$DIC[
'refinery'];
 
  117        $ilPluginAdmin = 
$DIC[
'ilPluginAdmin'];
 
  119        $lng->loadLanguageModule(
"assessment");
 
  121        $this->
error = $DIC[
'ilErr'];
 
  122        $this->ctrl = $ilCtrl;
 
  123        $this->ctrl->saveParameter($this, array(
"ref_id", 
"test_ref_id", 
"calling_test", 
"test_express_mode", 
"q_id"));
 
  124        if (isset(
$_GET[
'ref_id']) && is_numeric(
$_GET[
'ref_id'])) {
 
  129        if ($this->
object instanceof 
ilObjTest) {
 
  130            require_once 
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
 
  133            require_once 
'Modules/Test/classes/class.ilTestPlayerFactory.php';
 
  136            require_once 
'Modules/Test/classes/class.ilTestSessionFactory.php';
 
  139            require_once 
'Modules/Test/classes/class.ilTestSequenceFactory.php';
 
  142            require_once 
'Modules/Test/classes/class.ilTestAccess.php';
 
  146        require_once 
'Modules/Test/classes/class.ilTestObjectiveOrientedContainer.php';
 
  149        if ($this->
object instanceof 
ilObjTest) {
 
  150            require_once 
'Modules/Test/classes/class.ilTestTabsManager.php';
 
  153            $tabsManager->setTestSession($this->testSessionFactory->getSession());
 
  154            $tabsManager->setTestQuestionSetConfig($this->testQuestionSetConfigFactory->getQuestionSetConfig());
 
  166        $ilAccess = 
$DIC[
'ilAccess'];
 
  167        $ilNavigationHistory = 
$DIC[
'ilNavigationHistory'];
 
  168        $ilCtrl = 
$DIC[
'ilCtrl'];
 
  172        $ilTabs = 
$DIC[
'ilTabs'];
 
  173        $ilPluginAdmin = 
$DIC[
'ilPluginAdmin'];
 
  176        $ilias = 
$DIC[
'ilias'];
 
  179        $cmd = $this->ctrl->getCmd(
"infoScreen");
 
  181        $cmdsDisabledDueToOfflineStatus = array(
 
  182            'resumePlayer', 
'resumePlayer', 
'outUserResultsOverview', 
'outUserListOfAnswerPasses' 
  185        if (!$this->
getCreationMode() && $this->object->getOfflineStatus() && in_array($cmd, $cmdsDisabledDueToOfflineStatus)) {
 
  189        $next_class = $this->ctrl->getNextClass($this);
 
  190        $this->ctrl->setReturn($this, 
"infoScreen");
 
  194            $ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"])
 
  196            $ilNavigationHistory->addItem(
 
  198                "ilias.php?baseClass=ilObjTestGUI&cmd=infoScreen&ref_id=" . 
$_GET[
"ref_id"],
 
  204        if ($_REQUEST[
'prev_qid']) {
 
  205            global $___prev_question_id;
 
  206            $___prev_question_id = $_REQUEST[
'prev_qid'];
 
  207            $this->ctrl->setParameter($this, 
'prev_qid', $_REQUEST[
'prev_qid']);
 
  210        if (!$this->
getCreationMode() && $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken()) {
 
  211            if (!$this->testQuestionSetConfigFactory->getQuestionSetConfig()->isValidRequestOnBrokenQuestionSetDepencies($next_class, $cmd)) {
 
  212                $this->ctrl->redirectByClass(
'ilObjTestGUI', 
'infoScreen');
 
  218        switch ($next_class) {
 
  219            case 'illtiproviderobjectsettinggui':
 
  220                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  226                $this->tabsManager->getSettingsSubTabs();
 
  227                $GLOBALS[
'DIC']->tabs()->activateTab(
'settings');
 
  228                $GLOBALS[
'DIC']->tabs()->activateSubTab(
'lti_provider');
 
  230                $lti_gui->setCustomRolesForSelection(
$GLOBALS[
'DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
 
  231                $lti_gui->offerLTIRolesForSelection(
false);
 
  232                $this->ctrl->forwardCommand($lti_gui);
 
  236            case 'iltestexportgui':
 
  237                if (!$ilAccess->checkAccess(
'write', 
'', $this->ref_id)) {
 
  245                require_once 
'Modules/Test/classes/class.ilTestExportGUI.php';
 
  249            case "ilinfoscreengui":
 
  250                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]) && !$ilAccess->checkAccess(
"visible", 
"", 
$_GET[
"ref_id"])) {
 
  258            case 'ilobjectmetadatagui':
 
  259                if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  267                include_once 
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
 
  269                $this->ctrl->forwardCommand($md_gui);
 
  272            case 'iltestdashboardgui':
 
  273                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  280                require_once 
'Modules/Test/classes/class.ilTestDashboardGUI.php';
 
  284                    $this->testQuestionSetConfigFactory->getQuestionSetConfig()
 
  291                $this->ctrl->forwardCommand($gui);
 
  294            case 'iltestresultsgui':
 
  295                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  302                require_once 
'Modules/Test/classes/class.ilTestResultsGUI.php';
 
  306                    $this->testQuestionSetConfigFactory->getQuestionSetConfig()
 
  310                $gui->setTestSession($this->testSessionFactory->getSession());
 
  314                $this->ctrl->forwardCommand($gui);
 
  317            case "iltestplayerfixedquestionsetgui":
 
  318                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  323                require_once 
"./Modules/Test/classes/class.ilTestPlayerFixedQuestionSetGUI.php";
 
  324                if (!$this->object->getKioskMode()) {
 
  329                $this->ctrl->forwardCommand($gui);
 
  332            case "iltestplayerrandomquestionsetgui":
 
  333                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  338                require_once 
"./Modules/Test/classes/class.ilTestPlayerRandomQuestionSetGUI.php";
 
  339                if (!$this->object->getKioskMode()) {
 
  344                $this->ctrl->forwardCommand($gui);
 
  347            case "iltestplayerdynamicquestionsetgui":
 
  348                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  353                require_once 
"./Modules/Test/classes/class.ilTestPlayerDynamicQuestionSetGUI.php";
 
  354                if (!$this->object->getKioskMode()) {
 
  359                $this->ctrl->forwardCommand($gui);
 
  362            case "iltestevaluationgui":
 
  363                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  370            case "iltestevalobjectiveorientedgui":
 
  371                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  375                $this->forwardToEvalObjectiveOrientedGUI();
 
  378            case "iltestservicegui":
 
  379                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  385                require_once 
"./Modules/Test/classes/class.ilTestServiceGUI.php";
 
  387                $this->ctrl->forwardCommand($serviceGUI);
 
  390            case 'ilpermissiongui':
 
  391                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  398                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  400                $ret = $this->ctrl->forwardCommand($perm_gui);
 
  403            case "illearningprogressgui":
 
  404                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  411                require_once 
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
 
  413                $this->ctrl->forwardCommand($new_gui);
 
  417            case "ilcertificategui":
 
  418                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  428                $output_gui = $guiFactory->create($this->
object);
 
  430                $this->ctrl->forwardCommand($output_gui);
 
  433            case "iltestscoringgui":
 
  434                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  440                require_once 
"./Modules/Test/classes/class.ilTestScoringGUI.php";
 
  443                $this->ctrl->forwardCommand($output_gui);
 
  446            case 'ilmarkschemagui':
 
  447                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  451                if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  453                    $this->ctrl->redirect($this, 
'infoScreen');
 
  457                require_once 
'Modules/Test/classes/class.ilMarkSchemaGUI.php';
 
  459                $this->ctrl->forwardCommand($mark_schema_gui);
 
  462            case 'iltestscoringbyquestionsgui':
 
  463                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  469                include_once 
'Modules/Test/classes/class.ilTestScoringByQuestionsGUI.php';
 
  472                $this->ctrl->forwardCommand($output_gui);
 
  475            case 'ilobjtestsettingsgeneralgui':
 
  476                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  482                require_once 
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
 
  493                $this->ctrl->forwardCommand($gui);
 
  496            case 'ilobjtestsettingsscoringresultsgui':
 
  497                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  503                require_once 
'Modules/Test/classes/class.ilObjTestSettingsScoringResultsGUI.php';
 
  513                $this->ctrl->forwardCommand($gui);
 
  516            case 'ilobjtestfixedquestionsetconfiggui':
 
  517                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  523                require_once 
'Modules/Test/classes/class.ilTestFixedQuestionSetConfigGUI.php';
 
  525                $this->ctrl->forwardCommand($gui);
 
  528            case 'iltestrandomquestionsetconfiggui':
 
  529                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  535                require_once 
'Modules/Test/classes/class.ilTestRandomQuestionSetConfigGUI.php';
 
  549                    ))->withContextId($this->object->getId())
 
  551                $this->ctrl->forwardCommand($gui);
 
  554            case 'ilobjtestdynamicquestionsetconfiggui':
 
  555                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  561                require_once 
'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfigGUI.php';
 
  563                $this->ctrl->forwardCommand($gui);
 
  566            case 'iltestquestionbrowsertablegui':
 
  567                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  587                $gui->setWriteAccess($ilAccess->checkAccess(
"write", 
"", $this->ref_id));
 
  589                $this->ctrl->forwardCommand($gui);
 
  592            case 'iltestskilladministrationgui':
 
  593                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  599                require_once 
'Modules/Test/classes/class.ilTestSkillAdministrationGUI.php';
 
  600                $gui = 
new ilTestSkillAdministrationGUI($ilias, $this->ctrl, $ilAccess, $ilTabs, $this->tpl, $this->lng, $this->refinery, 
$ilDB, 
$tree, $ilPluginAdmin, $this->
object, $this->ref_id);
 
  601                $this->ctrl->forwardCommand($gui);
 
  604            case 'ilobjectcopygui':
 
  605                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  611                require_once 
'./Services/Object/classes/class.ilObjectCopyGUI.php';
 
  614                $this->ctrl->forwardCommand($cp);
 
  617            case 'ilpageeditorgui':
 
  618            case 'iltestexpresspageobjectgui':
 
  619            if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  626                require_once 
'Modules/TestQuestionPool/classes/class.ilAssIncompleteQuestionPurger.php';
 
  628                $incompleteQuestionPurger->setOwnerId(
$ilUser->getId());
 
  629                $incompleteQuestionPurger->purge();
 
  638                if (!in_array($cmd, array(
'addQuestion', 
'browseForQuestions'))) {
 
  642                if (!$qid || in_array($cmd, array(
'insertQuestions', 
'browseForQuestions'))) {
 
  643                    require_once 
"./Modules/Test/classes/class.ilTestExpressPageObjectGUI.php";
 
  646                    $ret = &$this->ctrl->forwardCommand($pageObject);
 
  647                    $this->tpl->setContent(
$ret);
 
  650                require_once 
"./Services/Style/Content/classes/class.ilObjStyleSheet.php";
 
  651                $this->tpl->setCurrentBlock(
"ContentStyle");
 
  652                $this->tpl->setVariable(
 
  653                    "LOCATION_CONTENT_STYLESHEET",
 
  656                $this->tpl->parseCurrentBlock();
 
  659                $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  660                $this->tpl->setVariable(
 
  661                    "LOCATION_SYNTAX_STYLESHEET",
 
  664                $this->tpl->parseCurrentBlock();
 
  665                require_once 
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
 
  669                    $this->ctrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'q_id', 
'');
 
  670                    $this->ctrl->redirectByClass(
'iltestexpresspageobjectgui', $this->ctrl->getCmd());
 
  675                $q_gui->outAdditionalOutput();
 
  676                $q_gui->object->setObjId($this->object->getId());
 
  678                $q_gui->setTargetGuiClass(
null);
 
  679                $q_gui->setQuestionActionCmd(
null);
 
  681                $question = $q_gui->object;
 
  682                $this->ctrl->saveParameter($this, 
"q_id");
 
  684                #$this->lng->loadLanguageModule("content");
 
  685                $this->ctrl->setReturnByClass(
"ilTestExpressPageObjectGUI", 
"view");
 
  686                $this->ctrl->setReturn($this, 
"questions");
 
  688                require_once 
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php";
 
  689                require_once 
"./Modules/Test/classes/class.ilTestExpressPageObjectGUI.php";
 
  693                $page_gui->setEditPreview(
true);
 
  694                $page_gui->setEnabledTabs(
false);
 
  695                if (strlen($this->ctrl->getCmd()) == 0) {
 
  696                    $this->ctrl->setCmdClass(get_class($page_gui));
 
  697                    $this->ctrl->setCmd(
"preview");
 
  700                $page_gui->setQuestionHTML(array($q_gui->object->getId() => $q_gui->getPreview(
true)));
 
  701                $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
 
  703                $page_gui->setOutputMode($this->object->evalTotalPersons() == 0 ? 
"edit" : 
'preview');
 
  705                $page_gui->setHeader($question->getTitle());
 
  706                $page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this, 
"downloadFile"));
 
  707                $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, 
"fullscreen"));
 
  708                $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this));
 
  709                $page_gui->setPresentationTitle($question->getTitle() . 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . $question->getId() . 
']');
 
  710                $ret = $this->ctrl->forwardCommand($page_gui);
 
  716                $ilTabs = 
$DIC[
'ilTabs'];
 
  717                $ilTabs->activateTab(
'assQuestions');
 
  721            case 'ilassquestionpreviewgui':
 
  722                if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  727                $this->ctrl->saveParameter($this, 
"q_id");
 
  740                $gui->initPreviewSettings($this->object->getRefId());
 
  741                $gui->initPreviewSession(
$ilUser->getId(), (
int) 
$_GET[
'q_id']);
 
  742                $gui->initHintTracking();
 
  743                $gui->initStyleSheets();
 
  745                $this->ctrl->forwardCommand($gui);
 
  749            case 'ilassquestionpagegui':
 
  750                if ($cmd == 
'finishEditing') {
 
  751                    $this->ctrl->redirectByClass(
'ilassquestionpreviewgui', 
'show');
 
  754                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  758                if ($cmd === 
'edit' && !$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  763                require_once 
'Modules/Test/classes/class.ilAssQuestionPageCommandForwarder.php';
 
  765                $forwarder->setTestObj($this->
object);
 
  766                $forwarder->forward();
 
  769            case 'ilassspecfeedbackpagegui':
 
  770                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  774                require_once 
"./Modules/TestQuestionPool/classes/feedback/class.ilAssSpecFeedbackPageGUI.php";
 
  776                $this->ctrl->forwardCommand($pg_gui);
 
  779            case 'ilassgenfeedbackpagegui':
 
  780                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  784                require_once 
"./Modules/TestQuestionPool/classes/feedback/class.ilAssGenFeedbackPageGUI.php";
 
  786                $this->ctrl->forwardCommand($pg_gui);
 
  789            case 'illocalunitconfigurationgui':
 
  790                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  797                $this->ctrl->setReturn($this, 
"questions");
 
  800                require_once 
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
 
  802                $questionGUI->object->setObjId($this->object->getId());
 
  803                $questionGUI->setQuestionTabs();
 
  805                require_once 
'Modules/TestQuestionPool/classes/class.ilLocalUnitConfigurationGUI.php';
 
  806                require_once 
'Modules/TestQuestionPool/classes/class.ilUnitConfigurationRepository.php';
 
  810                $this->ctrl->forwardCommand($gui);
 
  813            case "ilcommonactiondispatchergui":
 
  814                if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]) && !$ilAccess->checkAccess(
"visible", 
"", 
$_GET[
"ref_id"])) {
 
  819                require_once 
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
 
  821                $this->ctrl->forwardCommand($gui);
 
  824            case 'ilassquestionhintsgui':
 
  825                if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  831                $this->ctrl->setReturn($this, 
"questions");
 
  834                require_once 
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
 
  836                $questionGUI->object->setObjId($this->object->getId());
 
  837                $questionGUI->setQuestionTabs();
 
  839                if ($questionGUI->object->isInActiveTest()) {
 
  845                require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
 
  848                $gui->setEditingEnabled(
 
  849                    $DIC->access()->checkAccess(
'write', 
'', $this->object->getRefId())
 
  852                $ilCtrl->forwardCommand($gui);
 
  856            case 'ilassquestionfeedbackeditinggui':
 
  857                if (!$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  863                $this->ctrl->setReturn($this, 
"questions");
 
  866                require_once 
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
 
  868                $questionGUI->object->setObjId($this->object->getId());
 
  869                $questionGUI->setQuestionTabs();
 
  871                if ($questionGUI->object->isInActiveTest()) {
 
  877                require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
 
  879                $ilCtrl->forwardCommand($gui);
 
  883            case 'iltestcorrectionsgui':
 
  884                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  889                require_once 
'./Modules/Test/classes/class.ilTestCorrectionsGUI.php';
 
  891                $this->ctrl->forwardCommand($gui);
 
  896            if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]) && !$ilAccess->checkAccess(
"visible", 
"", 
$_GET[
"ref_id"]))) {
 
  902                if ((strcmp($cmd, 
"properties") == 0) && (
$_GET[
"browse"])) {
 
  903                    $this->questionBrowser();
 
  906                if ((strcmp($cmd, 
"properties") == 0) && (
$_GET[
"up"] || 
$_GET[
"down"])) {
 
  911                $ret = &$this->$cmd();
 
  914                if ((!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]))) {
 
  918                if (in_array($cmd, [
'editQuestion', 
'save', 
'suggestedsolution']) && !$ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
  922                if ($_REQUEST[
'prev_qid']) {
 
  923                    global $___prev_question_id;
 
  924                    $___prev_question_id = $_REQUEST[
'prev_qid'];
 
  925                    $this->ctrl->setParameterByClass(
'ilassquestionpagegui', 
'prev_qid', $_REQUEST[
'prev_qid']);
 
  926                    $this->ctrl->setParameterByClass(
$_GET[
'sel_question_types'] . 
'gui', 
'prev_qid', $_REQUEST[
'prev_qid']);
 
  928                $this->create_question_mode = 
true;
 
  931                $this->ctrl->setReturn($this, 
"questions");
 
  942                    $questionGui->object->setObjId($this->object->getId());
 
  944                    if (in_array($cmd, [
'editQuestion', 
'save', 
'suggestedsolution']) && $questionGui->object->isInActiveTest()) {
 
  949                    $questionGuiClass = get_class($questionGui);
 
  950                    $this->ctrl->setParameterByClass($questionGuiClass, 
'prev_qid', $_REQUEST[
'prev_qid']);
 
  951                    $this->ctrl->setParameterByClass($questionGuiClass, 
'test_ref_id', $_REQUEST[
'ref_id']);
 
  952                    $this->ctrl->setParameterByClass($questionGuiClass, 
'q_id', $qid);
 
  954                    if (isset($_REQUEST[
'test_express_mode'])) {
 
  955                        $this->ctrl->setParameterByClass($questionGuiClass, 
'test_express_mode', 1);
 
  958                    if (!$questionGui->isSaveCommand()) {
 
  959                        $_GET[
'calling_test'] = $this->
object->getRefId();
 
  962                    $questionGui->setQuestionTabs();
 
  964                    $this->ctrl->forwardCommand($questionGui);
 
  966                    if (isset($_REQUEST[
'test_express_mode'])) {
 
  967                        $this->ctrl->redirect($this, 
'showPage');
 
  969                        $this->ctrl->redirect($this, 
'questions');
 
  974        if (!in_array(strtolower(
$_GET[
"baseClass"]), array(
'iladministrationgui', 
'ilrepositorygui')) &&
 
  976            $this->tpl->printToStdout();
 
  983        $target_class = get_class($this->
object) . 
"GUI";
 
  984        $this->ctrl->setParameterByClass($target_class, 
'ref_id', $this->ref_id);
 
  985        $this->ctrl->redirectByClass($target_class);
 
  990        $this->tpl->setOnScreenMessage(
'failure', sprintf(
 
  991            $this->lng->txt(
"msg_no_perm_read_item"),
 
  992            $this->object->getTitle()
 
  994        $this->ctrl->setParameterByClass(
'ilrepositorygui', 
'ref_id', 
ROOT_FOLDER_ID);
 
  995        $this->ctrl->redirectByClass(
'ilrepositorygui');
 
 1002        require_once 
'Services/Tracking/classes/class.ilChangeEvent.php';
 
 1005            $this->object->getType(),
 
 1006            $this->object->getRefId(),
 
 1007            $this->object->getId(),
 
 1008            $DIC->user()->getId()
 
 1019        $DIC->ctrl()->redirectByClass(
'ilTestExportGUI');
 
 1028        $qid = $_REQUEST[
'q_id'];
 
 1030        if (!$qid || $qid == 
'Array') {
 
 1031            $questions = $this->
object->getQuestionTitlesAndIndexes();
 
 1033            $keys = array_keys($questions);
 
 1034            $qid = (int) (
$keys[0] ?? 0);
 
 1036            $_REQUEST[
'q_id'] = $qid;
 
 1037            $_GET[
'q_id'] = $qid;
 
 1041        if ($this->object->checkQuestionParent($qid)) {
 
 1045        throw new ilTestException(
'question id does not relate to parent object!');
 
 1050        switch ($this->object->getQuestionSetType()) {
 
 1052                $this->ctrl->redirectByClass(
'ilObjTestGUI', 
'questions');
 
 1056                $this->ctrl->redirectByClass(
'ilTestRandomQuestionSetConfigGUI');
 
 1060                $this->ctrl->redirectByClass(
'ilObjTestDynamicQuestionSetConfigGUI');
 
 1066        $this->ctrl->setCmdClass(
'ilTestEvaluationGUI');
 
 1067        $this->ctrl->setCmd(
'outUserResultsOverview');
 
 1068        $this->tabs_gui->clearTargets();
 
 1075        $this->ctrl->redirectByClass(
 
 1077                ilRepositoryGUI::class,
 
 1079                ilTestResultsGUI::class,
 
 1080                ilParticipantsTestResultsGUI::class
 
 1123        require_once 
'Modules/Test/classes/class.ilTestEvaluationGUI.php';
 
 1128        $this->ctrl->forwardCommand($gui);
 
 1133        require_once 
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
 
 1150        $this->tpl->loadStandardTemplate();
 
 1164        $this->ctrl->redirect($this, 
"infoScreen");
 
 1169        $this->ctrl->redirectByClass(
"iltestevaluationgui", 
"outEvaluation");
 
 1178            $this->
error->raiseError($this->lng->txt(
"no_create_permission"));
 
 1182        if ($form->checkInput()) {
 
 1183            $this->ctrl->setParameter($this, 
"new_type", $this->type);
 
 1189        $form->setValuesByPost();
 
 1190        $this->tpl->setContent($form->getHTML());
 
 1195        include_once(
"./Modules/Test/classes/class.ilObjTest.php");
 
 1197        $defaults = $tst->getAvailableDefaults();
 
 1198        if (count($defaults)) {
 
 1199            foreach ($defaults as $row) {
 
 1200                $a_options[
"tstdef_" . $row[
"test_defaults_id"]] = array($row[
"name"],
 
 1201                    $this->lng->txt(
"tst_default_settings"));
 
 1206        include_once 
"Services/Administration/classes/class.ilSettingsTemplate.php";
 
 1209            foreach ($templates as $item) {
 
 1210                $a_options[
"tsttpl_" . $item[
"id"]] = array($item[
"title"],
 
 1211                    nl2br(trim($item[
"description"])));
 
 1224            $testDefaultsId = $tstdef;
 
 1226            $a_new_object->applyDefaults($testDefaults);
 
 1231            include_once 
"Services/Administration/classes/class.ilSettingsTemplate.php";
 
 1234            $template_settings = $template->getSettings();
 
 1235            if ($template_settings) {
 
 1239            $a_new_object->setTemplate($template_id);
 
 1242        $a_new_object->saveToDb();
 
 1245        ilUtil::sendSuccess($this->lng->txt(
"object_added"), 
true);
 
 1246        $this->ctrl->setParameter($this, 
'ref_id', $a_new_object->
getRefId());
 
 1247        $this->ctrl->redirectByClass(
'ilObjTestSettingsGeneralGUI');
 
 1252        include_once 
"./Services/Utilities/classes/class.ilUtil.php";
 
 1253        $path = $this->tree->getPathFull($this->object->getRefID());
 
 1262        if ($_FILES[
"xmldoc"][
"error"] > UPLOAD_ERR_OK) {
 
 1263            $this->lng->loadLanguageModule(
'file');
 
 1264            $this->tpl->setOnScreenMessage(
'failure', $this->lng->txt(
'general_upload_error_occured'));
 
 1265            $this->ctrl->redirect($this, 
'create');
 
 1269        $file = pathinfo($_FILES[
"xmldoc"][
"name"]);
 
 1270        $subdir = basename($file[
"basename"], 
"." . $file[
"extension"]);
 
 1272        if (strpos($subdir, 
'tst') === 
false) {
 
 1273            $this->tpl->setOnScreenMessage(
'failure', $this->lng->txt(
'import_file_not_valid'), 
true);
 
 1274            $this->ctrl->redirect($this, 
'create');
 
 1280        $full_path = $basedir . 
"/" . $_FILES[
"xmldoc"][
"name"];
 
 1290        if (!is_file($qti_file)) {
 
 1292            $this->tpl->setOnScreenMessage(
'failure', $this->lng->txt(
"tst_import_non_ilias_zip"), 
true);
 
 1293            $this->ctrl->redirect($this, 
'create');
 
 1298        include_once 
"./Services/QTI/classes/class.ilQTIParser.php";
 
 1300        $result = $qtiParser->startParsing();
 
 1301        $founditems = &$qtiParser->getFoundItems();
 
 1305        foreach ($founditems as $item) {
 
 1306            if (strlen($item[
"type"])) {
 
 1313        if (count($founditems) && $complete == 0) {
 
 1322        $_SESSION[
"tst_import_results_file"] = $results_file;
 
 1323        $_SESSION[
"tst_import_xml_file"] = $xml_file;
 
 1324        $_SESSION[
"tst_import_qti_file"] = $qti_file;
 
 1325        $_SESSION[
"tst_import_subdir"] = $subdir;
 
 1332        $importVerificationTpl = 
new ilTemplate(
'tpl.tst_import_verification.html', 
true, 
true, 
'Modules/Test');
 
 1334        include_once 
"./Services/QTI/classes/class.ilQTIItem.php";
 
 1340        $importVerificationTpl->setVariable(
"TEXT_TYPE", $this->lng->txt(
"question_type"));
 
 1341        $importVerificationTpl->setVariable(
"TEXT_TITLE", $this->lng->txt(
"question_title"));
 
 1342        $importVerificationTpl->setVariable(
"FOUND_QUESTIONS_INTRODUCTION", $this->lng->txt(
"tst_import_verify_found_questions"));
 
 1343        $importVerificationTpl->setVariable(
"VERIFICATION_HEADING", $this->lng->txt(
"import_tst"));
 
 1344        $importVerificationTpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
 1346        $importVerificationTpl->setVariable(
"QUESTIONPOOL_ID", $QplOrTstID);
 
 1347        $importVerificationTpl->setVariable(
"VALUE_IMPORT", $this->lng->txt(
"import"));
 
 1348        $importVerificationTpl->setVariable(
"VALUE_CANCEL", $this->lng->txt(
"cancel"));
 
 1350        $row_class = [
"tblrow1", 
"tblrow2"];
 
 1352        foreach ($founditems as $item) {
 
 1353            $importVerificationTpl->setCurrentBlock(
"verification_row");
 
 1354            $importVerificationTpl->setVariable(
"ROW_CLASS", $row_class[$counter++ % 2]);
 
 1355            $importVerificationTpl->setVariable(
"QUESTION_TITLE", $item[
"title"]);
 
 1356            $importVerificationTpl->setVariable(
"QUESTION_IDENT", $item[
"ident"]);
 
 1358            switch ($item[
"type"]) {
 
 1361                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMultipleChoice"));
 
 1365                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assSingleChoice"));
 
 1369                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assKprimChoice"));
 
 1373                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assLongMenu"));
 
 1377                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assNumeric"));
 
 1381                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFormulaQuestion"));
 
 1385                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextSubset"));
 
 1389                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assClozeTest"));
 
 1393                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assErrorText"));
 
 1397                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assImagemapQuestion"));
 
 1401                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assJavaApplet"));
 
 1405                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFlashApplet"));
 
 1409                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMatchingQuestion"));
 
 1413                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingQuestion"));
 
 1417                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingHorizontal"));
 
 1421                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextQuestion"));
 
 1425                    $importVerificationTpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFileUpload"));
 
 1428            $importVerificationTpl->parseCurrentBlock();
 
 1431        $this->tpl->setContent($importVerificationTpl->get());
 
 1439        include_once 
"./Modules/Test/classes/class.ilObjTest.php";
 
 1443        $newObj->setType(
$_GET[
"new_type"]);
 
 1445        $newObj->setTitle(
"dummy");
 
 1447        $newObj->setDescription(
"test import");
 
 1449        $newObj->create(
true);
 
 1451        $newObj->createReference();
 
 1453        $newObj->putInTree(
$_GET[
"ref_id"]);
 
 1455        $newObj->setPermissions(
$_GET[
"ref_id"]);
 
 1457        $newObj->mark_schema->flush();
 
 1460        include_once 
"./Services/QTI/classes/class.ilQTIParser.php";
 
 1464        if (!isset(
$_POST[
"qpl"]) || 
"-1" === (
string) 
$_POST[
"qpl"]) {
 
 1465            $questionParentObjId = $newObj->getId();
 
 1467            $questionParentObjId = 
$_POST[
"qpl"];
 
 1470        if (is_file(
$_SESSION[
"tst_import_dir"] . 
'/' . 
$_SESSION[
"tst_import_subdir"] . 
"/manifest.xml")) {
 
 1471            $newObj->saveToDb();
 
 1474            $_SESSION[
'tst_import_qst_parent'] = $questionParentObjId;
 
 1476            $fileName = 
$_SESSION[
'tst_import_subdir'] . 
'.zip';
 
 1477            $fullPath = 
$_SESSION[
'tst_import_dir'] . 
'/' . $fileName;
 
 1479            include_once(
"./Services/Export/classes/class.ilImport.php");
 
 1481            $map = $imp->getMapping();
 
 1482            $map->addMapping(
'Modules/Test', 
'tst', 
'new_id', $newObj->getId());
 
 1483            $imp->importObject($newObj, $fullPath, $fileName, 
'tst', 
'Modules/Test', 
true);
 
 1486            if (!isset(
$_POST[
"ident"]) || !is_array(
$_POST[
"ident"]) || !count(
$_POST[
"ident"])) {
 
 1487                $qtiParser->setIgnoreItemsEnabled(
true);
 
 1489            $qtiParser->setTestObject($newObj);
 
 1490            $result = $qtiParser->startParsing();
 
 1491            $newObj->saveToDb();
 
 1495            $contParser->setQuestionMapping($qtiParser->getImportMapping());
 
 1496            $contParser->startParsing();
 
 1498            if (isset(
$_POST[
"ident"]) && is_array(
$_POST[
"ident"]) && count(
$_POST[
"ident"]) == $qtiParser->getNumImportedItems()) {
 
 1500                if (@file_exists(
$_SESSION[
"tst_import_results_file"])) {
 
 1501                    include_once(
"./Modules/Test/classes/class.ilTestResultsImportParser.php");
 
 1503                    $results->setQuestionIdMapping($qtiParser->getQuestionIdMapping());
 
 1514        ilUtil::sendSuccess($this->lng->txt(
"object_imported"), 
true);
 
 1515        ilUtil::redirect(
"ilias.php?ref_id=" . $newObj->getRefId() . 
"&baseClass=ilObjTestGUI");
 
 1534        $file = explode(
"_", 
$_GET[
"file_id"]);
 
 1535        include_once(
"./Modules/File/classes/class.ilObjFile.php");
 
 1536        $fileObj = 
new ilObjFile($file[count($file) - 1], 
false);
 
 1537        $fileObj->sendFile();
 
 1546        include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
 
 1548        $page_gui->showMediaFullscreen();
 
 1556        include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php");
 
 1558        $pg_obj->send_paragraph(
$_GET[
"par_id"], 
$_GET[
"downloadtitle"]);
 
 1571        $this->questionBrowser();
 
 1583        $this->questionBrowser();
 
 1595        $this->ctrl->redirect($this, 
"questions");
 
 1610        $parent_ref = 
$tree->getParentId($this->object->getRefId());
 
 1611        include_once 
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
 
 1613        $qpl->setType(
"qpl");
 
 1614        $qpl->setTitle(
$name);
 
 1615        $qpl->setDescription($description);
 
 1617        $qpl->createReference();
 
 1618        $qpl->putInTree($parent_ref);
 
 1619        $qpl->setPermissions($parent_ref);
 
 1622        return $qpl->getRefId();
 
 1631        $form->setTitle($this->lng->txt(
'random_selection'));
 
 1632        $form->setFormAction($this->ctrl->getFormAction($this, 
'cancelRandomSelect'));
 
 1634        $form->addCommandButton(
'createRandomSelection', $this->lng->txt(
'submit'));
 
 1635        $form->addCommandButton(
'cancelRandomSelect', $this->lng->txt(
'cancel'));
 
 1637        $amount = 
new ilNumberInputGUI($this->lng->txt(
'tst_random_nr_of_questions'), 
'nr_of_questions');
 
 1638        $amount->allowDecimals(
false);
 
 1639        $amount->setSize(5);
 
 1640        $amount->setMinValue(1);
 
 1641        $amount->setValue(5);
 
 1642        $form->addItem($amount);
 
 1644        $poolSelection = 
new ilSelectInputGUI($this->lng->txt(
'tst_source_question_pool'), 
'sel_qpl');
 
 1645        $poolSelection->setInfo($this->lng->txt(
'tst_random_select_questionpool'));
 
 1646        $poolSelection->setRequired(
true);
 
 1648        $questionpools = $this->
object->getAvailableQuestionpools(
false, 
false, 
false, 
true);
 
 1649        foreach ($questionpools as $key => $value) {
 
 1650            $poolOptions[$key] = $value[
'title'];
 
 1652        $poolSelection->setOptions(
 
 1653            [
'0' => $this->lng->txt(
'all_available_question_pools')] + $poolOptions
 
 1655        $form->addItem($poolSelection);
 
 1659        $form->addItem($questionType);
 
 1661        $this->tpl->setContent($form->getHTML());
 
 1666        $this->ctrl->redirect($this, 
"questions");
 
 1676        $this->tpl->setContent(
 
 1677            $randomQuestionSelectionTable
 
 1678                ->build((
int) 
$_POST[
'nr_of_questions'], (
int) 
$_POST[
'sel_qpl'])
 
 1692        $selected_array = explode(
",", 
$_POST[
"chosen_questions"]);
 
 1693        if (!count($selected_array)) {
 
 1696            $total = $this->
object->evalTotalPersons();
 
 1703            foreach ($selected_array as $key => $value) {
 
 1704                $this->
object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value);
 
 1706            $this->
object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
 
 1707            ilUtil::sendSuccess($this->lng->txt(
"tst_questions_inserted"), 
true);
 
 1708            $this->ctrl->redirect($this, 
"questions");
 
 1715        $this->questionBrowser();
 
 1725        $qpl_ref_id = $_REQUEST[
"sel_qpl"];
 
 1728        if (array_key_exists(
'usage', $_REQUEST) && is_numeric($_REQUEST[
'usage'])) {
 
 1729            $qpl_mode = $_REQUEST[
'usage'];
 
 1732        if (isset($_REQUEST[
'qtype'])) {
 
 1733            include_once 
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
 
 1735        } elseif (isset($_REQUEST[
'sel_question_types'])) {
 
 1736            $sel_question_types = $_REQUEST[
"sel_question_types"];
 
 1739        if (($qpl_mode == 2 && strcmp($_REQUEST[
"txt_qpl"], 
"") == 0) ||
 
 1740            ($qpl_mode == 3 && strcmp($qpl_ref_id, 
"") == 0)) {
 
 1742            $_REQUEST[
'sel_question_types'] = $sel_question_types;
 
 1747            $_SESSION[
"test_id"] = $this->
object->getRefId();
 
 1748            if ($qpl_mode == 2 && strcmp($_REQUEST[
"txt_qpl"], 
"") != 0) {
 
 1751            } elseif ($qpl_mode == 1) {
 
 1752                $qpl_ref_id = 
$_GET[
"ref_id"];
 
 1755            $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;
 
 1757            if (isset($_REQUEST[
'prev_qid'])) {
 
 1758                $baselink .= 
'&prev_qid=' . $_REQUEST[
'prev_qid'];
 
 1759            } elseif (isset($_REQUEST[
'position'])) {
 
 1760                $baselink .= 
'&prev_qid=' . $_REQUEST[
'position'];
 
 1763            if ($_REQUEST[
'test_express_mode']) {
 
 1764                $baselink .= 
'&test_express_mode=1';
 
 1767            if (isset($_REQUEST[
'add_quest_cont_edit_mode'])) {
 
 1770                    "add_quest_cont_edit_mode={$_REQUEST['add_quest_cont_edit_mode']}",
 
 1790        $this->ctrl->redirect($this, 
"questions");
 
 1807        $questionpools = &$this->
object->getAvailableQuestionpools(
false, 
false, 
false, 
true, 
false, 
"write");
 
 1809        if ($this->object->getPoolUsage()) {
 
 1812            $ilCtrl = 
$DIC[
'ilCtrl'];
 
 1815            include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
 1818            $form->setFormAction($ilCtrl->getFormAction($this, 
"executeCreateQuestion"));
 
 1819            $form->setTitle(
$lng->txt(
"ass_create_question"));
 
 1820            include_once 
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
 
 1824            $hidden->setValue($_REQUEST[
"sel_question_types"]);
 
 1825            $form->addItem($hidden);
 
 1832                    $lng->txt(
'tst_add_quest_cont_edit_mode_IPE'),
 
 1833                    assQuestion::ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT
 
 1835                $option_ipe->setInfo(
$lng->txt(
'tst_add_quest_cont_edit_mode_IPE_info'));
 
 1836                $ri->addOption($option_ipe);
 
 1839                    $lng->txt(
'tst_add_quest_cont_edit_mode_RTE'),
 
 1842                $option_rte->setInfo(
$lng->txt(
'tst_add_quest_cont_edit_mode_RTE_info'));
 
 1843                $ri->addOption($option_rte);
 
 1847                $form->addItem($ri, 
true);
 
 1851                $form->addItem($hi, 
true);
 
 1856            $usage->setRequired(
true);
 
 1857            $no_pool = 
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
 
 1858            $usage->addOption($no_pool);
 
 1859            $existing_pool = 
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
 
 1860            $usage->addOption($existing_pool);
 
 1861            $new_pool = 
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
 
 1862            $usage->addOption($new_pool);
 
 1863            $form->addItem($usage);
 
 1865            $usage->setValue(1);
 
 1868            $pools_data = array();
 
 1869            foreach ($questionpools as $key => $p) {
 
 1870                $pools_data[$key] = $p[
'title'];
 
 1872            $pools = 
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"), 
"sel_qpl");
 
 1873            $pools->setOptions($pools_data);
 
 1874            $existing_pool->addSubItem($pools);
 
 1877            $this->lng->loadLanguageModule(
'rbac');
 
 1880            $name->setMaxLength(50);
 
 1881            $new_pool->addSubItem(
$name);
 
 1883            $form->addCommandButton(
"executeCreateQuestion", 
$lng->txt(
"submit"));
 
 1884            $form->addCommandButton(
"cancelCreateQuestion", 
$lng->txt(
"cancel"));
 
 1886            return $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
 
 1889            $ilCtrl = 
$DIC[
'ilCtrl'];
 
 1891            $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'sel_question_types', $_REQUEST[
"sel_question_types"]);
 
 1892            $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'add_quest_cont_edit_mode', $_REQUEST[
"add_quest_cont_edit_mode"]);
 
 1893            $link = $ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui', 
'handleToolbarCommand', 
'', 
false, 
false);
 
 1903        $removeQuestionIds = (array) 
$_POST[
"q_id"];
 
 1905        $questions = $this->
object->getQuestionTitlesAndIndexes();
 
 1907        $this->
object->removeQuestions($removeQuestionIds);
 
 1909        $this->
object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
 
 1911        ilUtil::sendSuccess($this->lng->txt(
"tst_questions_removed"));
 
 1913        if ($_REQUEST[
'test_express_mode']) {
 
 1916            $deleted_tmp = $removeQuestionIds;
 
 1917            $first = array_shift($deleted_tmp);
 
 1918            foreach ((array) $questions as $key => $value) {
 
 1919                if (!in_array($key, $removeQuestionIds)) {
 
 1927                } elseif ($key == $first) {
 
 1932                    $first = array_shift($deleted_tmp);
 
 1937                count($questions) == count($removeQuestionIds) ||
 
 1940                $this->ctrl->setParameter($this, 
'q_id', 
'');
 
 1941                $this->ctrl->redirect($this, 
'showPage');
 
 1944            $this->ctrl->setParameter($this, 
'q_id', $return_to);
 
 1945            $this->ctrl->redirect($this, 
"showPage");
 
 1947            $this->ctrl->setParameter($this, 
'q_id', 
'');
 
 1948            $this->ctrl->redirect($this, 
'questions');
 
 1961        if ($_REQUEST[
'test_express_mode']) {
 
 1962            $this->ctrl->setParameter($this, 
'q_id', $_REQUEST[
'q_id']);
 
 1963            $this->ctrl->redirect($this, 
"showPage");
 
 1965            $this->ctrl->redirect($this, 
"questions");
 
 1978        $total = $this->
object->evalTotalPersons();
 
 1981            $question = sprintf($this->lng->txt(
"tst_remove_questions_and_results"), 
$total);
 
 1983            if (count($checked_questions) == 1) {
 
 1984                $question = $this->lng->txt(
"tst_remove_question");
 
 1986                $question = $this->lng->txt(
"tst_remove_questions");
 
 1990        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 1992        $cgui->setHeaderText($question);
 
 1994        $this->ctrl->saveParameter($this, 
'test_express_mode');
 
 1995        $this->ctrl->saveParameter($this, 
'q_id');
 
 1997        $cgui->setFormAction($this->ctrl->getFormAction($this));
 
 1998        $cgui->setCancel($this->lng->txt(
"cancel"), 
"cancelRemoveQuestions");
 
 1999        $cgui->setConfirm($this->lng->txt(
"confirm"), 
"confirmRemoveQuestions");
 
 2001        include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
 2002        $removablequestions = &$this->
object->getTestQuestions();
 
 2003        if (count($removablequestions)) {
 
 2004            foreach ($removablequestions as 
$data) {
 
 2005                if (in_array(
$data[
"question_id"], $checked_questions)) {
 
 2007                    $txt .= 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . 
$data[
'question_id'] . 
']';
 
 2009                    if (
$data[
"description"]) {
 
 2010                        $txt .= 
"<div class=\"small\">" . 
$data[
"description"] . 
"</div>";
 
 2013                    $cgui->addItem(
"q_id[]", 
$data[
"question_id"], 
$txt);
 
 2018        $this->tpl->setContent($cgui->getHTML());
 
 2028        $checked_questions = $_REQUEST[
"q_id"];
 
 2030        if (!is_array($checked_questions) && $checked_questions) {
 
 2031            $checked_questions = array($checked_questions);
 
 2034        if (!is_array($checked_questions)) {
 
 2035            $checked_questions = [];
 
 2038        if (count($checked_questions) > 0) {
 
 2040        } elseif (0 === count($checked_questions)) {
 
 2042            $this->ctrl->redirect($this, 
"questions");
 
 2051        $selected_questions = 
null;
 
 2052        $selected_questions = 
$_POST[
'q_id'];
 
 2053        if ($selected_questions === 
null && is_numeric(
$_GET[
'q_id'])) {
 
 2054            $selected_questions = [
$_GET[
'q_id']];
 
 2056        if (is_array($selected_questions)) {
 
 2057            $_SESSION[
'tst_qst_move_' . $this->
object->getTestId()] = $selected_questions;
 
 2058            ilUtil::sendSuccess($this->lng->txt(
"msg_selected_for_move"), 
true);
 
 2062        $this->ctrl->redirect($this, 
'questions');
 
 2071        $move_questions = 
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
 
 2073        if (!is_array(
$_POST[
'q_id']) || 0 === count(
$_POST[
'q_id'])) {
 
 2075            $this->ctrl->redirect($this, 
'questions');
 
 2077        if (count(
$_POST[
'q_id']) > 1) {
 
 2079            $this->ctrl->redirect($this, 
'questions');
 
 2082        $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()], 
$_POST[
'q_id'][0], $insert_mode);
 
 2083        ilUtil::sendSuccess($this->lng->txt(
"msg_questions_moved"), 
true);
 
 2084        unset(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]);
 
 2085        $this->ctrl->redirect($this, 
"questions");
 
 2094        $move_questions = 
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
 
 2095        if (!is_array(
$_POST[
'q_id']) || 0 === count(
$_POST[
'q_id'])) {
 
 2097            $this->ctrl->redirect($this, 
'questions');
 
 2099        if (count(
$_POST[
'q_id']) > 1) {
 
 2101            $this->ctrl->redirect($this, 
'questions');
 
 2104        $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()], 
$_POST[
'q_id'][0], $insert_mode);
 
 2105        ilUtil::sendSuccess($this->lng->txt(
"msg_questions_moved"), 
true);
 
 2106        unset(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]);
 
 2107        $this->ctrl->redirect($this, 
"questions");
 
 2117        $selected_array = (is_array(
$_POST[
'q_id'])) ? 
$_POST[
'q_id'] : array();
 
 2118        if (!count($selected_array)) {
 
 2120            $this->ctrl->redirect($this, 
"browseForQuestions");
 
 2122            include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
 2123            $manscoring = 
false;
 
 2124            foreach ($selected_array as $key => $value) {
 
 2125                $this->
object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value);
 
 2130            $this->
object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
 
 2134                ilUtil::sendSuccess($this->lng->txt(
"tst_questions_inserted"), 
true);
 
 2136            $this->ctrl->redirect($this, 
"questions");
 
 2145        $ilCtrl = 
$DIC[
'ilCtrl'];
 
 2148        $ilHelp = 
$DIC[
'ilHelp']; 
 
 2153        $subScreenId = array(
'createQuestion');
 
 2155        include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
 2157        $ilCtrl->setParameter($this, 
'qtype', $_REQUEST[
'qtype']);
 
 2161        $form->setFormAction($ilCtrl->getFormAction($this, 
"executeCreateQuestion"));
 
 2162        $form->setTitle(
$lng->txt(
"ass_create_question"));
 
 2163        include_once 
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
 
 2166        $questionTypes = $pool->getQuestionTypes(
false, 
true, 
false);
 
 2170        foreach ($questionTypes as $label => 
$data) {
 
 2171            $options[
$data[
'question_type_id']] = $label;
 
 2174        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 2176        $si->setOptions($options);
 
 2177        $form->addItem(
$si, 
true);
 
 2180        $questions = $this->
object->getQuestionTitlesAndIndexes();
 
 2183            $options = array(
'0' => 
$lng->txt(
'first'));
 
 2184            foreach ($questions as $key => $title) {
 
 2185                $options[$key] = 
$lng->txt(
'behind') . 
' ' . $title . 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . $key . 
']';
 
 2187            $si->setOptions($options);
 
 2188            $si->setValue($_REQUEST[
'q_id']);
 
 2189            $form->addItem(
$si, 
true);
 
 2194            $subScreenId[] = 
'editMode';
 
 2199                $lng->txt(
'tst_add_quest_cont_edit_mode_IPE'),
 
 2202            $option_ipe->setInfo(
$lng->txt(
'tst_add_quest_cont_edit_mode_IPE_info'));
 
 2203            $ri->addOption($option_ipe);
 
 2206                $lng->txt(
'tst_add_quest_cont_edit_mode_RTE'),
 
 2209            $option_rte->setInfo(
$lng->txt(
'tst_add_quest_cont_edit_mode_RTE_info'));
 
 2210            $ri->addOption($option_rte);
 
 2214            $form->addItem($ri, 
true);
 
 2218            $form->addItem($hi, 
true);
 
 2221        if ($this->object->getPoolUsage()) {
 
 2222            $subScreenId[] = 
'poolSelect';
 
 2226            $usage->setRequired(
true);
 
 2227            $no_pool = 
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
 
 2228            $usage->addOption($no_pool);
 
 2229            $existing_pool = 
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
 
 2230            $usage->addOption($existing_pool);
 
 2231            $new_pool = 
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
 
 2232            $usage->addOption($new_pool);
 
 2233            $form->addItem($usage);
 
 2235            $usage->setValue(1);
 
 2238            $pools_data = array();
 
 2239            foreach ($questionpools as $key => $p) {
 
 2240                $pools_data[$key] = $p[
'title'];
 
 2242            $pools = 
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"), 
"sel_qpl");
 
 2243            $pools->setOptions($pools_data);
 
 2244            $existing_pool->addSubItem($pools);
 
 2248            $name->setMaxLength(50);
 
 2249            $new_pool->addSubItem(
$name);
 
 2252        $form->addCommandButton(
"executeCreateQuestion", 
$lng->txt(
"create"));
 
 2253        $form->addCommandButton(
"questions", 
$lng->txt(
"cancel"));
 
 2255        $DIC->tabs()->activateTab(
'assQuestions');
 
 2256        $ilHelp->setScreenId(
'assQuestions');
 
 2257        $ilHelp->setSubScreenId(implode(
'_', $subScreenId));
 
 2259        return $tpl->setContent($form->getHTML());
 
 2265        $ilAccess = 
$DIC[
'ilAccess'];
 
 2266        $ilTabs = 
$DIC[
'ilTabs'];
 
 2269        $this->ctrl->setParameter($this, 
'test_express_mode', 
'');
 
 2271        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 2274            $this->ctrl->redirect($this, 
"infoScreen");
 
 2277        if (
$_GET[
'browse']) {
 
 2278            return $this->questionbrowser();
 
 2285        $this->ctrl->setParameter($this, 
'q_id', 
'');
 
 2288            ilUtil::redirect(
"ilias.php?baseClass=ilObjQuestionPoolGUI&ref_id=" . 
$_GET[
"eqpl"] . 
"&cmd=editQuestionForTest&calling_test=" . 
$_GET[
"ref_id"] . 
"&q_id=" . 
$_GET[
"eqid"]);
 
 2291        if (
$_GET[
"up"] > 0) {
 
 2292            $this->
object->questionMoveUp(
$_GET[
"up"]);
 
 2294        if (
$_GET[
"down"] > 0) {
 
 2295            $this->
object->questionMoveDown(
$_GET[
"down"]);
 
 2299            $selected_array = array();
 
 2300            array_push($selected_array, 
$_GET[
"add"]);
 
 2301            $total = $this->
object->evalTotalPersons();
 
 2308            $this->insertQuestions($selected_array);
 
 2312        $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.il_as_tst_questions.html", 
"Modules/Test");
 
 2314        $total = $this->
object->evalTotalPersons();
 
 2315        if ($ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 2317                $link = 
$DIC->ui()->factory()->link()->standard(
 
 2318                    $DIC->language()->txt(
"test_has_datasets_warning_page_view_link"),
 
 2319                    $DIC->ctrl()->getLinkTargetByClass(array(
'ilTestResultsGUI', 
'ilParticipantsTestResultsGUI'))
 
 2322                $message = 
$DIC->language()->txt(
"test_has_datasets_warning_page_view");
 
 2324                $msgBox = 
$DIC->ui()->factory()->messageBox()->info(
$message)->withLinks(array($link));
 
 2326                $DIC->ui()->mainTemplate()->setCurrentBlock(
'mess');
 
 2327                $DIC->ui()->mainTemplate()->setVariable(
 
 2329                    $DIC->ui()->renderer()->render($msgBox)
 
 2331                $DIC->ui()->mainTemplate()->parseCurrentBlock();
 
 2334                $ilToolbar = 
$DIC[
'ilToolbar'];
 
 2336                $ilToolbar->addButton($this->lng->txt(
"ass_create_question"), $this->ctrl->getLinkTarget($this, 
"addQuestion"));
 
 2338                if ($this->object->getPoolUsage()) {
 
 2339                    $ilToolbar->addSeparator();
 
 2341                    require_once 
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
 
 2346                $ilToolbar->addSeparator();
 
 2347                $ilToolbar->addButton($this->lng->txt(
"random_selection"), $this->ctrl->getLinkTarget($this, 
"randomselect"));
 
 2351                $ilAccess = 
$DIC[
'ilAccess'];
 
 2354                $ilCtrl = 
$DIC[
'ilCtrl'];
 
 2355                $online_access = 
false;
 
 2356                if ($this->object->getFixedParticipants()) {
 
 2357                    include_once 
"./Modules/Test/classes/class.ilObjTestAccess.php";
 
 2359                    if ($online_access_result === 
true) {
 
 2360                        $online_access = 
true;
 
 2403            $this->object->getRefId()
 
 2406        $table_gui->setPositionInsertCommandsEnabled(
 
 2407            is_array(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()])
 
 2408            && count(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()])
 
 2411        $table_gui->setQuestionPositioningEnabled(!
$total);
 
 2412        $table_gui->setQuestionManagingEnabled(!
$total);
 
 2413        $table_gui->setObligatoryQuestionsHandlingEnabled($this->object->areObligationsEnabled());
 
 2415        $table_gui->setTotalPoints($this->object->getFixedQuestionSetTotalPoints());
 
 2416        $table_gui->setTotalWorkingTime($this->object->getFixedQuestionSetTotalWorkingTime());
 
 2420        $table_gui->setData($this->object->getTestQuestions());
 
 2422        $this->tpl->setCurrentBlock(
"adm_content");
 
 2423        $this->tpl->setVariable(
"ACTION_QUESTION_FORM", $this->ctrl->getFormAction($this));
 
 2424        $this->tpl->setVariable(
'QUESTIONBROWSER', $table_gui->getHTML());
 
 2425        $this->tpl->parseCurrentBlock();
 
 2434        require_once 
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
 
 2464        include_once 
"./Modules/Test/classes/tables/class.ilTestHistoryTableGUI.php";
 
 2466        $table_gui->setTestObject($this->
object);
 
 2467        include_once 
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
 
 2469        $table_gui->setData(
$log);
 
 2470        $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
 
 2475        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 2477        $form->setTarget(
"_top");
 
 2479        $this->ctrl->setParameter($this, 
"new_type", $new_type);
 
 2480        $form->setFormAction($this->ctrl->getFormAction($this));
 
 2481        $form->setTitle($this->lng->txt(
"import_tst"));
 
 2484        include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
 2485        $fi = 
new ilFileInputGUI($this->lng->txt(
"import_file"), 
"xmldoc");
 
 2486        $fi->setSuffixes(array(
"zip"));
 
 2487        $fi->setRequired(
true);
 
 2488        $form->addItem($fi);
 
 2491        include_once(
"./Modules/Test/classes/class.ilObjTest.php");
 
 2493        $questionpools = $tst->getAvailableQuestionpools(
true, 
false, 
true, 
true);
 
 2494        if (count($questionpools)) {
 
 2495            $options = array(
"-1" => $this->lng->txt(
"dont_use_questionpool"));
 
 2496            foreach ($questionpools as $key => $value) {
 
 2497                $options[$key] = $value[
"title"];
 
 2500            $pool = 
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"), 
"qpl");
 
 2501            $pool->setInfo($this->lng->txt(
'select_question_pool_info'));
 
 2502            $pool->setOptions($options);
 
 2503            $form->addItem($pool);
 
 2506        $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
 
 2507        $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
 
 2519        $command = 
$_POST[
"command"];
 
 2520        if (strlen($command)) {
 
 2521            $method = $command . 
"Object";
 
 2522            if (method_exists($this, $method)) {
 
 2527        $this->ctrl->redirect($this, 
"participants");
 
 2540        $ilAccess = 
$DIC[
'ilAccess'];
 
 2541        $ilias = 
$DIC[
'ilias'];
 
 2542        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 2545            $this->ctrl->redirect($this, 
"infoScreen");
 
 2548        $isPdfDeliveryRequest = isset(
$_GET[
'pdf']) && 
$_GET[
'pdf'];
 
 2551        $template = 
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html", 
true, 
true, 
"Modules/Test");
 
 2553        if (!$isPdfDeliveryRequest) { 
 
 2554            $this->ctrl->setParameter($this, 
"pdf", 
"1");
 
 2555            $template->setCurrentBlock(
"pdf_export");
 
 2556            $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this, 
"print"));
 
 2557            $this->ctrl->setParameter($this, 
"pdf", 
"");
 
 2558            $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
 
 2559            $template->parseCurrentBlock();
 
 2561            $template->setCurrentBlock(
"navigation_buttons");
 
 2562            $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
 
 2563            $template->parseCurrentBlock();
 
 2574        $print_date = mktime(date(
"H"), date(
"i"), date(
"s"), date(
"m"), date(
"d"), date(
"Y"));
 
 2578        require_once 
'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
 
 2580        $questionHeaderBlockBuilder->setHeaderMode($this->object->getTitleOutput());
 
 2582        if ($isPdfDeliveryRequest) {
 
 2583            require_once 
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
 
 2587        foreach ($this->object->questions as $question) {
 
 2588            $template->setCurrentBlock(
"question");
 
 2589            $question_gui = $this->
object->createQuestionGUI(
"", $question);
 
 2591            if ($isPdfDeliveryRequest) {
 
 2595            $questionHeaderBlockBuilder->setQuestionTitle($question_gui->object->getTitle());
 
 2596            $questionHeaderBlockBuilder->setQuestionPoints($question_gui->object->getMaximumPoints());
 
 2597            $questionHeaderBlockBuilder->setQuestionPosition($counter);
 
 2598            $template->setVariable(
"QUESTION_HEADER", $questionHeaderBlockBuilder->getHTML());
 
 2600            $template->setVariable(
"TXT_QUESTION_ID", $this->lng->txt(
'question_id_short'));
 
 2601            $template->setVariable(
"QUESTION_ID", $question_gui->object->getId());
 
 2602            $result_output = $question_gui->getSolutionOutput(
"", 
null, 
false, 
true, 
false, $this->object->getShowSolutionFeedback());
 
 2603            $template->setVariable(
"SOLUTION_OUTPUT", $result_output);
 
 2604            $template->parseCurrentBlock(
"question");
 
 2606            $max_points += $question_gui->object->getMaximumPoints();
 
 2616        if ($isPdfDeliveryRequest) {
 
 2619            $this->tpl->setVariable(
"PRINT_CONTENT", $template->get());
 
 2633        $ilAccess = 
$DIC[
'ilAccess'];
 
 2635        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 2638            $this->ctrl->redirect($this, 
"infoScreen");
 
 2641        $template = 
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html", 
true, 
true, 
"Modules/Test");
 
 2645        $isPdfDeliveryRequest = isset(
$_GET[
'pdf']) && 
$_GET[
'pdf'];
 
 2650        require_once 
'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
 
 2652        $questionHeaderBlockBuilder->setHeaderMode($this->object->getTitleOutput());
 
 2654        if ($isPdfDeliveryRequest) {
 
 2655            require_once 
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
 
 2662        foreach ($this->object->questions as $question) {
 
 2663            $template->setCurrentBlock(
"question");
 
 2664            $question_gui = $this->
object->createQuestionGUI(
"", $question);
 
 2667            $questionHeaderBlockBuilder->setQuestionTitle($question_gui->object->getTitle());
 
 2668            $questionHeaderBlockBuilder->setQuestionPoints($question_gui->object->getMaximumPoints());
 
 2669            $questionHeaderBlockBuilder->setQuestionPosition($counter);
 
 2670            $template->setVariable(
"QUESTION_HEADER", $questionHeaderBlockBuilder->getHTML());
 
 2672            $template->setVariable(
"SOLUTION_OUTPUT", $question_gui->getPreview(
false));
 
 2673            $template->parseCurrentBlock(
"question");
 
 2675            $max_points += $question_gui->object->getMaximumPoints();
 
 2683        $template->setVariable(
 
 2691        if ($isPdfDeliveryRequest) {
 
 2694            $this->ctrl->setParameter($this, 
"pdf", 
"1");
 
 2695            $template->setCurrentBlock(
"pdf_export");
 
 2696            $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this, 
"review"));
 
 2697            $this->ctrl->setParameter($this, 
"pdf", 
"");
 
 2698            $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
 
 2699            $template->parseCurrentBlock();
 
 2701            $template->setCurrentBlock(
"navigation_buttons");
 
 2702            $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
 
 2703            $template->parseCurrentBlock();
 
 2706            $this->tpl->setVariable(
"PRINT_CONTENT", $template->get());
 
 2713    public function defaultsObject()
 
 2721        $ilAccess = 
$DIC[
'ilAccess'];
 
 2722        $ilToolbar = 
$DIC[
'ilToolbar'];
 
 2725        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 2727            $this->ctrl->redirect($this, 
"infoScreen");
 
 2734        $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 
'addDefaults'));
 
 2735        $ilToolbar->addFormButton($this->lng->txt(
'add'), 
'addDefaults');
 
 2736        require_once 
'Services/Form/classes/class.ilTextInputGUI.php';
 
 2737        $ilToolbar->addInputItem(
new ilTextInputGUI($this->lng->txt(
'tst_defaults_defaults_of_test'), 
'name'), 
true);
 
 2739        require_once 
'Modules/Test/classes/tables/class.ilTestPersonalDefaultSettingsTableGUI.php';
 
 2741        $defaults = $this->
object->getAvailableDefaults();
 
 2742        $table->setData((array) $defaults);
 
 2743        $tpl->setContent($table->getHTML());
 
 2751        if (isset(
$_POST[
'chb_defaults']) && is_array(
$_POST[
'chb_defaults']) && count(
$_POST[
'chb_defaults'])) {
 
 2752            foreach (
$_POST[
'chb_defaults'] as $test_default_id) {
 
 2753                $this->
object->deleteDefaults($test_default_id);
 
 2758        $this->defaultsObject();
 
 2775        if (!is_array(
$_POST[
"chb_defaults"]) || 1 !== count(
$_POST[
"chb_defaults"])) {
 
 2777                $this->lng->txt(
"tst_defaults_apply_select_one")
 
 2780            return $this->defaultsObject();
 
 2784        if ($this->object->evalTotalPersons() > 0) {
 
 2786                $this->lng->txt(
"tst_defaults_apply_not_possible")
 
 2789            return $this->defaultsObject();
 
 2792        $defaults = &$this->
object->getTestDefaults(
$_POST[
"chb_defaults"][0]);
 
 2793        $defaultSettings = unserialize($defaults[
"defaults"]);
 
 2795        if (isset($defaultSettings[
'isRandomTest'])) {
 
 2796            if ($defaultSettings[
'isRandomTest']) {
 
 2803        } elseif (isset($defaultSettings[
'questionSetType'])) {
 
 2804            $newQuestionSetType = $defaultSettings[
'questionSetType'];
 
 2806        $oldQuestionSetType = $this->
object->getQuestionSetType();
 
 2807        $questionSetTypeSettingSwitched = ($oldQuestionSetType != $newQuestionSetType);
 
 2809        $oldQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfigByType($oldQuestionSetType);
 
 2812            case !$questionSetTypeSettingSwitched:
 
 2813            case !$oldQuestionSetConfig->doesQuestionSetRelatedDataExist():
 
 2820                require_once 
'Modules/Test/classes/confirmations/class.ilTestSettingsChangeConfirmationGUI.php';
 
 2823                $confirmation->setFormAction($this->ctrl->getFormAction($this));
 
 2824                $confirmation->setCancel($this->lng->txt(
'cancel'), 
'defaults');
 
 2825                $confirmation->setConfirm($this->lng->txt(
'confirm'), 
'confirmedApplyDefaults');
 
 2827                $confirmation->setOldQuestionSetType($this->object->getQuestionSetType());
 
 2828                $confirmation->setNewQuestionSetType($newQuestionSetType);
 
 2829                $confirmation->setQuestionLossInfoEnabled(
false);
 
 2830                $confirmation->build();
 
 2832                $confirmation->populateParametersFromPost();
 
 2834                $this->tpl->setContent($this->ctrl->getHTML($confirmation));
 
 2839        if ($questionSetTypeSettingSwitched && !$this->object->getOfflineStatus()) {
 
 2840            $this->
object->setOfflineStatus(
true);
 
 2842            $info = $this->lng->txt(
"tst_set_offline_due_to_switched_question_set_type_setting");
 
 2847        $this->
object->applyDefaults($defaults);
 
 2849        ilUtil::sendSuccess($this->lng->txt(
"tst_defaults_applied"), 
true);
 
 2851        if ($questionSetTypeSettingSwitched && $oldQuestionSetConfig->doesQuestionSetRelatedDataExist()) {
 
 2852            $oldQuestionSetConfig->removeQuestionSetRelatedData();
 
 2855        $this->ctrl->redirect($this, 
'defaults');
 
 2863        if (strlen(
$_POST[
"name"]) > 0) {
 
 2864            $this->
object->addDefaults(
$_POST[
'name']);
 
 2868        $this->defaultsObject();
 
 2873        if (in_array($this->ctrl->getCmdClass(), self::$infoScreenChildClasses)) {
 
 2887        #if( !include 'competenzenRocker.php' ) exit; 
 2889        $this->ctrl->setCmd(
"showSummary");
 
 2890        $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
 2891        $this->infoScreen();
 
 2896        $this->ctrl->setCmd(
"showSummary");
 
 2897        $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
 2898        $this->infoScreen(
$_GET[
'lock']);
 
 2904    public function infoScreen($session_lock = 
"")
 
 2913        $ilAccess = 
$DIC[
'ilAccess'];
 
 2915        $ilToolbar = 
$DIC[
'ilToolbar'];
 
 2917        if (!$ilAccess->checkAccess(
"visible", 
"", $this->ref_id) && !$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"])) {
 
 2924        if ($ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"])) {
 
 2929        include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
 2931        $info->setOpenFormTag(
false);
 
 2934            return $this->ctrl->forwardCommand($info);
 
 2937        require_once 
'Modules/Test/classes/class.ilTestInfoScreenToolbarFactory.php';
 
 2939        $toolbarFactory->setTestOBJ($this->
object);
 
 2940        $toolbar = $toolbarFactory->getToolbarInstance();
 
 2945        $toolbar->setSessionLockString($session_lock);
 
 2949        if ($this->object->getShowInfo()) {
 
 2950            $info->enablePrivateNotes();
 
 2953        if (strlen($this->object->getIntroduction())) {
 
 2954            $info->addSection($this->lng->txt(
"tst_introduction"));
 
 2955            $info->addProperty(
"", $this->object->prepareTextareaOutput($this->object->getIntroduction(), 
true) .
 
 2956                    $info->getHiddenToggleButton());
 
 2958            $info->addSection($this->lng->txt(
"show_details"));
 
 2959            $info->addProperty(
"", $info->getHiddenToggleButton());
 
 2962        $info->addSection($this->lng->txt(
"tst_general_properties"));
 
 2963        if ($this->object->getShowInfo()) {
 
 2965                $this->lng->txt(
"author"),
 
 2967                    $this->object->getAuthor(),
 
 2972                $this->lng->txt(
"title"),
 
 2974                    $this->object->getTitle(),
 
 2979        if (!$this->object->getOfflineStatus() &&
 
 2980            $this->object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig()) &&
 
 2981            $ilAccess->checkAccess(
"read", 
"", $this->ref_id) &&
 
 2982            !$this->object->isRandomTest() &&
 
 2983            !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired() &&
 
 2984            $this->object->getNrOfTries() != 1) {
 
 2985            if ($this->object->getUsePreviousAnswers() == 0) {
 
 2986                if ($this->object->getShowInfo()) {
 
 2987                    $info->addProperty($this->lng->txt(
"tst_use_previous_answers"), $this->lng->txt(
"tst_dont_use_previous_answers"));
 
 2990                $checked_previous_answers = 
false;
 
 2991                if (
$ilUser->prefs[
"tst_use_previous_answers"]) {
 
 2992                    $checked_previous_answers = 
true;
 
 2994                $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);
 
 2998        $info->hideFurtherSections(
false);
 
 3000        if ($this->object->getShowInfo()) {
 
 3001            $info->addSection($this->lng->txt(
"tst_sequence_properties"));
 
 3002            $info->addProperty($this->lng->txt(
"tst_sequence"), $this->lng->txt(($this->object->getSequenceSettings() == 
TEST_FIXED_SEQUENCE)? 
"tst_sequence_fixed":
"tst_sequence_postpone"));
 
 3004            $info->addSection($this->lng->txt(
"tst_heading_scoring"));
 
 3005            $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"));
 
 3006            $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"));
 
 3007            if ($this->object->isRandomTest()) {
 
 3008                $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"));
 
 3011            $info->addSection($this->lng->txt(
"tst_score_reporting"));
 
 3012            $score_reporting_text = 
"";
 
 3013            switch ($this->object->getScoreReporting()) {
 
 3015                    $score_reporting_text = $this->lng->txt(
"tst_report_after_test");
 
 3018                    $score_reporting_text = $this->lng->txt(
"tst_report_after_first_question");
 
 3021                    $score_reporting_text = $this->lng->txt(
"tst_report_after_date");
 
 3024                    $score_reporting_text = $this->lng->txt(
"tst_report_after_passed");
 
 3027                    $score_reporting_text = $this->lng->txt(
"tst_report_never");
 
 3030            $info->addProperty($this->lng->txt(
"tst_score_reporting"), $score_reporting_text);
 
 3031            $reporting_date = $this->
object->getReportingDate();
 
 3032            if ($reporting_date) {
 
 3033                #preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches);
 
 3034                #$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]));
 
 3035                #$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date);
 
 3037                    $this->lng->txt(
'tst_score_reporting_date'),
 
 3042            $info->addSection($this->lng->txt(
"tst_session_settings"));
 
 3043            $info->addProperty($this->lng->txt(
"tst_nr_of_tries"), ($this->object->getNrOfTries() == 0)?$this->lng->txt(
"unlimited"):$this->object->getNrOfTries());
 
 3044            if ($this->object->getNrOfTries() != 1) {
 
 3045                $info->addProperty($this->lng->txt(
"tst_nr_of_tries_of_user"), (
$toolbar->getTestSession()->getPass() == 
false)?$this->lng->txt(
"tst_no_tries"):
$toolbar->getTestSequence()->getPass());
 
 3048            if ($this->object->getEnableProcessingTime()) {
 
 3049                $info->addProperty($this->lng->txt(
"tst_processing_time"), $this->object->getProcessingTime());
 
 3051            if (strlen($this->object->getAllowedUsers()) && ($this->object->getAllowedUsersTimeGap())) {
 
 3052                $info->addProperty($this->lng->txt(
"tst_allowed_users"), $this->object->getAllowedUsers());
 
 3055            $starting_time = $this->
object->getStartingTime();
 
 3056            if ($this->object->isStartingTimeEnabled() && $starting_time != 0) {
 
 3059            $ending_time = $this->
object->getEndingTime();
 
 3060            if ($this->object->isEndingTimeEnabled() && $ending_time != 0) {
 
 3063            $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
 
 3067        $this->ctrl->forwardCommand($info);
 
 3072        require_once 
'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
 
 3074        $qsaImportFails->deleteRegisteredImportFails();
 
 3076        require_once 
'Modules/Test/classes/class.ilTestSkillLevelThresholdImportFails.php';
 
 3078        $sltImportFails->deleteRegisteredImportFails();
 
 3080        $this->ctrl->redirect($this, 
'infoScreen');
 
 3086        $ilLocator = 
$DIC[
'ilLocator'];
 
 3087        switch ($this->ctrl->getCmd()) {
 
 3090            case "redirectToInfoScreen":
 
 3097            case "outCorrectSolution":
 
 3099            case "showAnswersOfUser":
 
 3100            case "outUserResultsOverview":
 
 3101            case "backFromSummary":
 
 3102            case "show_answers":
 
 3105            case "outTestSummary":
 
 3106            case "outQuestionSummary":
 
 3107            case "gotoQuestion":
 
 3108            case "selectImagemapRegion":
 
 3109            case "confirmSubmitAnswers":
 
 3110            case "finalSubmission":
 
 3112            case "outUserPassDetails":
 
 3113            case "checkPassword":
 
 3114                $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 
"infoScreen"), 
"", 
$_GET[
"ref_id"]);
 
 3117            case "evalAllUsers":
 
 3118            case "evalUserDetail":
 
 3119                $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 
"eval_stat"), 
"", 
$_GET[
"ref_id"]);
 
 3126            case "importVerifiedFile":
 
 3127            case "cancelImport":
 
 3130                $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 
""), 
"", 
$_GET[
"ref_id"]);
 
 3149        $output_gui = $guiFactory->create($this->
object);
 
 3151        $output_gui->certificateEditor();
 
 3162        $help = 
$DIC[
'ilHelp'];
 
 3163        $help->setScreenIdComponent(
"tst");
 
 3166            require_once 
'Services/Link/classes/class.ilLink.php';
 
 3168            $this->
getTabsManager()->setParentBackLabel($this->lng->txt(
'back_to_objective_container'));
 
 3180        $DIC->ctrl()->redirectByClass(
'ilObjTestGUI', 
"infoScreen");
 
 3194        $ilAccess = 
$DIC[
'ilAccess'];
 
 3198        if ($ilAccess->checkAccess(
"read", 
"", $a_target) || $ilAccess->checkAccess(
"visible", 
"", $a_target)) {
 
 3200            $_GET[
"baseClass"] = 
"ilObjTestGUI";
 
 3201            $_GET[
"cmd"] = 
"infoScreen";
 
 3202            $_GET[
"ref_id"] = $a_target;
 
 3203            include_once(
"ilias.php");
 
 3208                $lng->txt(
"msg_no_perm_read_item"),
 
 3225        if ($this->create_question_mode) {
 
 3230        $ilToolbar = 
$DIC[
'ilToolbar'];
 
 3231        $ilCtrl = 
$DIC[
'ilCtrl'];
 
 3234        require_once 
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
 
 3236        $ilCtrl->saveParameter($this, 
'q_mode');
 
 3238        $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'test_express_mode', 1);
 
 3239        $ilCtrl->setParameter($this, 
'test_express_mode', 1);
 
 3240        $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'q_id', $_REQUEST[
'q_id']);
 
 3241        $ilCtrl->setParameter($this, 
'q_id', $_REQUEST[
'q_id']);
 
 3242        $ilToolbar->setFormAction($ilCtrl->getFormActionByClass(
'iltestexpresspageobjectgui', 
'edit'));
 
 3244        if ($this->object->evalTotalPersons() == 0) {
 
 3265            $ilToolbar->addFormButton(
$lng->txt(
"ass_create_question"), 
"addQuestion");
 
 3267            $ilToolbar->addSeparator();
 
 3269            if ($this->object->getPoolUsage()) {
 
 3270                require_once 
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
 
 3274                $show_separator = 
true;
 
 3278        $questions = $this->
object->getQuestionTitlesAndIndexes();
 
 3282        foreach ($questions as $id => $label) {
 
 3283            $options[$id] = $label . 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . $id . 
']';
 
 3286        $optionKeys = array_keys($options);
 
 3289            $options[] = 
$lng->txt(
'none');
 
 3315        if (count($questions)) {
 
 3316            if (isset($show_separator) && $show_separator) {
 
 3317                $ilToolbar->addSeparator();
 
 3321            $btn->setCaption(
"test_prev_question");
 
 3322            $btn->setUrl($ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui', 
'prevQuestion'));
 
 3323            $ilToolbar->addButtonInstance($btn);
 
 3325            if (count($options) <= 1 || $optionKeys[0] == $qid) {
 
 3326                $btn->setDisabled(
true);
 
 3330            $btn->setCaption(
"test_next_question");
 
 3331            $btn->setUrl($ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui', 
'nextQuestion'));
 
 3332            $ilToolbar->addButtonInstance($btn);
 
 3334            if (count($options) <= 1 || $optionKeys[count($optionKeys) - 1] == $qid) {
 
 3335                $btn->setDisabled(
true);
 
 3339        if (count($questions) > 1) {
 
 3340            $ilToolbar->addSeparator();
 
 3342            include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 3344            $si->addCustomAttribute(
"onChange=\"forms['ilToolbar'].submit();\"");
 
 3345            $si->setOptions($options);
 
 3348                $si->setValue($qid);
 
 3351            $ilToolbar->addInputItem(
$si, 
true);
 
 3354        $total = $this->
object->evalTotalPersons();
 
 3369        if (count($questions) && !
$total) {
 
 3370            $ilCtrl->setParameter($this, 
'q_id', $_REQUEST[
'q_id']);
 
 3371            $ilToolbar->addSeparator();
 
 3372            $ilToolbar->addButton(
$lng->txt(
"test_delete_page"), $ilCtrl->getLinkTarget($this, 
"removeQuestions"));
 
 3375        if (count($questions) > 1 && !
$total) {
 
 3376            $ilToolbar->addSeparator();
 
 3377            $ilToolbar->addButton(
$lng->txt(
"test_move_page"), $ilCtrl->getLinkTarget($this, 
"movePageForm"));
 
 3381        $ilAccess = 
$DIC[
'ilAccess'];
 
 3384        $online_access = 
false;
 
 3385        if ($this->object->getFixedParticipants()) {
 
 3386            include_once 
"./Modules/Test/classes/class.ilObjTestAccess.php";
 
 3388            if ($online_access_result === 
true) {
 
 3389                $online_access = 
true;
 
 3393        if (!$this->object->getOfflineStatus() && $this->object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
 
 3394            if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read", 
"", $this->ref_id)) {
 
 3395                $testSession = $this->testSessionFactory->getSession();
 
 3397                $executable = $this->
object->isExecutable($testSession, 
$ilUser->getId(), $allowPassIncrease = 
true);
 
 3399                if ($executable[
"executable"]) {
 
 3401                    $player_instance = $player_factory->getPlayerGUI();
 
 3403                    if ($testSession->getActiveId() > 0) {
 
 3404                        $ilToolbar->addSeparator();
 
 3405                        $ilToolbar->addButton(
$lng->txt(
'tst_resume_test'), $ilCtrl->getLinkTarget($player_instance, 
'resumePlayer'));
 
 3407                        $ilToolbar->addSeparator();
 
 3408                        $ilToolbar->addButton(
$lng->txt(
'tst_start_test'), $ilCtrl->getLinkTarget($player_instance, 
'startTest'));
 
 3418        $this->ctrl->redirect($this, 
'questions');
 
 3424        foreach ($questionIds as $q_id) {
 
 3426            $newIds[$q_id] = $newId;
 
 3438        require_once 
'Modules/TestQuestionPool/classes/class.assQuestion.php';
 
 3441        $newtitle = $question_gui->object->getTitle();
 
 3442        if ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle())) {
 
 3444            while ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle() . 
" ($counter)")) {
 
 3447            $newtitle = $question_gui->object->getTitle() . 
" ($counter)";
 
 3450        return $question_gui->object->createNewOriginalFromThisDuplicate($targetParentId, $newtitle);
 
 3459        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
 3461        if (!(
int) $_REQUEST[
'sel_qpl']) {
 
 3466        $qplId = $ilObjDataCache->lookupObjId($_REQUEST[
'sel_qpl']);
 
 3469        foreach (
$result->ids as $oldId => $newId) {
 
 3474                $oldOriginal->delete($oldOriginal->getId());
 
 3477            $questionInstance->setNewOriginalId($newId);
 
 3480        ilUtil::sendSuccess($this->lng->txt(
'tst_qst_added_to_pool_' . (count(
$result->ids) > 1 ? 
'p' : 
's')), 
true);
 
 3481        $this->ctrl->redirect($this, 
'questions');
 
 3488        include_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
 3492        $title->setRequired(
true);
 
 3493        $form->addItem($title);
 
 3496        $form->addItem($description);
 
 3498        $form->addCommandButton(
'createQuestionPoolAndCopy', 
$lng->txt(
'create'));
 
 3500        if (isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id'])) {
 
 3501            foreach ($_REQUEST[
'q_id'] as $id) {
 
 3503                $hidden->setValue($id);
 
 3504                $form->addItem($hidden);
 
 3521        require_once 
'Modules/TestQuestionPool/classes/class.assQuestion.php';
 
 3525            'copyAndLinkToQuestionpool' == $this->ctrl->getCmd() &&
 
 3526            (!isset($_REQUEST[
'q_id']) || !is_array($_REQUEST[
'q_id']))
 
 3529            $this->ctrl->redirect($this, 
'questions');
 
 3532        if (isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id'])) {
 
 3533            foreach ($_REQUEST[
'q_id'] as $q_id) {
 
 3540                if (
$type !== 
'tst') {
 
 3542                    $this->ctrl->redirect($this, 
'questions');
 
 3553        if ($_REQUEST[
'title']) {
 
 3554            $title = $_REQUEST[
'title'];
 
 3556            $title = $_REQUEST[
'txt_qpl'];
 
 3565        $_REQUEST[
'sel_qpl'] = 
$ref_id;
 
 3590        $questionpools = $this->
object->getAvailableQuestionpools(
 
 3599        if (count($questionpools) == 0) {
 
 3605                case 'copyQuestionsToPool':
 
 3608                case 'copyAndLinkQuestionsToPool':
 
 3610                    $hidden->setValue(1);
 
 3611                    $form->addItem($hidden);
 
 3616        $DIC->ui()->mainTemplate()->setContent($form->getHTML());
 
 3624        $form->setFormAction(
$DIC->ctrl()->getFormAction($this));
 
 3625        $form->addCommandButton($cmd, 
$DIC->language()->txt(
'submit'));
 
 3626        $form->addCommandButton(
'cancelCreateQuestion', 
$DIC->language()->txt(
'cancel'));
 
 3628        if (count($questionpools) == 0) {
 
 3629            $form->setTitle($this->lng->txt(
"tst_enter_questionpool"));
 
 3632            $title->setRequired(
true);
 
 3633            $form->addItem($title);
 
 3636            $form->addItem($description);
 
 3638            $form->setTitle($this->lng->txt(
"tst_select_questionpool"));
 
 3641                '' => 
$DIC->language()->txt(
'please_select')
 
 3644            foreach ($questionpools as $key => $value) {
 
 3645                $selectOptions[$key] = $value[
"title"];
 
 3649            $select->setRequired(
true);
 
 3650            $select->setOptions($selectOptions);
 
 3652            $form->addItem($select);
 
 3655        if (isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id'])) {
 
 3656            foreach ($_REQUEST[
'q_id'] as $id) {
 
 3658                $hidden->setValue($id);
 
 3659                $form->addItem($hidden);
 
 3671        $simpleSetters = array(
 
 3674            'use_pool' => 
'setPoolUsage',
 
 3675            'question_set_type' => 
'setQuestionSetType',
 
 3678            'intro_enabled' => 
'setIntroductionEnabled',
 
 3679            'showinfo' => 
'setShowInfo',
 
 3682            'chb_starting_time' => 
'setStartingTimeEnabled',
 
 3683            'chb_ending_time' => 
'setEndingTimeEnabled',
 
 3684            'password_enabled' => 
'setPasswordEnabled',
 
 3685            'fixedparticipants' => 
'setFixedParticipants',
 
 3686            'limitUsers' => 
'setLimitUsersEnabled',
 
 3689            'nr_of_tries' => 
'setNrOfTries',
 
 3690            'chb_processing_time' => 
'setEnableProcessingTime',
 
 3691            'kiosk' => 
'setKiosk',
 
 3692            'examid_in_test_pass' => 
'setShowExamIdInTestPassEnabled',
 
 3695            'title_output' => 
'setTitleOutput',
 
 3697            'chb_shuffle_questions' => 
'setShuffleQuestions',
 
 3698            'offer_hints' => 
'setOfferingQuestionHintsEnabled',
 
 3699            'instant_feedback_contents' => 
'setInstantFeedbackOptionsByArray',
 
 3700            'instant_feedback_trigger' => 
'setForceInstantFeedbackEnabled',
 
 3701            'answer_fixation_handling' => 
null, 
 
 3702            'obligations_enabled' => 
'setObligationsEnabled',
 
 3705            'chb_use_previous_answers' => 
'setUsePreviousAnswers',
 
 3706            'chb_show_cancel' => 
'setShowCancel',
 
 3707            'chb_postpone' => 
'setPostponingEnabled',
 
 3708            'list_of_questions' => 
'setListOfQuestionsSettings',
 
 3709            'chb_show_marker' => 
'setShowMarker',
 
 3712            'enable_examview' => 
'setEnableExamview',
 
 3713            'showfinalstatement' => 
'setShowFinalStatement',
 
 3714            'redirection_enabled' => 
null, 
 
 3715            'sign_submission' => 
'setSignSubmission',
 
 3716            'mailnotification' => 
'setMailNotification',
 
 3719            'count_system' => 
'setCountSystem',
 
 3720            'mc_scoring' => 
'setMCScoring',
 
 3721            'score_cutting' => 
'setScoreCutting',
 
 3722            'pass_scoring' => 
'setPassScoring',
 
 3723            'pass_deletion_allowed' => 
'setPassDeletionAllowed',
 
 3726            'results_access_enabled' => 
'setScoreReporting',
 
 3727            'grading_status' => 
'setShowGradingStatusEnabled',
 
 3728            'grading_mark' => 
'setShowGradingMarkEnabled',
 
 3731            'solution_details' => 
'setShowSolutionDetails',
 
 3732            'solution_feedback' => 
'setShowSolutionFeedback',
 
 3733            'solution_suggested' => 
'setShowSolutionSuggested',
 
 3734            'solution_printview' => 
'setShowSolutionPrintview',
 
 3735            'highscore_enabled' => 
'setHighscoreEnabled',
 
 3736            'solution_signature' => 
'setShowSolutionSignature',
 
 3737            'examid_in_test_res' => 
'setShowExamIdInTestResultsEnabled',
 
 3738            'exp_sc_short' => 
'setExportSettingsSingleChoiceShort',
 
 3741            'anonymity' => 
'setAnonymity',
 
 3742            'enable_archiving' => 
'setEnableArchiving' 
 3745        if (!$templateData[
'results_presentation'][
'value']) {
 
 3746            $templateData[
'results_presentation'][
'value'] = array();
 
 3749        foreach ($simpleSetters as $field => $setter) {
 
 3750            if ($templateData[$field] && strlen($setter)) {
 
 3751                $object->$setter($templateData[$field][
'value']);
 
 3757                    if ($templateData[$field][
'value'] > 0) {
 
 3759                        $object->setAutosaveIval($templateData[$field][
'value'] * 1000);
 
 3765                case 'redirection_enabled':
 
 3774                    if (strlen($templateData[$field][
'value'])) {
 
 3776                        $object->setRedirectionUrl($templateData[$field][
'value']);
 
 3779                        $object->setRedirectionUrl(
'');
 
 3783                case 'answer_fixation_handling':
 
 3784                    switch ($templateData[$field][
'value']) {
 
 3786                            $object->setInstantFeedbackAnswerFixationEnabled(
false);
 
 3787                            $object->setFollowupQuestionAnswerFixationEnabled(
false);
 
 3791                            $object->setInstantFeedbackAnswerFixationEnabled(
true);
 
 3792                            $object->setFollowupQuestionAnswerFixationEnabled(
false);
 
 3796                            $object->setInstantFeedbackAnswerFixationEnabled(
false);
 
 3797                            $object->setFollowupQuestionAnswerFixationEnabled(
true);
 
 3801                            $object->setInstantFeedbackAnswerFixationEnabled(
true);
 
 3802                            $object->setFollowupQuestionAnswerFixationEnabled(
true);
 
 3813        $ilAccess = 
$DIC[
'ilAccess'];
 
 3814        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 3817            $this->ctrl->redirect($this, 
"infoScreen");
 
 3821        $ilCtrl = 
$DIC[
'ilCtrl'];
 
 3823        $orders = $obligations = array();
 
 3825        foreach ((array) $_REQUEST[
'order'] as $qId => $order) {
 
 3826            $id = (int) str_replace(
'q_', 
'', $qId);
 
 3828            $orders[$id] = $order;
 
 3831        if ($this->object->areObligationsEnabled() && isset($_REQUEST[
'obligatory']) && is_array($_REQUEST[
'obligatory'])) {
 
 3832            foreach ($_REQUEST[
'obligatory'] as $qId => $obligation) {
 
 3833                $id = (int) str_replace(
'q_', 
'', $qId);
 
 3836                    $obligations[$id] = $obligation;
 
 3841        $this->
object->setQuestionOrderAndObligations(
 
 3846        ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'), 
true);
 
 3847        $ilCtrl->redirect($this, 
'questions');
 
 3857        $ilCtrl = 
$DIC[
'ilCtrl'];
 
 3860        include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
 3862        $form->setFormAction($ilCtrl->getFormAction($this, 
"movePage"));
 
 3863        $form->setTitle(
$lng->txt(
"test_move_page"));
 
 3866        $old_pos->setValue($_REQUEST[
'q_id']);
 
 3867        $form->addItem($old_pos);
 
 3869        $questions = $this->
object->getQuestionTitlesAndIndexes();
 
 3870        if (!is_array($questions)) {
 
 3871            $questions = array();
 
 3874        foreach ($questions as $k => $q) {
 
 3875            if ($k == $_REQUEST[
'q_id']) {
 
 3876                unset($questions[$k]);
 
 3879            $questions[$k] = 
$lng->txt(
'behind') . 
' ' . $q;
 
 3881        #$questions['0'] = $lng->txt('first'); 
 3884            0 => 
$lng->txt(
'first')
 
 3886        foreach ($questions as $k => $q) {
 
 3887            $options[$k] = $q . 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . $k . 
']';
 
 3891        $pos->setOptions($options);
 
 3892        $form->addItem($pos);
 
 3894        $form->addCommandButton(
"movePage", 
$lng->txt(
"submit"));
 
 3895        $form->addCommandButton(
"showPage", 
$lng->txt(
"cancel"));
 
 3897        return $tpl->setContent($form->getHTML());
 
 3903        $ilAccess = 
$DIC[
'ilAccess'];
 
 3904        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 3907            $this->ctrl->redirect($this, 
"infoScreen");
 
 3910        $this->
object->moveQuestionAfter($_REQUEST[
'q_id'], $_REQUEST[
'position_after']);
 
 3917        $ilCtrl = 
$DIC[
'ilCtrl'];
 
 3919        $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui', 
'q_id', $_REQUEST[
'q_id']);
 
 3920        $ilCtrl->redirectByClass(
'iltestexpresspageobjectgui', 
'showPage');
 
 3926        $ilAccess = 
$DIC[
'ilAccess'];
 
 3927        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
 3930            $this->ctrl->redirect($this, 
"infoScreen");
 
 3933        if ($_REQUEST[
'q_id'] && !is_array($_REQUEST[
'q_id'])) {
 
 3934            $ids = array($_REQUEST[
'q_id']);
 
 3935        } elseif ($_REQUEST[
'q_id']) {
 
 3936            $ids = $_REQUEST[
'q_id'];
 
 3939            $this->ctrl->redirect($this, 
'questions');
 
 3944        $questionTitles = $this->
object->getQuestionTitles();
 
 3946        foreach ($ids as $id) {
 
 3947            include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
 3950                $title = $question->object->getTitle();
 
 3952                while (in_array($title . 
' (' . 
$i . 
')', $questionTitles)) {
 
 3956                $title .= 
' (' . 
$i . 
')';
 
 3958                $questionTitles[] = $title;
 
 3960                $new_id = $question->object->duplicate(
false, $title);
 
 3963                $clone->object->setObjId($this->object->getId());
 
 3964                $clone->object->saveToDb();
 
 3966                $this->
object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $new_id, 
true);
 
 3972        ilUtil::sendSuccess($this->lng->txt(
'copy_questions_success'), 
true);
 
 3974        $this->ctrl->redirect($this, 
'questions');
 
 3979        require_once 
'Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
 3984        $this->objectiveOrientedContainer->setObjId($containerObjId);
 
 3985        $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.
const ADDITIONAL_CONTENT_EDITING_MODE_RTE
constant for additional content editing mode "default"
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_IPE
constant for additional content editing mode "pageobject"
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
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
importFileObject($parent_id=null, $a_catch_errors=true)
form for new test object import
trackTestObjectReadEvent()
testResultsGatewayObject()
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()
redirectAfterMissingRead()
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.
redirectAfterMissingWrite()
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
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
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.
Legacy Content Object Parser.
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
@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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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(string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
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