4 require_once
'./Modules/Test/exceptions/class.ilTestException.php';
5 require_once
'./Services/Object/classes/class.ilObjectGUI.php';
6 require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
7 require_once
'./Modules/Test/classes/class.ilObjAssessmentFolderGUI.php';
8 require_once
'./Modules/Test/classes/class.ilObjAssessmentFolder.php';
9 require_once
'./Modules/Test/classes/class.ilTestExpressPage.php';
51 'ilpublicuserprofilegui',
'ilobjportfoliogui' 81 $lng->loadLanguageModule(
"assessment");
84 $this->ctrl->saveParameter($this,
array(
"ref_id",
"test_ref_id",
"calling_test",
"test_express_mode",
"q_id"));
85 parent::__construct(
"",
$_GET[
"ref_id"],
true,
false);
89 require_once
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
92 require_once
'Modules/Test/classes/class.ilTestPlayerFactory.php';
95 require_once
'Modules/Test/classes/class.ilTestSessionFactory.php';
98 require_once
'Modules/Test/classes/class.ilTestSequenceFactory.php';
102 require_once
'Modules/Test/classes/class.ilTestObjectiveOrientedContainer.php';
111 global $ilAccess, $ilNavigationHistory,
$ilCtrl,
$ilErr,
$tpl,
$lng, $ilTabs, $ilPluginAdmin,
$ilDB,
$tree,
$ilias,
$ilUser;
113 if((!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])))
115 $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
118 $cmd = $this->ctrl->getCmd(
"infoScreen");
120 $cmdsDisabledDueToOfflineStatus =
array(
121 'resumePlayer',
'resumePlayer',
'outUserResultsOverview',
'outUserListOfAnswerPasses' 129 $next_class = $this->ctrl->getNextClass($this);
130 $this->ctrl->setReturn($this,
"infoScreen");
132 if(method_exists($this->
object,
"getTestStyleLocation")) $this->tpl->addCss($this->
object->getTestStyleLocation(
"output"),
"screen");
136 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])
139 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
140 "ilias.php?baseClass=ilObjTestGUI&cmd=infoScreen&ref_id=" .
$_GET[
"ref_id"],
"tst");
144 if($_REQUEST[
'prev_qid'])
146 global $___prev_question_id;
147 $___prev_question_id = $_REQUEST[
'prev_qid'];
148 $this->ctrl->setParameter($this,
'prev_qid', $_REQUEST[
'prev_qid']);
151 if( !$this->
getCreationMode() && $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken() )
153 if( !$this->testQuestionSetConfigFactory->getQuestionSetConfig()->isValidRequestOnBrokenQuestionSetDepencies($next_class,
$cmd) )
155 $this->ctrl->redirectByClass(
'ilObjTestGUI',
'infoScreen');
163 case 'iltestexportgui':
164 if(!$ilAccess->checkAccess(
'write',
'', $this->ref_id))
166 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
171 require_once
'Modules/Test/classes/class.ilTestExportGUI.php';
175 case "ilinfoscreengui":
180 case 'ilobjectmetadatagui':
181 if(!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId()))
183 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
188 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
190 $this->ctrl->forwardCommand($md_gui);
193 case "iltestplayerfixedquestionsetgui":
195 require_once
"./Modules/Test/classes/class.ilTestPlayerFixedQuestionSetGUI.php";
199 $this->ctrl->forwardCommand($gui);
202 case "iltestplayerrandomquestionsetgui":
204 require_once
"./Modules/Test/classes/class.ilTestPlayerRandomQuestionSetGUI.php";
208 $this->ctrl->forwardCommand($gui);
211 case "iltestplayerdynamicquestionsetgui":
213 require_once
"./Modules/Test/classes/class.ilTestPlayerDynamicQuestionSetGUI.php";
217 $this->ctrl->forwardCommand($gui);
220 case "iltestevaluationgui":
224 case "iltestevalobjectiveorientedgui":
228 case "iltestservicegui":
231 require_once
"./Modules/Test/classes/class.ilTestServiceGUI.php";
233 $this->ctrl->forwardCommand($serviceGUI);
236 case 'ilpermissiongui':
239 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
241 $ret = $this->ctrl->forwardCommand($perm_gui);
244 case "illearningprogressgui":
247 require_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
249 $this->ctrl->forwardCommand($new_gui);
253 case "ilcertificategui":
256 require_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
257 require_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
259 $this->ctrl->forwardCommand($output_gui);
262 case "iltestscoringgui":
265 require_once
"./Modules/Test/classes/class.ilTestScoringGUI.php";
267 $this->ctrl->forwardCommand($output_gui);
270 case 'ilmarkschemagui':
271 if(!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId()))
274 $this->ctrl->redirect($this,
'infoScreen');
278 require_once
'Modules/Test/classes/class.ilMarkSchemaGUI.php';
280 $this->ctrl->forwardCommand($mark_schema_gui);
283 case 'iltestscoringbyquestionsgui':
286 include_once
'Modules/Test/classes/class.ilTestScoringByQuestionsGUI.php';
288 $this->ctrl->forwardCommand($output_gui);
291 case 'ilobjtestsettingsgeneralgui':
294 require_once
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
296 $this->ctrl, $ilAccess, $this->lng, $this->tpl, $this->tree, $ilDB, $ilPluginAdmin, $ilUser, $this
298 $this->ctrl->forwardCommand($gui);
301 case 'ilobjtestsettingsscoringresultsgui':
304 require_once
'Modules/Test/classes/class.ilObjTestSettingsScoringResultsGUI.php';
306 $this->ctrl, $ilAccess, $this->lng, $this->tpl, $this->tree, $ilDB, $ilPluginAdmin, $this
308 $this->ctrl->forwardCommand($gui);
311 case 'ilobjtestdynamicquestionsetconfiggui':
314 require_once
'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfigGUI.php';
316 $this->ctrl->forwardCommand($gui);
319 case 'iltestrandomquestionsetconfiggui':
322 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetConfigGUI.php';
324 $this->ctrl->forwardCommand($gui);
327 case 'iltestquestionbrowsertablegui':
330 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
331 $gui =
new ilTestQuestionBrowserTableGUI($this->ctrl, $this->tpl, $ilTabs, $this->lng, $tree, $ilDB, $ilPluginAdmin, $this->
object, $ilAccess);
332 $gui->setWriteAccess($ilAccess->checkAccess(
"write",
"", $this->ref_id));
334 $this->ctrl->forwardCommand($gui);
337 case 'iltestskilladministrationgui':
340 require_once
'Modules/Test/classes/class.ilTestSkillAdministrationGUI.php';
341 $gui =
new ilTestSkillAdministrationGUI($ilias, $this->ctrl, $ilAccess, $ilTabs, $this->tpl, $this->lng, $ilDB, $tree, $ilPluginAdmin, $this->
object, $this->ref_id);
342 $this->ctrl->forwardCommand($gui);
345 case 'iltestskillevaluationgui':
349 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
350 if( $this->
object->isDynamicTest() )
352 require_once
'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php';
354 $dynamicQuestionSetConfig->loadFromDb();
356 $questionList->setParentObjId($dynamicQuestionSetConfig->getSourceQuestionPoolId());
362 $questionList->setParentObjId($this->
object->getId());
365 $questionList->load();
367 require_once
'Modules/Test/classes/class.ilTestSessionFactory.php';
371 require_once
'Modules/Test/classes/class.ilTestSkillEvaluationGUI.php';
373 $gui->setQuestionList($questionList);
374 $gui->setTestSession($testSession);
376 $this->ctrl->forwardCommand($gui);
379 case 'ilobjectcopygui':
382 require_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
385 $this->ctrl->forwardCommand($cp);
388 case 'ilrepositorysearchgui':
391 require_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
393 $rep_search->setCallback($this,
394 'addParticipantsObject',
399 $this->ctrl->setReturn($this,
'participants');
400 $ret =& $this->ctrl->forwardCommand($rep_search);
401 $this->tabs_gui->setTabActive(
'participants');
404 case 'ilpageeditorgui':
405 case 'iltestexpresspageobjectgui':
407 require_once
'Modules/TestQuestionPool/classes/class.ilAssIncompleteQuestionPurger.php';
409 $incompleteQuestionPurger->setOwnerId($ilUser->getId());
410 $incompleteQuestionPurger->purge();
422 if(!in_array(
$cmd,
array(
'addQuestion',
'browseForQuestions')))
427 if(!$qid || in_array(
$cmd,
array(
'insertQuestions',
'browseForQuestions')))
429 require_once
"./Modules/Test/classes/class.ilTestExpressPageObjectGUI.php";
432 $ret =& $this->ctrl->forwardCommand($pageObject);
435 require_once
"./Services/Style/Content/classes/class.ilObjStyleSheet.php";
436 $this->tpl->setCurrentBlock(
"ContentStyle");
437 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
439 $this->tpl->parseCurrentBlock();
442 $this->tpl->setCurrentBlock(
"SyntaxStyle");
443 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
445 $this->tpl->parseCurrentBlock();
446 require_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
451 $this->ctrl->setParameterByClass(
'iltestexpresspageobjectgui',
'q_id',
'');
452 $this->ctrl->redirectByClass(
'iltestexpresspageobjectgui', $this->ctrl->getCmd());
457 $q_gui->outAdditionalOutput();
458 $q_gui->object->setObjId($this->
object->getId());
460 $q_gui->setTargetGuiClass(null);
461 $q_gui->setQuestionActionCmd(null);
463 $question = $q_gui->object;
464 $this->ctrl->saveParameter($this,
"q_id");
466 #$this->lng->loadLanguageModule("content"); 467 $this->ctrl->setReturnByClass(
"ilTestExpressPageObjectGUI",
"view");
468 $this->ctrl->setReturn($this,
"questions");
470 require_once
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php";
471 require_once
"./Modules/Test/classes/class.ilTestExpressPageObjectGUI.php";
475 $page_gui->setEditPreview(
true);
476 $page_gui->setEnabledTabs(
false);
477 if(strlen($this->ctrl->getCmd()) == 0)
479 $this->ctrl->setCmdClass(get_class($page_gui));
480 $this->ctrl->setCmd(
"preview");
483 $page_gui->setQuestionHTML(
array($q_gui->object->getId() => $q_gui->getPreview(TRUE)));
484 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
486 $page_gui->setOutputMode($this->
object->evalTotalPersons() == 0 ?
"edit" :
'preview');
488 $page_gui->setHeader($question->getTitle());
489 $page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this,
"downloadFile"));
490 $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this,
"fullscreen"));
491 $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this));
492 $page_gui->setPresentationTitle($question->getTitle() .
' ['. $this->lng->txt(
'question_id_short') .
': ' . $question->getId() .
']');
493 $ret =& $this->ctrl->forwardCommand($page_gui);
496 $ilTabs->activateTab(
'assQuestions');
498 $this->tpl->setContent(
$ret);
501 case 'ilassquestionpreviewgui':
505 $this->ctrl->saveParameter($this,
"q_id");
507 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
511 $gui->initPreviewSettings($this->
object->getRefId());
512 $gui->initPreviewSession($ilUser->getId(), (int)
$_GET[
'q_id']);
513 $gui->initHintTracking();
514 $gui->initStyleSheets();
516 $this->ctrl->forwardCommand($gui);
520 case 'ilassquestionpagegui':
524 require_once
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
526 if($_REQUEST[
'prev_qid'])
528 $this->ctrl->setParameter($this,
'prev_qid', $_REQUEST[
'prev_qid']);
534 $_GET[
'calling_test'] = $this->
object->getRefId();
535 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
536 $this->tpl->setCurrentBlock(
"ContentStyle");
537 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
539 $this->tpl->parseCurrentBlock();
542 $this->tpl->setCurrentBlock(
"SyntaxStyle");
543 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
545 $this->tpl->parseCurrentBlock();
546 require_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
549 $q_gui->setQuestionTabs();
550 $q_gui->outAdditionalOutput();
551 $q_gui->object->setObjId($this->
object->getId());
552 $question =& $q_gui->object;
553 $this->ctrl->saveParameter($this,
"q_id");
554 $this->lng->loadLanguageModule(
"content");
555 $this->ctrl->setReturnByClass(
"ilAssQuestionPageGUI",
"view");
556 $this->ctrl->setReturn($this,
"questions");
558 $page_gui->setEditPreview(
true);
559 if(strlen($this->ctrl->getCmd()) == 0)
561 $this->ctrl->setCmdClass(get_class($page_gui));
562 $this->ctrl->setCmd(
"preview");
564 $page_gui->setQuestionHTML(
array($q_gui->object->getId() => $q_gui->getPreview(TRUE)));
565 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
566 $page_gui->setOutputMode($this->
object->evalTotalPersons() == 0 ?
"edit" :
'preview');
567 $page_gui->setHeader($question->getTitle());
568 $page_gui->setPresentationTitle($question->getTitle() .
' ['. $this->lng->txt(
'question_id_short') .
': ' . $question->getId() .
']');
569 $ret =& $this->ctrl->forwardCommand($page_gui);
570 $this->tpl->setContent(
$ret);
573 case 'ilassspecfeedbackpagegui':
574 require_once
"./Modules/TestQuestionPool/classes/feedback/class.ilAssSpecFeedbackPageGUI.php";
576 $this->ctrl->forwardCommand($pg_gui);
579 case 'ilassgenfeedbackpagegui':
580 require_once
"./Modules/TestQuestionPool/classes/feedback/class.ilAssGenFeedbackPageGUI.php";
582 $this->ctrl->forwardCommand($pg_gui);
585 case 'illocalunitconfigurationgui':
589 $this->ctrl->setReturn($this,
"questions");
592 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
594 $questionGUI->object->setObjId($this->
object->getId());
595 $questionGUI->setQuestionTabs();
597 require_once
'Modules/TestQuestionPool/classes/class.ilLocalUnitConfigurationGUI.php';
598 require_once
'Modules/TestQuestionPool/classes/class.ilUnitConfigurationRepository.php';
602 $this->ctrl->forwardCommand($gui);
605 case "ilcommonactiondispatchergui":
606 require_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
608 $this->ctrl->forwardCommand($gui);
611 case 'ilassquestionhintsgui':
616 $this->ctrl->setReturn($this,
"questions");
619 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
621 $questionGUI->object->setObjId($this->
object->getId());
622 $questionGUI->setQuestionTabs();
625 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
630 $gui->setEditingEnabled(
631 $DIC->access()->checkAccess(
'write',
'', $this->
object->getRefId())
634 $ilCtrl->forwardCommand($gui);
638 case 'ilassquestionfeedbackeditinggui':
643 $this->ctrl->setReturn($this,
"questions");
646 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
648 $questionGUI->object->setObjId($this->
object->getId());
649 $questionGUI->setQuestionTabs();
652 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
654 $ilCtrl->forwardCommand($gui);
658 case 'iltesttoplistgui':
660 require_once
'./Modules/Test/classes/class.ilTestToplistGUI.php';
662 $this->ctrl->forwardCommand($gui);
665 case 'ilscoringadjustmentgui':
667 require_once
'./Modules/Test/classes/class.ilScoringAdjustmentGUI.php';
669 $this->ctrl->forwardCommand($gui);
676 if((strcmp(
$cmd,
"properties") == 0) && ($_GET[
"browse"]))
678 $this->questionBrowser();
681 if((strcmp(
$cmd,
"properties") == 0) && ($_GET[
"up"] || $_GET[
"down"]))
691 if($_REQUEST[
'prev_qid'])
693 global $___prev_question_id;
694 $___prev_question_id = $_REQUEST[
'prev_qid'];
695 $this->ctrl->setParameterByClass(
'ilassquestionpagegui',
'prev_qid', $_REQUEST[
'prev_qid']);
696 $this->ctrl->setParameterByClass($_GET[
'sel_question_types'] .
'gui',
'prev_qid', $_REQUEST[
'prev_qid']);
698 $this->create_question_mode =
true;
701 $this->ctrl->setReturn($this,
"questions");
702 require_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
705 $q_gui->object->setObjId($this->
object->getId());
706 if(!$_GET[
'sel_question_types'])
710 $qType = $_GET[
'sel_question_types'];
712 $this->ctrl->setParameterByClass($qType .
"GUI",
'prev_qid', $_REQUEST[
'prev_qid']);
713 $this->ctrl->setParameterByClass($qType .
"GUI",
'test_ref_id', $_REQUEST[
'ref_id']);
714 $this->ctrl->setParameterByClass($qType .
"GUI",
'q_id', $_REQUEST[
'q_id']);
715 if($_REQUEST[
'test_express_mode'])
716 $this->ctrl->setParameterByClass($qType .
"GUI",
'test_express_mode', 1);
718 #global $___test_express_mode; 719 #$___test_express_mode = true; 720 if(!$q_gui->isSaveCommand())
721 $_GET[
'calling_test'] = $this->
object->getRefId();
723 $q_gui->setQuestionTabs();
724 #unset($___test_express_mode); 725 $ret =& $this->ctrl->forwardCommand($q_gui);
728 if ( !in_array(strtolower(
$_GET[
"baseClass"]),
array(
'iladministrationgui',
'ilrepositorygui')) &&
739 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
742 $this->
object->getType(), $this->
object->getRefId(),
743 $this->
object->getId(), $DIC->user()->getId()
754 $DIC->ctrl()->redirectByClass(
'ilTestExportGUI');
762 $qid = $_REQUEST[
'q_id'];
764 if (!$qid || $qid ==
'Array')
766 $questions = $this->
object->getQuestionTitlesAndIndexes();
767 if (!is_array($questions))
768 $questions =
array();
770 $keys = array_keys($questions);
773 $_REQUEST[
'q_id'] = $qid;
774 $_GET[
'q_id'] = $qid;
778 if( $this->
object->checkQuestionParent($qid) )
783 throw new ilTestException(
'question id does not relate to parent object!');
788 switch( $this->
object->getQuestionSetType() )
791 $this->ctrl->redirectByClass(
'ilTestExpressPageObjectGUI',
'showPage');
794 $this->ctrl->redirectByClass(
'ilTestRandomQuestionSetConfigGUI');
797 $this->ctrl->redirectByClass(
'ilObjTestDynamicQuestionSetConfigGUI');
803 $this->ctrl->setCmdClass(
'ilTestEvaluationGUI');
804 $this->ctrl->setCmd(
'outUserResultsOverview');
805 $this->tabs_gui->clearTargets();
815 require_once
'Modules/Test/classes/class.ilTestEvaluationGUI.php';
819 $this->ctrl->forwardCommand($gui);
827 require_once
'Modules/Test/classes/class.ilTestEvalObjectiveOrientedGUI.php';
831 $this->ctrl->forwardCommand($gui);
842 public function createUserResults($show_pass_details, $show_answers, $show_reached_points, $show_user_results)
844 global $ilTabs,
$ilDB;
849 require_once
'Services/PDFGeneration/classes/class.ilPDFGeneration.php';
853 $ilTabs->setBackTarget(
854 $this->lng->txt(
'back'), $this->ctrl->getLinkTarget($this,
'participants')
859 require_once
'Services/Link/classes/class.ilLink.php';
861 $ilTabs->setBack2Target($this->lng->txt(
'back_to_objective_container'), $courseLink);
864 $template =
new ilTemplate(
"tpl.il_as_tst_participants_result_output.html", TRUE, TRUE,
"Modules/Test");
866 require_once
'Modules/Test/classes/toolbars/class.ilTestResultsToolbarGUI.php';
869 $this->ctrl->setParameter($this,
'pdf',
'1');
870 $toolbar->setPdfExportLinkTarget( $this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()) );
871 $this->ctrl->setParameter($this,
'pdf',
'');
875 if( isset(
$_GET[
'show_best_solutions']) )
877 $_SESSION[
'tst_results_show_best_solutions'] =
true;
879 elseif( isset(
$_GET[
'hide_best_solutions']) )
881 $_SESSION[
'tst_results_show_best_solutions'] =
false;
883 elseif( !isset(
$_SESSION[
'tst_results_show_best_solutions']) )
885 $_SESSION[
'tst_results_show_best_solutions'] =
false;
888 if(
$_SESSION[
'tst_results_show_best_solutions'] )
890 $this->ctrl->setParameter($this,
'hide_best_solutions',
'1');
891 $toolbar->setHideBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
892 $this->ctrl->setParameter($this,
'hide_best_solutions',
'');
896 $this->ctrl->setParameter($this,
'show_best_solutions',
'1');
897 $toolbar->setShowBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
898 $this->ctrl->setParameterByClass(
'',
'show_best_solutions',
'');
902 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
904 if( $this->
object->getFixedParticipants() )
906 $participantData->setUserIds($show_user_results);
910 $participantData->setActiveIds($show_user_results);
912 $participantData->load($this->
object->getTestId());
913 $toolbar->setParticipantSelectorOptions($participantData->getOptionArray($show_user_results));
916 $template->setVariable(
'RESULTS_TOOLBAR', $this->ctrl->getHTML($toolbar));
918 include_once
"./Modules/Test/classes/class.ilTestServiceGUI.php";
921 $serviceGUI->setParticipantData($participantData);
924 foreach ($show_user_results as $key => $active_id)
928 if ($this->
object->getFixedParticipants())
930 $active_id = $this->
object->getActiveIdOfUser( $active_id );
934 $results = $serviceGUI->getResultsOfUserOutput(
935 $this->testSessionFactory->getSession( $active_id ),
937 $this->
object->_getResultPass( $active_id ),
945 if ($count < count( $show_user_results ))
947 $template->touchBlock(
"break" );
949 $template->setCurrentBlock(
"user_result" );
950 $template->setVariable(
"USER_RESULT",
$results );
951 $template->parseCurrentBlock();
956 require_once
'class.ilTestPDFGenerator.php';
970 require_once
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
986 $this->tpl->getStandardTemplate();
998 if ($ilUser->getId() != ANONYMOUS_USER_ID)
1000 require_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1011 $this->ctrl->redirect($this,
"infoScreen");
1016 $this->ctrl->redirectByClass(
"iltestevaluationgui",
"outEvaluation");
1025 if($form->checkInput())
1027 $this->ctrl->setParameter($this,
"new_type", $this->type);
1032 $form->setValuesByPost();
1033 $this->tpl->setContent($form->getHTML());
1038 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
1040 $defaults = $tst->getAvailableDefaults();
1041 if (count($defaults))
1043 foreach ($defaults as
$row)
1045 $a_options[
"tstdef_".$row[
"test_defaults_id"]] =
array($row[
"name"],
1046 $this->lng->txt(
"tst_default_settings"));
1051 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
1055 foreach($templates as $item)
1057 $a_options[
"tsttpl_".$item[
"id"]] =
array($item[
"title"],
1058 nl2br(trim($item[
"description"])));
1072 $testDefaultsId = $tstdef;
1074 $a_new_object->applyDefaults($testDefaults);
1080 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
1083 $template_settings = $template->getSettings();
1084 if($template_settings)
1092 $a_new_object->saveToDb();
1096 $this->ctrl->setParameter($this,
'ref_id', $a_new_object->
getRefId());
1097 $this->ctrl->redirectByClass(
'ilObjTestSettingsGeneralGUI');
1102 include_once
"./Services/Utilities/classes/class.ilUtil.php";
1103 $path = $this->tree->getPathFull($this->
object->getRefID());
1112 if ($_FILES[
"xmldoc"][
"error"] > UPLOAD_ERR_OK)
1118 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
1123 $file = pathinfo($_FILES[
"xmldoc"][
"name"]);
1124 $full_path = $basedir.
"/".$_FILES[
"xmldoc"][
"name"];
1131 $subdir = basename(
$file[
"basename"],
".".
$file[
"extension"]);
1137 if(!is_file($qti_file))
1146 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
1148 $result = $qtiParser->startParsing();
1149 $founditems =& $qtiParser->getFoundItems();
1153 foreach ($founditems as $item)
1155 if (strlen($item[
"type"]))
1165 if( count($founditems) && $complete == 0 )
1175 $_SESSION[
"tst_import_results_file"] = $results_file;
1176 $_SESSION[
"tst_import_xml_file"] = $xml_file;
1177 $_SESSION[
"tst_import_qti_file"] = $qti_file;
1178 $_SESSION[
"tst_import_subdir"] = $subdir;
1187 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.tst_import_verification.html",
"Modules/Test");
1188 $row_class =
array(
"tblrow1",
"tblrow2");
1190 foreach ($founditems as $item)
1192 $this->tpl->setCurrentBlock(
"verification_row");
1193 $this->tpl->setVariable(
"ROW_CLASS", $row_class[
$counter++ % 2]);
1194 $this->tpl->setVariable(
"QUESTION_TITLE", $item[
"title"]);
1195 $this->tpl->setVariable(
"QUESTION_IDENT", $item[
"ident"]);
1196 include_once
"./Services/QTI/classes/class.ilQTIItem.php";
1197 switch ($item[
"type"])
1201 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMultipleChoice"));
1205 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assSingleChoice"));
1209 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assKprimChoice"));
1213 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assLongMenu"));
1217 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assNumeric"));
1221 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFormulaQuestion"));
1225 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextSubset"));
1229 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assClozeTest"));
1233 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assErrorText"));
1237 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assImagemapQuestion"));
1241 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assJavaApplet"));
1245 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFlashApplet"));
1249 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMatchingQuestion"));
1253 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingQuestion"));
1257 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingHorizontal"));
1261 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextQuestion"));
1265 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFileUpload"));
1268 $this->tpl->parseCurrentBlock();
1275 $this->tpl->setCurrentBlock(
"adm_content");
1276 $this->tpl->setVariable(
"TEXT_TYPE", $this->lng->txt(
"question_type"));
1277 $this->tpl->setVariable(
"TEXT_TITLE", $this->lng->txt(
"question_title"));
1278 $this->tpl->setVariable(
"FOUND_QUESTIONS_INTRODUCTION", $this->lng->txt(
"tst_import_verify_found_questions"));
1279 $this->tpl->setVariable(
"VERIFICATION_HEADING", $this->lng->txt(
"import_tst"));
1280 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1282 $this->tpl->setVariable(
"QUESTIONPOOL_ID", $QplOrTstID);
1283 $this->tpl->setVariable(
"VALUE_IMPORT", $this->lng->txt(
"import"));
1284 $this->tpl->setVariable(
"VALUE_CANCEL", $this->lng->txt(
"cancel"));
1285 $this->tpl->parseCurrentBlock();
1293 include_once
"./Modules/Test/classes/class.ilObjTest.php";
1297 $newObj->setType(
$_GET[
"new_type"]);
1299 $newObj->setTitle(
"dummy");
1301 $newObj->setDescription(
"test import");
1303 $newObj->create(
true);
1305 $newObj->createReference();
1307 $newObj->putInTree(
$_GET[
"ref_id"]);
1309 $newObj->setPermissions(
$_GET[
"ref_id"]);
1311 $newObj->mark_schema->flush();
1314 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
1318 if (!isset(
$_POST[
"qpl"]) ||
"-1" === (
string)
$_POST[
"qpl"])
1320 $questionParentObjId = $newObj->getId();
1324 $questionParentObjId = $_POST[
"qpl"];
1327 if( is_file(
$_SESSION[
"tst_import_dir"].
'/'.
$_SESSION[
"tst_import_subdir"].
"/manifest.xml") )
1329 $newObj->saveToDb();
1331 $_SESSION[
'tst_import_idents'] = $_POST[
'ident'];
1332 $_SESSION[
'tst_import_qst_parent'] = $questionParentObjId;
1334 $fileName = $_SESSION[
'tst_import_subdir'] .
'.zip';
1335 $fullPath = $_SESSION[
'tst_import_dir'] .
'/' . $fileName;
1337 include_once(
"./Services/Export/classes/class.ilImport.php");
1339 $map = $imp->getMapping();
1340 $map->addMapping(
'Modules/Test',
'tst',
'new_id', $newObj->getId());
1341 $imp->importObject($newObj, $fullPath, $fileName,
'tst',
'Modules/Test',
true);
1346 if( !isset($_POST[
"ident"]) || !is_array($_POST[
"ident"]) || !count($_POST[
"ident"]) )
1348 $qtiParser->setIgnoreItemsEnabled(
true);
1350 $qtiParser->setTestObject($newObj);
1351 $result = $qtiParser->startParsing();
1352 $newObj->saveToDb();
1355 include_once (
"./Modules/LearningModule/classes/class.ilContObjParser.php");
1356 $contParser =
new ilContObjParser($newObj, $_SESSION[
"tst_import_xml_file"], $_SESSION[
"tst_import_subdir"]);
1357 $contParser->setQuestionMapping($qtiParser->getImportMapping());
1358 $contParser->startParsing();
1360 if( isset($_POST[
"ident"]) && is_array($_POST[
"ident"]) && count($_POST[
"ident"]) == $qtiParser->getNumImportedItems() )
1363 if(@file_exists($_SESSION[
"tst_import_results_file"]))
1365 include_once (
"./Modules/Test/classes/class.ilTestResultsImportParser.php");
1367 $results->setQuestionIdMapping($qtiParser->getQuestionIdMapping());
1379 ilUtil::redirect(
"ilias.php?ref_id=".$newObj->getRefId().
"&baseClass=ilObjTestGUI");
1399 include_once(
"./Modules/File/classes/class.ilObjFile.php");
1401 $fileObj->sendFile();
1410 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
1412 $page_gui->showMediaFullscreen();
1421 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php");
1423 $pg_obj->send_paragraph (
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
1436 $this->questionBrowser();
1448 $this->questionBrowser();
1460 $this->ctrl->redirect($this,
"questions");
1474 $parent_ref = $tree->getParentId($this->
object->getRefId());
1475 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
1477 $qpl->setType(
"qpl");
1478 $qpl->setTitle($name);
1479 $qpl->setDescription($description);
1481 $qpl->createReference();
1482 $qpl->putInTree($parent_ref);
1483 $qpl->setPermissions($parent_ref);
1486 return $qpl->getRefId();
1496 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_random_select.html",
"Modules/Test");
1497 $questionpools =& $this->
object->getAvailableQuestionpools(FALSE, FALSE, FALSE, TRUE);
1498 $this->tpl->setCurrentBlock(
"option");
1499 $this->tpl->setVariable(
"VALUE_OPTION",
"0");
1500 $this->tpl->setVariable(
"TEXT_OPTION", $this->lng->txt(
"all_available_question_pools"));
1501 $this->tpl->parseCurrentBlock();
1502 foreach ($questionpools as $key => $value)
1504 $this->tpl->setCurrentBlock(
"option");
1505 $this->tpl->setVariable(
"VALUE_OPTION", $key);
1506 $this->tpl->setVariable(
"TEXT_OPTION", $value[
"title"]);
1507 $this->tpl->parseCurrentBlock();
1509 $this->tpl->setCurrentBlock(
"hidden");
1510 $this->tpl->setVariable(
"HIDDEN_NAME",
"sel_question_types");
1511 $this->tpl->setVariable(
"HIDDEN_VALUE",
$_POST[
"sel_question_types"]);
1512 $this->tpl->parseCurrentBlock();
1513 $this->tpl->setCurrentBlock(
"adm_content");
1514 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
1515 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_random_select_questionpool"));
1516 $this->tpl->setVariable(
"TXT_NR_OF_QUESTIONS", $this->lng->txt(
"tst_random_nr_of_questions"));
1517 $this->tpl->setVariable(
"BTN_SUBMIT", $this->lng->txt(
"submit"));
1518 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1519 $this->tpl->parseCurrentBlock();
1531 $this->ctrl->redirect($this,
"questions");
1544 $question_array = $this->
object->randomSelectQuestions(
$_POST[
"nr_of_questions"],
$_POST[
"sel_qpl"]);
1545 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_random_question_offer.html",
"Modules/Test");
1546 $color_class =
array(
"tblrow1",
"tblrow2");
1548 $questionpools =& $this->
object->getAvailableQuestionpools(
true);
1549 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
1550 foreach ($question_array as $question_id)
1552 $dataset = $this->
object->getQuestionDataset($question_id);
1553 $this->tpl->setCurrentBlock(
"QTab");
1554 $this->tpl->setVariable(
"COLOR_CLASS", $color_class[
$counter % 2]);
1555 $this->tpl->setVariable(
"QUESTION_TITLE", $dataset->title);
1556 $this->tpl->setVariable(
"QUESTION_COMMENT", $dataset->description);
1558 $this->tpl->setVariable(
"QUESTION_AUTHOR", $dataset->author);
1559 $this->tpl->setVariable(
"QUESTION_POOL", $questionpools[$dataset->obj_fi][
"title"]);
1560 $this->tpl->parseCurrentBlock();
1563 if (count($question_array) == 0)
1565 $this->tpl->setCurrentBlock(
"Emptytable");
1566 $this->tpl->setVariable(
"TEXT_NO_QUESTIONS_AVAILABLE", $this->lng->txt(
"no_questions_available"));
1567 $this->tpl->parseCurrentBlock();
1571 $this->tpl->setCurrentBlock(
"Selectionbuttons");
1572 $this->tpl->setVariable(
"BTN_YES", $this->lng->txt(
"random_accept_sample"));
1573 $this->tpl->setVariable(
"BTN_NO", $this->lng->txt(
"random_another_sample"));
1574 $this->tpl->parseCurrentBlock();
1576 $chosen_questions = join($question_array,
",");
1577 $this->tpl->setCurrentBlock(
"adm_content");
1578 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
1579 $this->tpl->setVariable(
"QUESTION_TITLE", $this->lng->txt(
"tst_question_title"));
1580 $this->tpl->setVariable(
"QUESTION_COMMENT", $this->lng->txt(
"description"));
1581 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"tst_question_type"));
1582 $this->tpl->setVariable(
"QUESTION_AUTHOR", $this->lng->txt(
"author"));
1583 $this->tpl->setVariable(
"QUESTION_POOL", $this->lng->txt(
"qpl"));
1584 $this->tpl->setVariable(
"VALUE_CHOSEN_QUESTIONS", $chosen_questions);
1585 $this->tpl->setVariable(
"VALUE_QUESTIONPOOL_SELECTION",
$_POST[
"sel_qpl"]);
1586 $this->tpl->setVariable(
"VALUE_NR_OF_QUESTIONS",
$_POST[
"nr_of_questions"]);
1587 $this->tpl->setVariable(
"TEXT_QUESTION_OFFER", $this->lng->txt(
"tst_question_offer"));
1588 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1589 $this->tpl->parseCurrentBlock();
1601 $selected_array = explode(
",",
$_POST[
"chosen_questions"]);
1602 if (!count($selected_array))
1608 $total = $this->
object->evalTotalPersons();
1618 foreach ($selected_array as $key => $value)
1620 $this->
object->insertQuestion( $this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value );
1622 $this->
object->saveCompleteStatus( $this->testQuestionSetConfigFactory->getQuestionSetConfig() );
1624 $this->ctrl->redirect($this,
"questions");
1631 $this->questionBrowser();
1643 $qpl_ref_id = $_REQUEST[
"sel_qpl"];
1645 $qpl_mode = $_REQUEST[
'usage'];
1647 if(isset($_REQUEST[
'qtype']))
1649 include_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
1652 else if(isset($_REQUEST[
'sel_question_types']))
1654 $sel_question_types = $_REQUEST[
"sel_question_types"];
1657 if (!$qpl_mode || ($qpl_mode == 2 && strcmp($_REQUEST[
"txt_qpl"],
"") == 0) || ($qpl_mode == 3 && strcmp($qpl_ref_id,
"") == 0))
1661 $_REQUEST[
'sel_question_types'] = $sel_question_types;
1668 $_SESSION[
"test_id"] = $this->
object->getRefId();
1669 if ($qpl_mode == 2 && strcmp($_REQUEST[
"txt_qpl"],
"") != 0)
1674 else if ($qpl_mode == 1)
1676 $qpl_ref_id =
$_GET[
"ref_id"];
1679 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php";
1680 $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;
1682 if (isset($_REQUEST[
'prev_qid']))
1684 $baselink .=
'&prev_qid=' . $_REQUEST[
'prev_qid'];
1686 else if(isset($_REQUEST[
'position']))
1688 $baselink .=
'&prev_qid=' . $_REQUEST[
'position'];
1691 if ($_REQUEST[
'test_express_mode']) {
1692 $baselink .=
'&test_express_mode=1';
1695 if( isset($_REQUEST[
'add_quest_cont_edit_mode']) )
1698 $baselink,
"add_quest_cont_edit_mode={$_REQUEST['add_quest_cont_edit_mode']}",
false 1702 #var_dump($_REQUEST['prev_qid']); 1718 $this->ctrl->redirect($this,
"questions");
1733 $questionpools =& $this->
object->getAvailableQuestionpools(FALSE, FALSE, FALSE, TRUE, FALSE,
"write");
1735 if ($this->
object->getPoolUsage()) {
1738 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
1741 $form->setFormAction($ilCtrl->getFormAction($this,
"executeCreateQuestion"));
1742 $form->setTitle($lng->txt(
"ass_create_question"));
1743 include_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
1747 $hidden->setValue($_REQUEST[
"sel_question_types"]);
1748 $form->addItem($hidden);
1753 $ri =
new ilRadioGroupInputGUI($lng->txt(
"tst_add_quest_cont_edit_mode"),
"add_quest_cont_edit_mode");
1756 $lng->txt(
'tst_add_quest_cont_edit_mode_default'),
1761 $lng->txt(
'tst_add_quest_cont_edit_mode_page_object'),
1767 $form->addItem($ri,
true);
1773 $form->addItem($hi,
true);
1779 $no_pool =
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
1780 $usage->addOption($no_pool);
1781 $existing_pool =
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
1782 $usage->addOption($existing_pool);
1783 $new_pool =
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
1784 $usage->addOption($new_pool);
1785 $form->addItem($usage);
1790 $pools_data =
array();
1791 foreach($questionpools as $key => $p) {
1792 $pools_data[$key] = $p[
'title'];
1794 $pools =
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"),
"sel_qpl");
1796 $existing_pool->addSubItem($pools);
1799 $this->lng->loadLanguageModule(
'rbac');
1800 $name =
new ilTextInputGUI($this->lng->txt(
"rbac_create_qpl"),
"txt_qpl");
1802 $name->setMaxLength(50);
1803 $new_pool->addSubItem($name);
1805 $form->addCommandButton(
"executeCreateQuestion", $lng->txt(
"submit"));
1806 $form->addCommandButton(
"cancelCreateQuestion", $lng->txt(
"cancel"));
1808 return $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
1814 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'sel_question_types', $_REQUEST[
"sel_question_types"]);
1815 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'add_quest_cont_edit_mode', $_REQUEST[
"add_quest_cont_edit_mode"]);
1816 $link = $ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'handleToolbarCommand',
'',
false,
false);
1828 $questions = $this->
object->getQuestionTitlesAndIndexes();
1830 $this->
object->removeQuestions($removeQuestionIds);
1832 $this->
object->saveCompleteStatus( $this->testQuestionSetConfigFactory->getQuestionSetConfig() );
1836 if($_REQUEST[
'test_express_mode'])
1840 $deleted_tmp = $removeQuestionIds;
1841 $first = array_shift($deleted_tmp);
1842 foreach((
array)$questions as $key => $value)
1844 if(!in_array($key, $removeQuestionIds))
1854 else if($key == $first)
1861 $first = array_shift($deleted_tmp);
1866 count($questions) == count($removeQuestionIds) ||
1870 $this->ctrl->setParameter($this,
'q_id',
'');
1871 $this->ctrl->redirect($this,
'showPage');
1874 $this->ctrl->setParameter($this,
'q_id', $return_to);
1875 $this->ctrl->redirect($this,
"showPage");
1879 $this->ctrl->setParameter($this,
'q_id',
'');
1880 $this->ctrl->redirect($this,
'questions');
1893 if ($_REQUEST[
'test_express_mode']) {
1894 $this->ctrl->setParameter($this,
'q_id', $_REQUEST[
'q_id']);
1895 $this->ctrl->redirect($this,
"showPage");
1898 $this->ctrl->redirect($this,
"questions");
1911 $total = $this->
object->evalTotalPersons();
1915 $question = sprintf($this->lng->txt(
"tst_remove_questions_and_results"),
$total);
1919 if (count($checked_questions) == 1)
1921 $question = $this->lng->txt(
"tst_remove_question");
1925 $question = $this->lng->txt(
"tst_remove_questions");
1929 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1931 $cgui->setHeaderText($question);
1933 $this->ctrl->saveParameter($this,
'test_express_mode');
1934 $this->ctrl->saveParameter($this,
'q_id');
1936 $cgui->setFormAction($this->ctrl->getFormAction($this));
1937 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelRemoveQuestions");
1938 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmRemoveQuestions");
1940 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
1941 $removablequestions =& $this->
object->getTestQuestions();
1942 if (count($removablequestions))
1944 foreach ($removablequestions as
$data)
1946 if (in_array($data[
"question_id"], $checked_questions))
1949 $txt .=
' ['. $this->lng->txt(
'question_id_short') .
': ' . $data[
'question_id'] .
']';
1951 if($data[
"description"])
1953 $txt .=
"<div class=\"small\">".$data[
"description"].
"</div>";
1956 $cgui->addItem(
"q_id[]", $data[
"question_id"],
$txt);
1961 $this->tpl->setContent($cgui->getHTML());
1970 $checked_questions = $_REQUEST[
"q_id"];
1972 if (!is_array($checked_questions) && $checked_questions) {
1973 $checked_questions =
array($checked_questions);
1976 if (!is_array($checked_questions)) {
1977 $checked_questions = [];
1980 if (count($checked_questions) > 0) {
1982 } elseif (0 === count($checked_questions)) {
1984 $this->ctrl->redirect($this,
"questions");
1993 $selected_questions = NULL;
1994 $selected_questions =
$_POST[
'q_id'];
1995 if (is_array($selected_questions))
1997 $_SESSION[
'tst_qst_move_' . $this->
object->getTestId()] =
$_POST[
'q_id'];
2004 $this->ctrl->redirect($this,
'questions');
2013 $move_questions =
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
2015 if (!is_array(
$_POST[
'q_id']) || 0 === count(
$_POST[
'q_id']))
2018 $this->ctrl->redirect($this,
'questions');
2020 if (count(
$_POST[
'q_id']) > 1)
2023 $this->ctrl->redirect($this,
'questions');
2026 $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()],
$_POST[
'q_id'][0], $insert_mode);
2029 $this->ctrl->redirect($this,
"questions");
2038 $move_questions =
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
2039 if (!is_array(
$_POST[
'q_id']) || 0 === count(
$_POST[
'q_id']))
2042 $this->ctrl->redirect($this,
'questions');
2044 if (count(
$_POST[
'q_id']) > 1)
2047 $this->ctrl->redirect($this,
'questions');
2050 $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()],
$_POST[
'q_id'][0], $insert_mode);
2053 $this->ctrl->redirect($this,
"questions");
2064 if (!count($selected_array))
2067 $this->ctrl->redirect($this,
"browseForQuestions");
2071 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
2072 $manscoring = FALSE;
2073 foreach ($selected_array as $key => $value)
2075 $this->
object->insertQuestion( $this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value );
2081 $this->
object->saveCompleteStatus( $this->testQuestionSetConfigFactory->getQuestionSetConfig() );
2090 $this->ctrl->redirect($this,
"questions");
2099 $ilHelp = $DIC[
'ilHelp'];
2101 $subScreenId =
array(
'createQuestion');
2103 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
2105 $ilCtrl->setParameter($this,
'qtype', $_REQUEST[
'qtype']);
2109 $form->setFormAction($ilCtrl->getFormAction($this,
"executeCreateQuestion"));
2110 $form->setTitle($lng->txt(
"ass_create_question"));
2111 include_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
2114 $questionTypes = $pool->getQuestionTypes(
false,
true);
2118 foreach($questionTypes as $label =>
$data)
2123 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
2126 $form->addItem(
$si,
true);
2129 $questions = $this->
object->getQuestionTitlesAndIndexes();
2134 foreach($questions as $key =>
$title)
2136 $options[$key] = $lng->txt(
'behind') .
' '.
$title .
' ['.$this->lng->txt(
'question_id_short') .
': '. $key .
']';
2138 $si->setOptions($options);
2139 $si->setValue($_REQUEST[
'q_id']);
2140 $form->addItem(
$si,
true);
2146 $subScreenId[] =
'editMode';
2148 $ri =
new ilRadioGroupInputGUI($lng->txt(
"tst_add_quest_cont_edit_mode"),
"add_quest_cont_edit_mode");
2151 $lng->txt(
'tst_add_quest_cont_edit_mode_default'),
2156 $lng->txt(
'tst_add_quest_cont_edit_mode_page_object'),
2162 $form->addItem($ri,
true);
2168 $form->addItem($hi,
true);
2171 if($this->
object->getPoolUsage())
2173 $subScreenId[] =
'poolSelect';
2178 $no_pool =
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
2179 $usage->addOption($no_pool);
2180 $existing_pool =
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
2181 $usage->addOption($existing_pool);
2182 $new_pool =
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
2183 $usage->addOption($new_pool);
2184 $form->addItem($usage);
2189 $pools_data =
array();
2190 foreach($questionpools as $key => $p)
2192 $pools_data[$key] = $p[
'title'];
2194 $pools =
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"),
"sel_qpl");
2196 $existing_pool->addSubItem($pools);
2200 $name->setMaxLength(50);
2201 $new_pool->addSubItem($name);
2204 $form->addCommandButton(
"executeCreateQuestion", $lng->txt(
"create"));
2205 $form->addCommandButton(
"questions", $lng->txt(
"cancel"));
2207 $ilHelp->setScreenId(
'assQuestions');
2208 $ilHelp->setSubScreenId(implode(
'_', $subScreenId));
2210 return $tpl->setContent($form->getHTML());
2215 global $ilAccess, $ilTabs;
2217 $ilTabs->activateTab(
'assQuestions');
2220 $this->ctrl->setParameter($this,
'test_express_mode',
'');
2222 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
2226 $this->ctrl->redirect($this,
"infoScreen");
2229 if (
$_GET[
'browse'])
2231 return $this->questionbrowser();
2237 $this->ctrl->setParameter($this,
'q_id',
'');
2241 ilUtil::redirect(
"ilias.php?baseClass=ilObjQuestionPoolGUI&ref_id=" .
$_GET[
"eqpl"] .
"&cmd=editQuestionForTest&calling_test=".
$_GET[
"ref_id"].
"&q_id=" .
$_GET[
"eqid"]);
2244 if (
$_GET[
"up"] > 0)
2246 $this->
object->questionMoveUp(
$_GET[
"up"]);
2248 if (
$_GET[
"down"] > 0)
2250 $this->
object->questionMoveDown(
$_GET[
"down"]);
2255 $selected_array =
array();
2256 array_push($selected_array,
$_GET[
"add"]);
2257 $total = $this->
object->evalTotalPersons();
2267 $this->insertQuestions($selected_array);
2271 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_questions.html",
"Modules/Test");
2273 $total = $this->
object->evalTotalPersons();
2274 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
2278 $link = $this->ctrl->getLinkTarget($this,
"participants");
2279 $link =
"<a href=\"".$link.
"\">".$this->lng->txt(
"test_has_datasets_warning_page_view_link").
"</a>";
2280 ilUtil::sendInfo($this->lng->txt(
"test_has_datasets_warning_page_view").
" ".$link);
2285 $ilToolbar->addButton($this->lng->txt(
"ass_create_question"), $this->ctrl->getLinkTarget($this,
"addQuestion"));
2287 if( $this->
object->getPoolUsage() )
2289 $ilToolbar->addSeparator();
2291 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
2296 $ilToolbar->addSeparator();
2297 $ilToolbar->addButton($this->lng->txt(
"random_selection"), $this->ctrl->getLinkTarget($this,
"randomselect"));
2301 $online_access =
false;
2302 if ($this->
object->getFixedParticipants())
2304 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
2306 if ($online_access_result ===
true)
2308 $online_access =
true;
2312 if( $this->
object->isOnline() && $this->
object->isComplete( $this->testQuestionSetConfigFactory->getQuestionSetConfig() ) )
2314 if ((!$this->
object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id))
2316 $testSession = $this->testSessionFactory->getSession();
2317 $testSequence = $this->testSequenceFactory->getSequenceByTestSession($testSession);
2319 $testPlayerGUI = $this->testPlayerFactory->getPlayerGUI();
2321 $executable = $this->
object->isExecutable($testSession, $ilUser->getId(), $allowPassIncrease = TRUE);
2323 if ($executable[
"executable"])
2325 if ($testSession->getActiveId() > 0)
2329 if ($testSequence->hasStarted($testSession))
2331 $execTestLabel = $this->lng->txt(
"tst_resume_test");
2332 $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI,
'resumePlayer');
2336 $execTestLabel = $this->
object->getStartTestLabel($testSession->getActiveId());
2337 $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI,
'startPlayer');
2344 $execTestLabel = $this->
object->getStartTestLabel($testSession->getActiveId());
2345 $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI,
'startPlayer');
2348 $ilToolbar->addSeparator();
2349 $ilToolbar->addButton($execTestLabel, $execTestLink);
2358 $this->tpl->setCurrentBlock(
"adm_content");
2359 include_once
"./Modules/Test/classes/tables/class.ilTestQuestionsTableGUI.php";
2360 $checked_move = is_array(
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()]) && (count(
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()]));
2361 $table_gui =
new ilTestQuestionsTableGUI($this,
'questions', (($ilAccess->checkAccess(
"write",
"", $this->ref_id) ? true :
false)), $checked_move,
$total);
2362 $data = $this->
object->getTestQuestions();
2363 $table_gui->setData($data);
2364 $this->tpl->setVariable(
'QUESTIONBROWSER', $table_gui->getHTML());
2365 $this->tpl->setVariable(
"ACTION_QUESTION_FORM", $this->ctrl->getFormAction($this));
2366 $this->tpl->parseCurrentBlock();
2375 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
2402 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
2405 $participantData->load($this->
object->getTestId());
2407 $this->
object->removeTestResults($participantData);
2410 $this->ctrl->redirect($this,
"participants");
2424 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
2427 if( $this->
object->getFixedParticipants() )
2429 $participantData->setUserIds(
$_POST[
"chbUser"]);
2433 $participantData->setActiveIds(
$_POST[
"chbUser"]);
2436 $participantData->load($this->
object->getTestId());
2438 $this->
object->removeTestResults($participantData);
2441 $this->ctrl->redirect($this,
"participants");
2453 $this->ctrl->redirect($this,
"participants");
2468 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_maintenance.html",
"Modules/Test");
2470 $this->tpl->setCurrentBlock(
"confirm_delete");
2471 $this->tpl->setVariable(
"BTN_CONFIRM_DELETE_ALL", $this->lng->txt(
"confirm"));
2472 $this->tpl->setVariable(
"BTN_CANCEL_DELETE_ALL", $this->lng->txt(
"cancel"));
2473 $this->tpl->parseCurrentBlock();
2475 $this->tpl->setCurrentBlock(
"adm_content");
2476 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
2477 $this->tpl->parseCurrentBlock();
2486 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2488 $cgui->setFormAction($this->ctrl->getFormAction($this,
"participants"));
2489 $cgui->setHeaderText($this->lng->txt(
"delete_all_user_data_confirmation"));
2490 $cgui->setCancel($this->lng->txt(
"cancel"),
"participants");
2491 $cgui->setConfirm($this->lng->txt(
"proceed"),
"confirmDeleteAllUserResults");
2493 $this->tpl->setContent($cgui->getHTML());
2505 if (count(
$_POST[
"chbUser"]) == 0)
2508 $this->ctrl->redirect($this,
"participants");
2511 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2513 $cgui->setHeaderText($this->lng->txt(
"confirm_delete_single_user_data"));
2515 $cgui->setFormAction($this->ctrl->getFormAction($this));
2516 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteSelectedUserData");
2517 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmDeleteSelectedUserData");
2519 include_once
'./Services/User/classes/class.ilObjUser.php';
2520 foreach (
$_POST[
"chbUser"] as $key => $active_id)
2522 if ($this->
object->getFixedParticipants())
2524 $user_id = $active_id;
2528 $user_id = $this->
object->_getUserIdFromActiveId($active_id);
2532 if ($this->
object->getAnonymity())
2534 $name = $this->lng->txt(
"anonymous");
2536 else if($user[
"lastname"])
2538 $name = $user[
"lastname"].
", ".$user[
"firstname"].
" (".
2543 $name = $this->lng->txt(
"deleted_user");
2546 $cgui->addItem(
"chbUser[]", $active_id, $name,
2550 $this->tpl->setContent($cgui->getHTML());
2562 include_once
"./Modules/Test/classes/tables/class.ilTestHistoryTableGUI.php";
2564 $table_gui->setTestObject($this->
object);
2565 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
2567 $table_gui->setData(
$log);
2568 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2573 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2575 $form->setTarget(
"_top");
2577 $this->ctrl->setParameter($this,
"new_type", $new_type);
2578 $form->setFormAction($this->ctrl->getFormAction($this));
2579 $form->setTitle($this->lng->txt(
"import_tst"));
2582 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
2583 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"xmldoc");
2585 $fi->setRequired(
true);
2586 $form->addItem($fi);
2589 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
2591 $questionpools = $tst->getAvailableQuestionpools(TRUE, FALSE, TRUE, TRUE);
2592 if (count($questionpools))
2594 $options =
array(
"-1" => $this->lng->txt(
"dont_use_questionpool"));
2595 foreach ($questionpools as $key => $value)
2600 $pool =
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"),
"qpl");
2601 $pool->
setInfo($this->lng->txt(
'select_question_pool_info'));
2603 $form->addItem($pool);
2606 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
2607 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
2619 $command =
$_POST[
"command"];
2620 if (strlen($command))
2622 $method = $command .
"Object";
2623 if (method_exists($this, $method))
2629 $this->ctrl->redirect($this,
"participants");
2639 global $ilAccess, $ilToolbar,
$lng;
2643 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
2647 $this->ctrl->redirect($this,
"infoScreen");
2650 if( $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken() )
2653 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->getDepenciesBrokenMessage($this->lng)
2656 elseif( $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesInVulnerableState() )
2659 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->getDepenciesInVulnerableStateMessage($this->lng)
2663 if ($this->
object->getFixedParticipants())
2666 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
2671 'auto_complete_name' => $lng->txt(
'user'),
2672 'submit_name' => $lng->txt(
'add')
2676 $ilToolbar->addSeparator();
2678 $search_btn->setCaption(
'tst_search_users');
2679 $search_btn->setUrl($this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
2680 $ilToolbar->addButtonInstance($search_btn);
2681 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
2683 $participants =& $this->
object->getInvitedUsers();
2685 $unfinished_passes =
false;
2686 foreach ($participants as
$data)
2688 $maxpass = $this->
object->_getMaxPass($data[
"active_id"]);
2689 if (!is_null($maxpass))
2694 if (strlen($data[
"active_id"]))
2696 $last_access = $this->
object->_getLastAccess($data[
"active_id"]);
2697 $access = $last_access;
2699 $this->ctrl->setParameterByClass(
'iltestevaluationgui',
'active_id', $data[
'active_id']);
2701 if ($data[
'active_id'] == null)
2703 if ( strlen($data[
"firstname"].$data[
"lastname"]) == 0 )
2705 $fullname = $lng->txt(
"deleted_user");
2707 else if($this->
object->getAnonymity())
2709 $fullname = $lng->txt(
'anonymous');
2713 $fullname = trim($data[
"lastname"] .
", " . $data[
"firstname"] .
" " . $data[
"title"]);
2716 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
2720 $unfinished_pass_data = 0;
2721 if($data[
"unfinished_passes"] == 1)
2723 $unfinished_pass_data = 1;
2724 $unfinished_passes =
true;
2727 array_push($rows,
array(
2728 'usr_id' => $data[
"usr_id"],
2729 'active_id' => $data[
'active_id'],
2730 'login' => $data[
"login"],
2731 'clientip' => $data[
"clientip"],
2732 'firstname' => $data[
"firstname"],
2733 'lastname' => $data[
"lastname"],
2734 'name' => $fullname,
2735 'started' => ($data[
"active_id"] > 0) ? 1 : 0,
2736 'unfinished' => $unfinished_pass_data,
2737 'finished' => ($data[
"test_finished"] == 1) ? 1 : 0,
2738 'access' => $access,
2739 'maxpass' => $maxpass,
2740 'result' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'outParticipantsResultsOverview'),
2741 'finish_link' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'finishTestPassForSingleUser')
2744 include_once
"./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php";
2746 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken(),
2747 $this->
object->getAnonymity(), count($rows)
2750 $table_gui->setResetCommand(
'fpResetFiler');
2752 $table_gui->setData($rows);
2753 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2755 if(count($rows) > 0)
2757 $ilToolbar->addSeparator();
2759 $delete_all_results_btn->setCaption(
'delete_all_user_data');
2760 $delete_all_results_btn->setUrl($this->ctrl->getLinkTarget($this,
'deleteAllUserResults'));
2761 $ilToolbar->addButtonInstance($delete_all_results_btn);
2767 $participants =& $this->
object->getTestParticipants();
2769 $unfinished_passes =
false;
2771 foreach ($participants as
$data)
2773 $maxpass = $this->
object->_getMaxPass($data[
"active_id"]);
2774 if (!is_null($maxpass))
2779 if (strlen($data[
"active_id"]))
2781 $last_access = $this->
object->_getLastAccess($data[
"active_id"]);
2782 $access = $last_access;
2784 $this->ctrl->setParameterByClass(
'iltestevaluationgui',
'active_id', $data[
'active_id']);
2786 $unfinished_pass_data = 0;
2787 if($data[
"unfinished_passes"] == 1)
2789 $unfinished_pass_data = 1;
2790 $unfinished_passes =
true;
2793 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
2795 array_push($rows,
array(
2796 'usr_id' => $data[
"active_id"],
2797 'active_id' => $data[
'active_id'],
2798 'login' => $data[
"login"],
2799 'name' => $fullname,
2800 'firstname' => $data[
"firstname"],
2801 'lastname' => $data[
"lastname"],
2802 'started' => ($data[
"active_id"] > 0) ? 1 : 0,
2803 'unfinished' => $unfinished_pass_data,
2804 'finished' => ($data[
"test_finished"] == 1) ? 1 : 0,
2805 'access' => $access,
2806 'maxpass' => $maxpass,
2807 'result' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'outParticipantsResultsOverview'),
2808 'finish_link' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'finishTestPassForSingleUser')
2811 include_once
"./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php";
2813 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken(),
2814 $this->
object->getAnonymity(), count($rows)
2817 if(count($rows) > 0)
2819 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
2821 $delete_all_results_btn->setCaption(
'delete_all_user_data');
2822 $delete_all_results_btn->setUrl($this->ctrl->getLinkTarget($this,
'deleteAllUserResults'));
2823 $ilToolbar->addStickyItem($delete_all_results_btn);
2828 $table_gui->setFilterCommand(
'npSetFilter');
2829 $table_gui->setResetCommand(
'npResetFilter');
2831 $table_gui->setData($rows);
2832 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2842 if($unfinished_passes)
2844 $ilToolbar->addSeparator();
2846 $finish_all_user_passes_btn->setCaption(
'finish_all_user_passes');
2847 $finish_all_user_passes_btn->setUrl($this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'finishAllUserPasses'));
2848 $ilToolbar->addButtonInstance($finish_all_user_passes_btn);
2856 include_once
"./Modules/Test/classes/tables/class.ilTimingOverviewTableGUI.php";
2859 $participants =& $this->
object->getTestParticipants();#
2860 $times = $this->
object->getStartingTimeOfParticipants();
2861 $addons = $this->
object->getTimeExtensionsOfParticipants();
2863 $tbl_data =
array();
2864 foreach ($participants as $participant)
2869 if ($times[$participant[
'active_id']])
2872 $tblRow[
'started'] = $started;
2876 $tblRow[
'started'] =
'';
2879 if ($addons[$participant[
'active_id']] > 0)
2881 $tblRow[
'extratime'] = $addons[$participant[
'active_id']];
2884 $tblRow[
'login'] = $participant[
'login'];
2886 if ($this->
object->getAnonymity())
2888 $tblRow[
'name'] = $this->lng->txt(
"anonymous");
2892 $tblRow[
'name'] = $participant[
'lastname'] .
', ' . $participant[
'firstname'];
2895 $tbl_data[] = $tblRow;
2897 $table_gui->setData($tbl_data);
2899 $this->tpl->setContent($table_gui->getHTML());
2908 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
2912 $this->ctrl->redirect($this,
"infoScreen");
2915 if ($this->
object->getProcessingTimeInSeconds() > 0 && $this->
object->getNrOfTries() == 1)
2918 if (count(
$_POST) && $form->checkInput())
2920 $res = $this->
object->addExtraTime($form->getInput(
'participant'), $form->getInput(
'extratime'));
2921 ilUtil::sendSuccess(sprintf($this->lng->txt(
'tst_extratime_added'), $form->getInput(
'extratime')),
true);
2922 $this->ctrl->redirect($this,
'timingOverview');
2926 return $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
2939 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2941 $form->setFormAction($this->ctrl->getFormAction($this));
2942 $form->setTableWidth(
"100%");
2943 $form->setId(
"tst_change_workingtime");
2944 $form->setTitle($this->lng->txt(
"tst_change_workingtime"));
2947 $participantslist =
new ilSelectInputGUI($this->lng->txt(
'participants'),
"participant");
2948 $participants =& $this->
object->getTestParticipants();
2949 $times = $this->
object->getStartingTimeOfParticipants();
2950 $addons = $this->
object->getTimeExtensionsOfParticipants();
2952 '' => $this->lng->txt(
'please_select'),
2953 '0' => $this->lng->txt(
'all_participants')
2955 foreach ($participants as $participant)
2959 if ($this->
object->getAnonymity())
2961 $name = $this->lng->txt(
"anonymous");
2965 $name = $participant[
'lastname'] .
', ' . $participant[
'firstname'];
2969 if ($times[$participant[
'active_id']])
2973 if ($addons[$participant[
'active_id']] > 0) $started .=
", " . $this->lng->txt(
'extratime') .
': ' . $addons[$participant[
'active_id']] .
' ' . $this->lng->txt(
'minutes');
2974 $options[$participant[
'active_id']] = $participant[
'login'] .
' (' .$name.
')'.$started;
2976 $participantslist->setRequired(
true);
2977 $participantslist->setOptions(
$options);
2978 $form->addItem($participantslist);
2981 $extratime =
new ilNumberInputGUI($this->lng->txt(
"extratime"),
"extratime");
2982 $extratime->
setInfo($this->lng->txt(
'tst_extratime_info'));
2983 $extratime->setRequired(
true);
2984 $extratime->setMinValue(0);
2985 $extratime->setMinvalueShouldBeGreater(
false);
2986 $extratime->setSuffix($this->lng->txt(
'minutes'));
2987 $extratime->setSize(5);
2988 $form->addItem($extratime);
2990 if (is_array(
$_POST) && strlen(
$_POST[
'cmd'][
'timing'])) $form->setValuesByArray(
$_POST);
2992 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) $form->addCommandButton(
"timing", $this->lng->txt(
"save"));
2993 $form->addCommandButton(
'timingOverview', $this->lng->txt(
"cancel"));
3000 $this->tpl->setContent($form->getHTML());
3007 $sess_filter = str_replace(
'"',
'',$sess_filter);
3008 $sess_filter = explode(
':', $sess_filter);
3009 $filter = substr($sess_filter[2],0, strlen($sess_filter[2])-1);
3011 if ($filter ==
'all' || $filter ==
false)
3013 return $in_rows; #unchanged - no filter.
3016 $with_result =
array();
3017 $without_result =
array();
3018 foreach ($in_rows as
$row)
3021 'SELECT count(solution_id) count 3023 WHERE active_fi = ' . $ilDB->quote($row[
'active_id'])
3025 $count = $ilDB->fetchAssoc(
$result);
3026 $count = $count[
'count'];
3030 $without_result[] =
$row;
3034 $with_result[] =
$row;
3038 if ($filter ==
'withSolutions')
3040 return $with_result;
3042 return $without_result;
3048 include_once(
"./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php");
3051 $table_gui->resetOffset();
3057 include_once(
"./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php");
3059 $this,
"participants",
false, $this->
object->getAnonymity(), 0
3062 $table_gui->resetOffset();
3068 include_once(
"./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php");
3070 $this,
"participants",
false, $this->
object->getAnonymity(), 0
3073 $table_gui->resetOffset();
3080 include_once(
"./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php");
3082 $this,
"participants",
false, $this->
object->getAnonymity(), 0
3085 $table_gui->resetOffset();
3101 $this->
showUserResults($show_pass_details = TRUE, $show_answers = TRUE, $show_reached_points = TRUE);
3115 $this->
showUserResults($show_pass_details = FALSE, $show_answers = TRUE);
3129 $this->
showUserResults($show_pass_details = TRUE, $show_answers = FALSE);
3139 $show_user_results =
$_SESSION[
"show_user_results"];
3141 if (count($show_user_results) == 0)
3144 $this->ctrl->redirect($this,
"participants");
3148 $template = $this->
createUserResults( $show_pass_details, $show_answers, $show_reached_points, $show_user_results);
3152 $this->tpl->setVariable(
"ADM_CONTENT", $template->get());
3154 if ($this->
object->getShowSolutionAnswersOnly())
3163 if (is_array(
$_POST[
"chbUser"]))
3165 foreach (
$_POST[
"chbUser"] as $user_id)
3167 $this->
object->disinviteUser($user_id);
3174 $this->ctrl->redirect($this,
"participants");
3179 if (is_array(
$_POST[
"chbUser"]))
3181 foreach (
$_POST[
"chbUser"] as $user_id)
3183 $this->
object->setClientIP($user_id,
$_POST[
"clientip_".$user_id]);
3190 $this->ctrl->redirect($this,
"participants");
3202 global $ilAccess,
$ilias;
3203 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
3207 $this->ctrl->redirect($this,
"infoScreen");
3210 $isPdfDeliveryRequest = isset(
$_GET[
'pdf']) &&
$_GET[
'pdf'];
3213 $template =
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html", TRUE, TRUE,
"Modules/Test");
3215 if(!$isPdfDeliveryRequest)
3217 $this->ctrl->setParameter($this,
"pdf",
"1");
3218 $template->setCurrentBlock(
"pdf_export");
3219 $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this,
"print"));
3220 $this->ctrl->setParameter($this,
"pdf",
"");
3221 $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
3222 $template->parseCurrentBlock();
3224 $template->setCurrentBlock(
"navigation_buttons");
3225 $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
3226 $template->parseCurrentBlock();
3231 require_once
'Services/PDFGeneration/classes/class.ilPDFGeneration.php';
3242 require_once
'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
3244 $questionHeaderBlockBuilder->setHeaderMode($this->
object->getTitleOutput());
3246 if($isPdfDeliveryRequest)
3248 require_once
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
3252 foreach ($this->
object->questions as $question)
3254 $template->setCurrentBlock(
"question");
3255 $question_gui = $this->
object->createQuestionGUI(
"", $question);
3257 if( $isPdfDeliveryRequest )
3262 $questionHeaderBlockBuilder->setQuestionTitle($question_gui->object->getTitle());
3263 $questionHeaderBlockBuilder->setQuestionPoints($question_gui->object->getMaximumPoints());
3264 $questionHeaderBlockBuilder->setQuestionPosition(
$counter);
3265 $template->setVariable(
"QUESTION_HEADER", $questionHeaderBlockBuilder->getHTML());
3267 $template->setVariable(
"TXT_QUESTION_ID", $this->lng->txt(
'question_id_short'));
3268 $template->setVariable(
"QUESTION_ID", $question_gui->object->getId());
3269 $result_output = $question_gui->getSolutionOutput(
"", NULL, FALSE, TRUE, FALSE, $this->
object->getShowSolutionFeedback());
3270 $template->setVariable(
"SOLUTION_OUTPUT", $result_output);
3271 $template->parseCurrentBlock(
"question");
3273 $max_points += $question_gui->object->getMaximumPoints();
3283 if( $isPdfDeliveryRequest )
3285 require_once
'class.ilTestPDFGenerator.php';
3290 $this->tpl->setVariable(
"PRINT_CONTENT", $template->get());
3303 global $ilAccess,
$ilias;
3304 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
3308 $this->ctrl->redirect($this,
"infoScreen");
3311 $template =
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html", TRUE, TRUE,
"Modules/Test");
3315 $isPdfDeliveryRequest = isset(
$_GET[
'pdf']) &&
$_GET[
'pdf'];
3322 require_once
'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
3324 $questionHeaderBlockBuilder->setHeaderMode($this->
object->getTitleOutput());
3326 if($isPdfDeliveryRequest)
3328 require_once
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
3332 require_once
'Services/PDFGeneration/classes/class.ilPDFGeneration.php';
3336 foreach ($this->
object->questions as $question)
3338 $template->setCurrentBlock(
"question");
3339 $question_gui = $this->
object->createQuestionGUI(
"", $question);
3342 $questionHeaderBlockBuilder->setQuestionTitle($question_gui->object->getTitle());
3343 $questionHeaderBlockBuilder->setQuestionPoints($question_gui->object->getMaximumPoints());
3344 $questionHeaderBlockBuilder->setQuestionPosition(
$counter);
3345 $template->setVariable(
"QUESTION_HEADER", $questionHeaderBlockBuilder->getHTML());
3347 $template->setVariable(
"SOLUTION_OUTPUT", $question_gui->getPreview(
false));
3348 $template->parseCurrentBlock(
"question");
3350 $max_points += $question_gui->object->getMaximumPoints();
3362 if($isPdfDeliveryRequest)
3364 require_once
'class.ilTestPDFGenerator.php';
3369 $this->ctrl->setParameter($this,
"pdf",
"1");
3370 $template->setCurrentBlock(
"pdf_export");
3371 $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this,
"review"));
3372 $this->ctrl->setParameter($this,
"pdf",
"");
3373 $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
3374 $template->parseCurrentBlock();
3376 $template->setCurrentBlock(
"navigation_buttons");
3377 $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
3378 $template->parseCurrentBlock();
3381 $this->tpl->setVariable(
"PRINT_CONTENT", $template->get());
3389 if (is_array($a_user_ids))
3392 foreach ($a_user_ids as $user_id)
3394 $client_ip =
$_POST[
"client_ip"][$i];
3395 $this->
object->inviteUser($user_id, $client_ip);
3403 $message = $this->lng->txt(
"tst_invited_selected_users");
3405 if (strlen($message))
3415 $this->ctrl->redirect($this,
"participants");
3421 public function defaultsObject()
3428 global $ilAccess, $ilToolbar,
$tpl;
3430 if(!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
3433 $this->ctrl->redirect($this,
"infoScreen");
3436 $ilToolbar->setFormAction($this->ctrl->getFormAction($this,
'addDefaults'));
3437 $ilToolbar->addFormButton($this->lng->txt(
'add'),
'addDefaults');
3438 require_once
'Services/Form/classes/class.ilTextInputGUI.php';
3439 $ilToolbar->addInputItem(
new ilTextInputGUI($this->lng->txt(
'tst_defaults_defaults_of_test'),
'name'),
true);
3441 require_once
'Modules/Test/classes/tables/class.ilTestPersonalDefaultSettingsTableGUI.php';
3443 $defaults = $this->
object->getAvailableDefaults();
3444 $table->setData((
array)$defaults);
3445 $tpl->setContent($table->getHTML());
3453 if(isset(
$_POST[
'chb_defaults']) && is_array(
$_POST[
'chb_defaults']) && count(
$_POST[
'chb_defaults']))
3455 foreach(
$_POST[
'chb_defaults'] as $test_default_id)
3457 $this->
object->deleteDefaults($test_default_id);
3464 $this->defaultsObject();
3481 if( !is_array(
$_POST[
"chb_defaults"]) || 1 !== count(
$_POST[
"chb_defaults"]))
3484 $this->lng->txt(
"tst_defaults_apply_select_one")
3487 return $this->defaultsObject();
3491 if($this->
object->evalTotalPersons() > 0)
3494 $this->lng->txt(
"tst_defaults_apply_not_possible")
3497 return $this->defaultsObject();
3500 $defaults =& $this->
object->getTestDefaults(
$_POST[
"chb_defaults"][0]);
3501 $defaultSettings = unserialize($defaults[
"defaults"]);
3503 if( isset($defaultSettings[
'isRandomTest']) )
3505 if( $defaultSettings[
'isRandomTest'] )
3516 elseif( isset($defaultSettings[
'questionSetType']) )
3518 $newQuestionSetType = $defaultSettings[
'questionSetType'];
3520 $oldQuestionSetType = $this->
object->getQuestionSetType();
3521 $questionSetTypeSettingSwitched = ( $oldQuestionSetType != $newQuestionSetType );
3523 $oldQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfigByType($oldQuestionSetType);
3527 case !$questionSetTypeSettingSwitched:
3528 case !$oldQuestionSetConfig->doesQuestionSetRelatedDataExist():
3535 require_once
'Modules/Test/classes/confirmations/class.ilTestSettingsChangeConfirmationGUI.php';
3538 $confirmation->setFormAction( $this->ctrl->getFormAction($this) );
3539 $confirmation->setCancel($this->lng->txt(
'cancel'),
'defaults');
3540 $confirmation->setConfirm($this->lng->txt(
'confirm'),
'confirmedApplyDefaults');
3542 $confirmation->setOldQuestionSetType($this->
object->getQuestionSetType());
3543 $confirmation->setNewQuestionSetType($newQuestionSetType);
3544 $confirmation->setQuestionLossInfoEnabled(
false);
3545 $confirmation->build();
3547 $confirmation->populateParametersFromPost();
3549 $this->tpl->setContent( $this->ctrl->getHTML($confirmation) );
3554 if( $questionSetTypeSettingSwitched && $this->
object->isOnline() )
3556 $this->
object->setOnline(
false);
3558 $info = $this->lng->txt(
"tst_set_offline_due_to_switched_question_set_type_setting");
3563 $this->
object->applyDefaults($defaults);
3567 if( $questionSetTypeSettingSwitched && $oldQuestionSetConfig->doesQuestionSetRelatedDataExist() )
3569 $oldQuestionSetConfig->removeQuestionSetRelatedData();
3572 $this->ctrl->redirect($this,
'defaults');
3580 if (strlen(
$_POST[
"name"]) > 0)
3582 $this->
object->addDefaults(
$_POST[
'name']);
3588 $this->defaultsObject();
3593 if( in_array($this->ctrl->getCmdClass(), self::$infoScreenChildClasses) )
3608 #if( !include 'competenzenRocker.php' ) exit; 3610 $this->ctrl->setCmd(
"showSummary");
3611 $this->ctrl->setCmdClass(
"ilinfoscreengui");
3612 $this->infoScreen();
3617 $this->ctrl->setCmd(
"showSummary");
3618 $this->ctrl->setCmdClass(
"ilinfoscreengui");
3619 $this->infoScreen(
$_GET[
'lock']);
3625 function infoScreen($session_lock =
"")
3632 global $ilAccess,
$ilUser, $ilToolbar;
3634 if (
$_GET[
'createRandomSolutions'])
3638 $this->
object->createRandomSolutions(
$_GET[
'createRandomSolutions']);
3640 $ilCtrl->redirect($this);
3643 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id))
3645 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->
ilias->error_obj->MESSAGE);
3650 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
3652 $info->setOpenFormTag(
false);
3656 return $this->ctrl->forwardCommand(
$info);
3659 require_once
'Modules/Test/classes/class.ilTestInfoScreenToolbarFactory.php';
3661 $toolbarFactory->setTestOBJ($this->
object);
3662 $toolbar = $toolbarFactory->getToolbarInstance();
3664 $toolbar->setGlobalToolbar(
$GLOBALS[
'DIC'][
'ilToolbar']);
3665 $toolbar->setCloseFormTag(
false);
3667 $toolbar->setSessionLockString($session_lock);
3669 $toolbar->sendMessages();
3671 if ($this->
object->getShowInfo())
3673 $info->enablePrivateNotes();
3676 if (strlen($this->
object->getIntroduction()))
3678 $info->addSection($this->lng->txt(
"tst_introduction"));
3679 $info->addProperty(
"", $this->
object->prepareTextareaOutput($this->object->getIntroduction(),
true).
3680 $info->getHiddenToggleButton());
3684 $info->addSection(
"");
3685 $info->addProperty(
"",
$info->getHiddenToggleButton());
3688 $info->addSection($this->lng->txt(
"tst_general_properties"));
3689 if ($this->
object->getShowInfo())
3691 $info->addProperty($this->lng->txt(
"author"), $this->
object->getAuthor());
3692 $info->addProperty($this->lng->txt(
"title"), $this->
object->getTitle());
3694 if( $this->
object->isOnline() && $this->
object->isComplete( $this->testQuestionSetConfigFactory->getQuestionSetConfig() ) )
3696 if ((!$this->
object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id))
3698 if ($this->
object->getShowInfo() || !$this->
object->getForceJS())
3701 $checked_javascript =
false;
3702 if ($this->
object->getJavaScriptOutput())
3704 $checked_javascript =
true;
3710 if ($this->
object->getNrOfTries() != 1)
3712 if ($this->
object->getUsePreviousAnswers() == 0)
3714 if ($this->
object->getShowInfo())
3716 $info->addProperty($this->lng->txt(
"tst_use_previous_answers"), $this->lng->txt(
"tst_dont_use_previous_answers"));
3721 $use_previous_answers = FALSE;
3722 if ($ilUser->prefs[
"tst_use_previous_answers"])
3724 $checked_previous_answers = TRUE;
3726 $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);
3733 $info->hideFurtherSections(
false);
3735 if ($this->
object->getShowInfo())
3737 $info->addSection($this->lng->txt(
"tst_sequence_properties"));
3738 $info->addProperty($this->lng->txt(
"tst_sequence"), $this->lng->txt(($this->
object->getSequenceSettings() ==
TEST_FIXED_SEQUENCE)?
"tst_sequence_fixed":
"tst_sequence_postpone"));
3740 $info->addSection($this->lng->txt(
"tst_heading_scoring"));
3741 $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"));
3742 $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"));
3743 if ($this->
object->isRandomTest())
3745 $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"));
3748 $info->addSection($this->lng->txt(
"tst_score_reporting"));
3749 $score_reporting_text =
"";
3750 switch ($this->
object->getScoreReporting())
3753 $score_reporting_text = $this->lng->txt(
"tst_report_after_test");
3756 $score_reporting_text = $this->lng->txt(
"tst_report_after_first_question");
3759 $score_reporting_text = $this->lng->txt(
"tst_report_after_date");
3762 $score_reporting_text = $this->lng->txt(
"tst_report_never");
3765 $info->addProperty($this->lng->txt(
"tst_score_reporting"), $score_reporting_text);
3766 $reporting_date = $this->
object->getReportingDate();
3767 if ($reporting_date)
3769 #preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches); 3770 #$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])); 3771 #$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date); 3772 $info->addProperty($this->lng->txt(
'tst_score_reporting_date'),
3776 $info->addSection($this->lng->txt(
"tst_session_settings"));
3777 $info->addProperty($this->lng->txt(
"tst_nr_of_tries"), ($this->
object->getNrOfTries() == 0)?$this->lng->txt(
"unlimited"):$this->
object->getNrOfTries());
3778 if ($this->
object->getNrOfTries() != 1)
3780 $info->addProperty($this->lng->txt(
"tst_nr_of_tries_of_user"), ($toolbar->getTestSession()->getPass() ==
false)?$this->lng->txt(
"tst_no_tries"):$toolbar->getTestSequence()->getPass());
3783 if ($this->
object->getEnableProcessingTime())
3785 $info->addProperty($this->lng->txt(
"tst_processing_time"), $this->
object->getProcessingTime());
3787 if (strlen($this->
object->getAllowedUsers()) && ($this->
object->getAllowedUsersTimeGap()))
3789 $info->addProperty($this->lng->txt(
"tst_allowed_users"), $this->
object->getAllowedUsers());
3792 $starting_time = $this->
object->getStartingTime();
3793 if ($this->
object->isStartingTimeEnabled() && $starting_time != 0)
3797 $ending_time = $this->
object->getEndingTime();
3798 if ($this->
object->isEndingTimeEnabled() && $ending_time != 0)
3802 $info->addMetaDataSections($this->
object->getId(),0, $this->
object->getType());
3806 $this->ctrl->forwardCommand(
$info);
3811 require_once
'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
3815 require_once
'Modules/Test/classes/class.ilTestSkillLevelThresholdImportFails.php';
3819 $this->ctrl->redirect($this,
'infoScreen');
3825 switch ($this->ctrl->getCmd())
3829 case "redirectToInfoScreen":
3836 case "outCorrectSolution":
3838 case "showAnswersOfUser":
3839 case "outUserResultsOverview":
3840 case "backFromSummary":
3841 case "show_answers":
3844 case "outTestSummary":
3845 case "outQuestionSummary":
3846 case "gotoQuestion":
3847 case "selectImagemapRegion":
3848 case "confirmSubmitAnswers":
3849 case "finalSubmission":
3851 case "outUserPassDetails":
3852 case "checkPassword":
3853 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
"infoScreen"),
"",
$_GET[
"ref_id"]);
3856 case "evalAllUsers":
3857 case "evalUserDetail":
3858 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
"eval_stat"),
"",
$_GET[
"ref_id"]);
3865 case "importVerifiedFile":
3866 case "cancelImport":
3869 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$_GET[
"ref_id"]);
3877 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
3879 $this->ctrl->saveParameterByClass($this->ctrl->getCmdClass(),
'q_id');
3881 $tabs_gui->setBackTarget($this->lng->txt(
"backtocallingtest"), $this->ctrl->getLinkTargetByClass($this->ctrl->getCmdClass(),
"questions"));
3882 $tabs_gui->addTarget(
"tst_browse_for_questions",
3883 $this->ctrl->getLinkTarget($this,
"browseForQuestions"),
3884 array(
"browseForQuestions",
"filter",
"resetFilter",
"resetTextFilter",
"insertQuestions"),
3893 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
3896 $tabs_gui->setBackTarget($this->lng->txt(
"backtocallingtest"), $this->ctrl->getLinkTarget($this,
"questions"));
3897 $tabs_gui->addTarget(
"random_selection",
3898 $this->ctrl->getLinkTarget($this,
"randomQuestions"),
3899 array(
"randomQuestions"),
3914 include_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
3915 include_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
3917 $output_gui->certificateEditor();
3923 $ilTabs->activateTab(
'assQuestions');
3924 $a_cmd = $ilCtrl->getCmd();
3926 if (!$this->
object->isRandomTest())
3928 #if (in_array($this->object->getEnabledViewMode(), array('both', 'express'))) { 3929 $questions_per_page = ($a_cmd ==
'questions_per_page' || ($a_cmd ==
'removeQuestions' && $_REQUEST[
'test_express_mode'])) ? true :
false;
3931 $this->tabs_gui->addSubTabTarget(
3932 "questions_per_page_view",
3933 $this->ctrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'showPage'),
3934 "",
"",
"", $questions_per_page);
3937 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
3940 if (!in_array(
'questions', $template->getHiddenTabs())) {
3942 $ilTabs->addSubTabTarget(
"edit_test_questions",
3943 $this->ctrl->getLinkTarget($this,
'questions'),
3944 array(
"questions",
"browseForQuestions",
"questionBrowser",
"createQuestion",
3945 "randomselect",
"filter",
"resetFilter",
"insertQuestions",
3946 "back",
"createRandomSelection",
"cancelRandomSelect",
3947 "insertRandomSelection",
"removeQuestions",
"moveQuestions",
3948 "insertQuestionsBefore",
"insertQuestionsAfter",
"confirmRemoveQuestions",
3949 "cancelRemoveQuestions",
"executeCreateQuestion",
"cancelCreateQuestion",
3950 "addQuestionpool",
"saveRandomQuestions",
"saveQuestionSelectionMode"),
3953 if (in_array($a_cmd,
array(
'questions',
'createQuestion')) || ($a_cmd ==
'removeQuestions' && !$_REQUEST[
'test_express_mode']))
3954 $this->tabs_gui->activateSubTab(
'edit_test_questions');
3959 if (!$this->
object->isRandomTest())
3961 $ilTabs->addSubTabTarget(
"print_view",
3962 $this->ctrl->getLinkTarget($this,
'print'),
3963 "print",
"",
"", $this->ctrl->getCmd() ==
'print');
3964 $ilTabs->addSubTabTarget(
'review_view',
3965 $this->ctrl->getLinkTarget($this,
'review'),
3966 'review',
'',
'', $this->ctrl->getCmd() ==
'review');
3977 $ilTabs->addSubTabTarget(
"eval_all_users",
3978 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"outEvaluation"),
3979 array(
"outEvaluation",
"detailedEvaluation",
"exportEvaluation",
"evalUserDetail",
"passDetails",
3980 "outStatisticsResultsOverview",
"statisticsPassDetails")
3984 $ilTabs->addSubTabTarget(
"tst_results_aggregated",
3985 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"eval_a"),
3990 $ilTabs->addSubTabTarget(
"tst_single_results",
3991 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"singleResults"),
3992 array(
"singleResults"),
3996 function getSettingsSubTabs($hiddenTabs =
array())
4004 $ilTabs->addSubTabTarget(
'general', $this->ctrl->getLinkTargetByClass(
'ilObjTestSettingsGeneralGUI'),
4006 array(
'ilobjtestsettingsgeneralgui')
4009 if(!in_array(
'mark_schema', $hiddenTabs))
4011 $ilTabs->addSubTabTarget(
4013 $this->ctrl->getLinkTargetByClass(
'ilmarkschemagui',
'showMarkSchema'),
4015 array(
'ilmarkschemagui')
4020 $ilTabs->addSubTabTarget(
'scoring', $this->ctrl->getLinkTargetByClass(
'ilObjTestSettingsScoringResultsGUI'),
4022 array(
'ilobjtestsettingsscoringresultsgui')
4026 include_once
"Services/Certificate/classes/class.ilCertificate.php";
4029 $ilTabs->addSubTabTarget(
4031 $this->ctrl->getLinkTarget($this,
'certificate'),
4032 array(
"certificate",
"certificateEditor",
"certificateRemoveBackground",
"certificateSave",
4033 "certificatePreview",
"certificateDelete",
"certificateUpload",
"certificateImport"),
4034 array(
"",
"ilobjtestgui",
"ilcertificategui")
4038 if (!in_array(
'defaults', $hiddenTabs)) {
4040 $ilTabs->addSubTabTarget(
4041 "tst_default_settings",
4042 $this->ctrl->getLinkTarget($this,
"defaults"),
4043 array(
"defaults",
"deleteDefaults",
"addDefaults",
"applyDefaults"),
4044 array(
"",
"ilobjtestgui",
"ilcertificategui")
4054 $ilTabs->addSubTabTarget(
"participants",
4055 $this->ctrl->getLinkTarget($this,
'participants'),
4057 "participants",
"saveClientIP",
4058 "removeParticipant",
4059 "showParticipantAnswersForAuthor",
4060 "deleteAllUserResults",
4061 "cancelDeleteAllUserData",
"deleteSingleUserResults",
4062 "outParticipantsResultsOverview",
"outParticipantsPassDetails",
4063 "showPassOverview",
"showUserAnswers",
"participantsAction",
4064 "showDetailedResults",
4065 'npResetFilter',
'npSetFilter' 4070 if( !$this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken() )
4072 if($this->
object->getProcessingTimeInSeconds() > 0 && $this->
object->getNrOfTries() == 1)
4075 $ilTabs->addSubTabTarget(
"timing",
4076 $this->ctrl->getLinkTarget($this,
'timingOverview'),
4077 array(
"timing",
"timingOverview"),
"",
"" 4090 global $ilAccess, $ilHelp;
4092 if (preg_match(
'/^ass(.*?)gui$/i', $this->ctrl->getNextClass($this))) {
4095 else if ($this->ctrl->getNextClass($this) ==
'ilassquestionpagegui') {
4099 $ilHelp->setScreenIdComponent(
"tst");
4101 $hidden_tabs =
array();
4103 $template = $this->
object->getTemplate();
4106 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
4109 $hidden_tabs = $template->getHiddenTabs();
4113 $curUserHasWriteAccess = $ilAccess->checkAccess(
"write",
"", $this->ref_id);
4115 switch($this->ctrl->getCmdClass())
4118 case 'iltestoutputgui':
4121 case 'iltestevaluationgui':
4122 $nonSelfTabbingCommands =
array(
4123 'outParticipantsResultsOverview',
'outEvaluation',
4124 'eval_a',
'singleResults',
'detailedEvaluation' 4126 if( in_array($this->ctrl->getCmd(), $nonSelfTabbingCommands) )
4130 case 'iltestevalobjectiveorientedgui':
4133 case 'ilmarkschemagui':
4134 case 'ilobjtestsettingsgeneralgui':
4135 case 'ilobjtestsettingsscoringresultsgui':
4137 if( $curUserHasWriteAccess )
4139 $this->getSettingsSubTabs($hidden_tabs);
4147 require_once
'Services/Link/classes/class.ilLink.php';
4149 $this->tabs_gui->setBack2Target($this->lng->txt(
'back_to_objective_container'), $courseLink);
4152 switch($this->ctrl->getCmd())
4158 case "directfeedback":
4160 case "outCorrectSolution":
4162 case "showAnswersOfUser":
4163 case "outUserResultsOverview":
4164 case "backFromSummary":
4165 case "show_answers":
4168 case "confirmFinish":
4169 case "outTestSummary":
4170 case "outQuestionSummary":
4171 case "gotoQuestion":
4172 case "selectImagemapRegion":
4173 case "confirmSubmitAnswers":
4174 case "finalSubmission":
4176 case "outUserPassDetails":
4177 case "checkPassword":
4178 case "exportCertificate":
4179 case "finishListOfAnswers":
4180 case "backConfirmFinish":
4181 case "showFinalStatement":
4184 case "browseForQuestions":
4187 case "resetTextFilter":
4188 case "insertQuestions":
4190 if($this->ctrl->getNextClass($this) !=
"illearningprogressgui")
4197 case "certificateservice":
4198 case "certificateImport":
4199 case "certificateUpload":
4200 case "certificateEditor":
4201 case "certificateDelete":
4202 case "certificateSave":
4204 case "deleteDefaults":
4206 case "applyDefaults":
4207 case "inviteParticipants":
4208 case "searchParticipants":
4209 if( $curUserHasWriteAccess && in_array($this->ctrl->getCmdClass(),
array(
'ilobjtestgui',
'ilcertificategui')) )
4211 $this->getSettingsSubTabs($hidden_tabs);
4219 case "detailedEvaluation":
4220 case "outEvaluation":
4221 case "singleResults":
4222 case "exportEvaluation":
4223 case "evalUserDetail":
4224 case "outStatisticsResultsOverview":
4225 case "statisticsPassDetails":
4230 if (strcmp(strtolower(get_class($this->
object)),
"ilobjtest") == 0)
4233 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && !in_array(
'assQuestions', $hidden_tabs))
4235 $force_active = (
$_GET[
"up"] !=
"" ||
$_GET[
"down"] !=
"")
4240 if (
$_GET[
"browse"] == 1) $force_active =
true;
4243 switch( $this->
object->getQuestionSetType() )
4246 $target = $this->ctrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'showPage');
4250 $target = $this->ctrl->getLinkTargetByClass(
'ilTestRandomQuestionSetConfigGUI');
4254 $target = $this->ctrl->getLinkTargetByClass(
'ilObjTestDynamicQuestionSetConfigGUI');
4258 $this->tabs_gui->addTarget(
"assQuestions",
4261 array(
"questions",
"browseForQuestions",
"questionBrowser",
"createQuestion",
4262 "randomselect",
"filter",
"resetFilter",
"insertQuestions",
4263 "back",
"createRandomSelection",
"cancelRandomSelect",
4264 "insertRandomSelection",
"removeQuestions",
"moveQuestions",
4265 "insertQuestionsBefore",
"insertQuestionsAfter",
"confirmRemoveQuestions",
4266 "cancelRemoveQuestions",
"executeCreateQuestion",
"cancelCreateQuestion",
4267 "addQuestionpool",
"saveRandomQuestions",
"saveQuestionSelectionMode",
"print",
4268 "addsource",
"removesource",
"randomQuestions"),
4269 "",
"", $force_active);
4273 if ($ilAccess->checkAccess(
"read",
"", $this->ref_id) && !in_array(
'info_short', $hidden_tabs))
4275 $this->tabs_gui->addTarget(
"info_short",
4276 $this->ctrl->getLinkTarget($this,
'infoScreen'),
4277 array(
"infoScreen",
"outIntroductionPage",
"showSummary",
4278 "setAnonymousId",
"outUserListOfAnswerPasses",
"redirectToInfoScreen"));
4282 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
4284 if (!in_array(
'settings', $hidden_tabs))
4286 $settingsCommands =
array(
4287 "marks",
"showMarkSchema",
"addMarkStep",
"deleteMarkSteps",
"addSimpleMarkSchema",
"saveMarks",
4288 "certificate",
"certificateEditor",
"certificateRemoveBackground",
"certificateSave",
4289 "certificatePreview",
"certificateDelete",
"certificateUpload",
"certificateImport",
4290 "scoring",
"defaults",
"addDefaults",
"deleteDefaults",
"applyDefaults",
4291 "inviteParticipants",
"saveFixedParticipantsStatus",
"searchParticipants",
"addParticipants" 4294 require_once
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
4295 $reflection =
new ReflectionClass(
'ilObjTestSettingsGeneralGUI');
4296 foreach($reflection->getConstants() as $name => $value)
4297 if(substr($name, 0, 4) ==
'CMD_') $settingsCommands[] = $value;
4299 require_once
'Modules/Test/classes/class.ilObjTestSettingsScoringResultsGUI.php';
4300 $reflection =
new ReflectionClass(
'ilObjTestSettingsScoringResultsGUI');
4301 foreach($reflection->getConstants() as $name => $value)
4302 if(substr($name, 0, 4) ==
'CMD_') $settingsCommands[] = $value;
4304 $settingsCommands[] =
"";
4306 $this->tabs_gui->addTarget(
"settings",
4307 $this->ctrl->getLinkTargetByClass(
'ilObjTestSettingsGeneralGUI'),
4309 array(
"ilmarkschemagui",
"ilobjtestsettingsgeneralgui",
"ilobjtestsettingsscoringresultsgui",
"ilobjtestgui",
"ilcertificategui")
4316 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentsGUI.php';
4318 $link = $this->ctrl->getLinkTargetByClass(
4319 array(
'ilTestSkillAdministrationGUI',
'ilAssQuestionSkillAssignmentsGUI'),
4323 $this->tabs_gui->addTarget(
'tst_tab_competences', $link,
array(),
array());
4326 if (!in_array(
'participants', $hidden_tabs))
4329 $this->tabs_gui->addTarget(
"participants",
4330 $this->ctrl->getLinkTarget($this,
'participants'),
4332 "participants",
"saveClientIP",
4333 "removeParticipant",
4334 "showParticipantAnswersForAuthor",
4335 "deleteAllUserResults",
4336 "cancelDeleteAllUserData",
"deleteSingleUserResults",
4337 "outParticipantsResultsOverview",
"outParticipantsPassDetails",
4338 "showPassOverview",
"showUserAnswers",
"participantsAction",
4339 "showDetailedResults",
4340 'timing',
'timingOverview',
'npResetFilter',
'npSetFilter',
'showTimingForm' 4347 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
4350 $this->tabs_gui->addTarget(
'learning_progress',
4351 $this->ctrl->getLinkTargetByClass(
array(
'illearningprogressgui'),
''),
4353 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
4356 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && !in_array(
'manscoring', $hidden_tabs))
4358 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
4360 if (count($scoring))
4363 $this->tabs_gui->addTarget(
4364 "manscoring", $this->ctrl->getLinkTargetByClass(
'ilTestScoringByQuestionsGUI',
'showManScoringByQuestionParticipantsTable'),
4366 'showManScoringParticipantsTable',
'applyManScoringParticipantsFilter',
'resetManScoringParticipantsFilter',
'showManScoringParticipantScreen',
4367 'showManScoringByQuestionParticipantsTable',
'applyManScoringByQuestionFilter',
'resetManScoringByQuestionFilter',
'saveManScoringByQuestion' 4376 $scoring_adjust_active = (bool) $setting->get(
'assessment_adjustments_enabled',
false);
4377 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && $scoring_adjust_active && !in_array(
'scoringadjust', $hidden_tabs))
4380 $this->tabs_gui->addTarget(
4381 "scoringadjust", $this->ctrl->getLinkTargetByClass(
'ilScoringAdjustmentGUI',
'showquestionlist'),
4384 'savescoringfortest',
4385 'adjustscoringfortest' 4390 if ((($ilAccess->checkAccess(
"tst_statistics",
"", $this->ref_id)) || ($ilAccess->checkAccess(
"write",
"", $this->ref_id))) && !in_array(
'statistics', $hidden_tabs))
4393 $this->tabs_gui->addTarget(
4395 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"outEvaluation"),
4397 "statistics",
"outEvaluation",
"exportEvaluation",
"detailedEvaluation",
"eval_a",
"evalUserDetail",
4398 "passDetails",
"outStatisticsResultsOverview",
"statisticsPassDetails",
"singleResults" 4404 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
4406 if (!in_array(
'history', $hidden_tabs)) {
4409 $this->tabs_gui->addTarget(
"history",
4410 $this->ctrl->getLinkTarget($this,
'history'),
4414 if (!in_array(
'meta_data', $hidden_tabs)) {
4416 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
4418 $mdtab = $mdgui->getTab();
4421 $this->tabs_gui->addTarget(
"meta_data",
4423 "",
"ilmdeditorgui");
4427 if(!in_array(
'export', $hidden_tabs))
4430 $this->tabs_gui->addTarget(
4432 $this->ctrl->getLinkTargetByClass(
'iltestexportgui' ,
''),
4434 array(
'iltestexportgui')
4439 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->ref_id)&& !in_array(
'permissions', $hidden_tabs))
4441 $this->tabs_gui->addTarget(
"perm_settings",
4442 $this->ctrl->getLinkTargetByClass(
array(get_class($this),
'ilpermissiongui'),
"perm"),
array(
"perm",
"info",
"owner"),
'ilpermissiongui');
4446 if( $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken() )
4448 $hideTabs = $this->testQuestionSetConfigFactory->getQuestionSetConfig()->getHiddenTabsOnBrokenDepencies();
4450 foreach($hideTabs as $tabId)
4452 $this->tabs_gui->removeTab($tabId);
4462 $DIC->ctrl()->redirectByClass(
'ilObjTestGUI',
"infoScreen");
4477 if ($ilAccess->checkAccess(
"read",
"", $a_target))
4480 $_GET[
"baseClass"] =
"ilObjTestGUI";
4481 $_GET[
"cmd"] =
"infoScreen";
4482 $_GET[
"ref_id"] = $a_target;
4483 include_once(
"ilias.php");
4487 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
4494 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
4505 if($this->create_question_mode)
4510 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
4514 $ilCtrl->saveParameter($this,
'q_mode');
4516 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'test_express_mode', 1);
4517 $ilCtrl->setParameter($this,
'test_express_mode', 1);
4518 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'q_id', $_REQUEST[
'q_id']);
4519 $ilCtrl->setParameter($this,
'q_id', $_REQUEST[
'q_id']);
4520 $ilToolbar->setFormAction($ilCtrl->getFormActionByClass(
'iltestexpresspageobjectgui',
'edit'));
4522 if($this->
object->evalTotalPersons() == 0)
4544 $ilToolbar->addFormButton($lng->txt(
"ass_create_question"),
"addQuestion");
4546 $ilToolbar->addSeparator();
4548 if($this->
object->getPoolUsage())
4550 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
4554 $show_separator =
true;
4558 $questions = $this->
object->getQuestionTitlesAndIndexes();
4562 foreach($questions as $id => $label)
4564 $options[$id] = $label .
' ['. $this->lng->txt(
'question_id_short') .
': ' . $id .
']';
4567 $optionKeys = array_keys(
$options);
4597 if(count($questions))
4599 if(isset($show_separator) && $show_separator)
4601 $ilToolbar->addSeparator();
4605 $btn->setCaption(
"test_prev_question");
4606 $btn->setUrl($ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'prevQuestion'));
4607 $ilToolbar->addButtonInstance($btn);
4609 if( count(
$options) <= 1 || $optionKeys[0] == $qid )
4611 $btn->setDisabled(
true);
4615 $btn->setCaption(
"test_next_question");
4616 $btn->setUrl($ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'nextQuestion'));
4617 $ilToolbar->addButtonInstance($btn);
4619 if( count(
$options) <= 1 || $optionKeys[count($optionKeys) - 1] == $qid )
4621 $btn->setDisabled(
true);
4625 if(count($questions) > 1)
4628 $ilToolbar->addSeparator();
4630 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
4632 $si->addCustomAttribute(
"onChange=\"forms['ilToolbar'].submit();\"");
4637 $si->setValue($qid);
4640 $ilToolbar->addInputItem(
$si,
true);
4643 $total = $this->
object->evalTotalPersons();
4658 if(count($questions) && !
$total)
4660 $ilCtrl->setParameter($this,
'q_id', $_REQUEST[
'q_id']);
4661 $ilToolbar->addSeparator();
4662 $ilToolbar->addButton($lng->txt(
"test_delete_page"), $ilCtrl->getLinkTarget($this,
"removeQuestions"));
4665 if(count($questions) > 1 && !
$total)
4667 $ilToolbar->addSeparator();
4668 $ilToolbar->addButton($lng->txt(
"test_move_page"), $ilCtrl->getLinkTarget($this,
"movePageForm"));
4673 $online_access =
false;
4674 if($this->
object->getFixedParticipants())
4676 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
4678 if($online_access_result ===
true)
4680 $online_access =
true;
4684 if($this->
object->isOnline() && $this->
object->isComplete( $this->testQuestionSetConfigFactory->getQuestionSetConfig() ))
4686 if((!$this->
object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id))
4688 $testSession = $this->testSessionFactory->getSession();
4690 $executable = $this->
object->isExecutable($testSession, $ilUser->getId(), $allowPassIncrease = TRUE);
4692 if($executable[
"executable"])
4695 $player_instance = $player_factory->getPlayerGUI();
4697 if ($testSession->getActiveId() > 0)
4699 $ilToolbar->addSeparator();
4700 $ilToolbar->addButton($lng->txt(
'tst_resume_test'), $ilCtrl->getLinkTarget($player_instance,
'resumePlayer'));
4704 $ilToolbar->addSeparator();
4705 $ilToolbar->addButton($lng->txt(
'tst_start_test'), $ilCtrl->getLinkTarget($player_instance,
'startTest'));
4715 $this->ctrl->redirect($this,
'questions');
4721 foreach($questionIds as $q_id)
4724 $newIds[$q_id] = $newId;
4736 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
4739 $newtitle = $question_gui->object->getTitle();
4740 if ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle()))
4743 while ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle() .
" ($counter)"))
4747 $newtitle = $question_gui->object->getTitle() .
" ($counter)";
4750 return $question_gui->object->createNewOriginalFromThisDuplicate($targetParentId, $newtitle);
4758 global $ilObjDataCache;
4760 $qplId = $ilObjDataCache->lookupObjId($_REQUEST[
'sel_qpl']);
4763 foreach(
$result->ids as $oldId => $newId)
4770 $oldOriginal->delete($oldOriginal->getId());
4773 $questionInstance->setNewOriginalId($newId);
4777 $this->ctrl->redirect($this,
'questions');
4783 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
4787 $title->setRequired(
true);
4791 $form->addItem($description);
4793 $form->addCommandButton(
'createQuestionPoolAndCopy', $lng->txt(
'create'));
4795 if(isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id']))
4797 foreach($_REQUEST[
'q_id'] as $id)
4800 $hidden->setValue($id);
4801 $form->addItem($hidden);
4817 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
4821 'copyAndLinkToQuestionpool' == $this->ctrl->getCmd() &&
4822 (!isset($_REQUEST[
'q_id']) || !is_array($_REQUEST[
'q_id']))
4826 $this->ctrl->redirect($this,
'questions');
4829 if(isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id']))
4831 foreach($_REQUEST[
'q_id'] as $q_id)
4843 $this->ctrl->redirect($this,
'questions');
4856 if ($_REQUEST[
'title'])
4858 $title = $_REQUEST[
'title'];
4862 $title = $_REQUEST[
'txt_qpl'];
4872 $_REQUEST[
'sel_qpl'] =
$ref_id;
4894 $ilTabs->activateSubTab(
'edit_test_questions');
4896 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_qpl_select_copy.html",
"Modules/Test");
4897 $questionpools =& $this->
object->getAvailableQuestionpools(FALSE, FALSE, FALSE, TRUE, FALSE,
"write");
4898 if(count($questionpools) == 0)
4900 $this->tpl->setCurrentBlock(
"option");
4901 $this->tpl->setVariable(
"VALUE_QPL",
"");
4902 $this->tpl->parseCurrentBlock();
4906 foreach($questionpools as $key => $value)
4908 $this->tpl->setCurrentBlock(
"option");
4909 $this->tpl->setVariable(
"VALUE_OPTION", $key);
4910 $this->tpl->setVariable(
"TEXT_OPTION", $value[
"title"]);
4911 $this->tpl->parseCurrentBlock();
4915 if(isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id']))
4917 foreach($_REQUEST[
'q_id'] as $id)
4919 $this->tpl->setCurrentBlock(
"hidden");
4920 $this->tpl->setVariable(
"HIDDEN_NAME",
"q_id[]");
4921 $this->tpl->setVariable(
"HIDDEN_VALUE", $id);
4922 $this->tpl->parseCurrentBlock();
4923 $this->tpl->setCurrentBlock(
"adm_content");
4926 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
4928 if(count($questionpools) == 0)
4930 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_enter_questionpool"));
4931 $cmd =
'createQuestionPoolAndCopy';
4935 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_select_questionpool"));
4938 $this->tpl->setVariable(
"CMD_SUBMIT",
$cmd);
4939 $this->tpl->setVariable(
"BTN_SUBMIT", $this->lng->txt(
"submit"));
4940 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
4945 case 'copyAndLinkQuestionsToPool':
4947 $hidden->setValue(1);
4948 $createForm->addItem($hidden);
4950 case 'copyQuestionsToPool':
4953 $createForm->setFormAction($this->ctrl->getFormAction($this));
4955 $this->tpl->parseCurrentBlock();
4963 $simpleSetters =
array(
4966 'use_pool' =>
'setPoolUsage',
4967 'question_set_type' =>
'setQuestionSetType',
4970 'intro_enabled' =>
'setIntroductionEnabled',
4971 'showinfo' =>
'setShowInfo',
4974 'chb_starting_time' =>
'setStartingTimeEnabled',
4975 'chb_ending_time' =>
'setEndingTimeEnabled',
4976 'password_enabled' =>
'setPasswordEnabled',
4977 'fixedparticipants' =>
'setFixedParticipants',
4978 'limitUsers' =>
'setLimitUsersEnabled',
4981 'nr_of_tries' =>
'setNrOfTries',
4982 'chb_processing_time' =>
'setEnableProcessingTime',
4983 'kiosk' =>
'setKiosk',
4984 'examid_in_test_pass' =>
'setShowExamIdInTestPassEnabled',
4987 'title_output' =>
'setTitleOutput',
4989 'chb_shuffle_questions' =>
'setShuffleQuestions',
4990 'offer_hints' =>
'setOfferingQuestionHintsEnabled',
4991 'instant_feedback' =>
'setScoringFeedbackOptionsByArray',
4992 'obligations_enabled' =>
'setObligationsEnabled',
4995 'chb_use_previous_answers' =>
'setUsePreviousAnswers',
4996 'chb_show_cancel' =>
'setShowCancel',
4997 'chb_postpone' =>
'setPostponingEnabled',
4998 'list_of_questions' =>
'setListOfQuestionsSettings',
4999 'chb_show_marker' =>
'setShowMarker',
5002 'enable_examview' =>
'setEnableExamview',
5003 'showfinalstatement' =>
'setShowFinalStatement',
5004 'redirection_enabled' => null,
5005 'sign_submission' =>
'setSignSubmission',
5006 'mailnotification' =>
'setMailNotification',
5009 'count_system' =>
'setCountSystem',
5010 'mc_scoring' =>
'setMCScoring',
5011 'score_cutting' =>
'setScoreCutting',
5012 'pass_scoring' =>
'setPassScoring',
5013 'pass_deletion_allowed' =>
'setPassDeletionAllowed',
5016 'results_access_enabled' =>
'setScoreReporting',
5017 'grading_status' =>
'setShowGradingStatusEnabled',
5018 'grading_mark' =>
'setShowGradingMarkEnabled',
5021 'solution_details' =>
'setShowSolutionDetails',
5022 'solution_feedback' =>
'setShowSolutionFeedback',
5023 'solution_suggested' =>
'setShowSolutionSuggested',
5024 'solution_printview' =>
'setShowSolutionPrintview',
5025 'highscore_enabled' =>
'setHighscoreEnabled',
5026 'solution_signature' =>
'setShowSolutionSignature',
5027 'examid_in_test_res' =>
'setShowExamIdInTestResultsEnabled',
5028 'exp_sc_short' =>
'setExportSettingsSingleChoiceShort',
5031 'anonymity' =>
'setAnonymity',
5032 'enable_archiving' =>
'setEnableArchiving' 5035 if (!$templateData[
'results_presentation'][
'value'])
5037 $templateData[
'results_presentation'][
'value'] =
array();
5040 foreach($simpleSetters as $field => $setter)
5042 if($templateData[$field] && strlen($setter))
5044 $object->$setter($templateData[$field][
'value']);
5051 if( $templateData[$field][
'value'] > 0 )
5054 $object->setAutosaveIval($templateData[$field][
'value'] * 1000);
5062 case 'redirection_enabled':
5071 if( strlen($templateData[$field][
'value']) )
5074 $object->setRedirectionUrl($templateData[$field][
'value']);
5079 $object->setRedirectionUrl(
'');
5088 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
5092 $this->ctrl->redirect($this,
"infoScreen");
5097 $orders = $obligations =
array();
5099 foreach((
array)$_REQUEST[
'order'] as $qId => $order)
5101 $id = (int)str_replace(
'q_',
'', $qId);
5103 $orders[$id] = $order;
5106 if( $this->
object->areObligationsEnabled() && isset($_REQUEST[
'obligatory']) && is_array($_REQUEST[
'obligatory']) )
5108 foreach($_REQUEST[
'obligatory'] as $qId => $obligation)
5110 $id = (int)str_replace(
'q_',
'', $qId);
5114 $obligations[$id] = $obligation;
5119 $this->
object->setQuestionOrderAndObligations(
5120 $orders, $obligations
5124 $ilCtrl->redirect($this,
'questions');
5134 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
5136 $form->setFormAction($ilCtrl->getFormAction($this,
"movePage"));
5137 $form->setTitle($lng->txt(
"test_move_page"));
5140 $old_pos->setValue($_REQUEST[
'q_id']);
5141 $form->addItem($old_pos);
5143 $questions = $this->
object->getQuestionTitlesAndIndexes();
5144 if (!is_array($questions))
5145 $questions =
array();
5147 foreach($questions as $k => $q) {
5148 if ($k == $_REQUEST[
'q_id']) {
5149 unset($questions[$k]);
5152 $questions[$k] = $lng->txt(
'behind') .
' '. $q;
5154 #$questions['0'] = $lng->txt('first'); 5157 0 => $lng->txt(
'first')
5159 foreach($questions as $k => $q) {
5160 $options[$k] = $q .
' ['. $this->lng->txt(
'question_id_short') .
': ' . $k .
']';
5165 $form->addItem($pos);
5167 $form->addCommandButton(
"movePage", $lng->txt(
"submit"));
5168 $form->addCommandButton(
"showPage", $lng->txt(
"cancel"));
5170 return $tpl->setContent($form->getHTML());
5175 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
5179 $this->ctrl->redirect($this,
"infoScreen");
5182 $this->
object->moveQuestionAfter($_REQUEST[
'q_id'], $_REQUEST[
'position_after']);
5189 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'q_id', $_REQUEST[
'q_id']);
5190 $ilCtrl->redirectByClass(
'iltestexpresspageobjectgui',
'showPage');
5195 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
5199 $this->ctrl->redirect($this,
"infoScreen");
5202 if ($_REQUEST[
'q_id'] && !is_array($_REQUEST[
'q_id']))
5203 $ids =
array($_REQUEST[
'q_id']);
5204 else if ($_REQUEST[
'q_id'])
5205 $ids = $_REQUEST[
'q_id'];
5209 $this->ctrl->redirect($this,
'questions');
5214 $questionTitles = $this->
object->getQuestionTitles();
5216 foreach($ids as $id)
5218 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
5222 $title = $question->object->getTitle();
5224 while( in_array(
$title .
' (' . $i .
')', $questionTitles ))
5227 $title .=
' (' . $i .
')';
5229 $questionTitles[] =
$title;
5231 $new_id = $question->object->duplicate(
false,
$title);
5234 $clone->object->setObjId($this->
object->getId());
5235 $clone->object->saveToDb();
5237 $this->
object->insertQuestion( $this->testQuestionSetConfigFactory->getQuestionSetConfig(), $new_id, true );
5245 $this->ctrl->redirect($this,
'questions');
5253 if( !isset(
$_GET[
'pdf']) )
5258 if( !(
bool)
$_GET[
'pdf'] )
5268 require_once
'Modules/Course/classes/Objectives/class.ilLOSettings.php';
5273 $this->objectiveOrientedContainer->setObjId($containerObjId);
5274 $this->objectiveOrientedContainer->setRefId($containerRefId);
const MATCHING_QUESTION_IDENTIFIER
const MULTIPLE_CHOICE_QUESTION_IDENTIFIER
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupName($a_user_id)
lookup user name
copyQuestionsToPoolObject()
static getSettingsTemplateConfig()
getQuestionpoolCreationForm()
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
applyTemplate($templateData, $object)
This class represents an option in a radio group.
static getAllSettingsTemplates($a_type, $a_include_auto_generated=false)
Get all settings templates of type.
static _instanciateQuestion($question_id)
Creates an instance of a question with a given question id.
static _getOriginalId($question_id)
Returns the original id of a question.
copyToQuestionpoolObject()
static getQuestionTypeFromDb($question_id)
get question type for question id
userResultsGatewayObject()
const ERROR_TEXT_IDENTIFIER
static _getParticipantData($active_id)
Retrieves a participant name from active id.
createQuestionObject()
Called when a new question should be created from a test.
getTabs()
adds tabs to tab gui object
confirmedApplyDefaultsObject()
Export User Interface Class.
trackTestObjectReadEvent()
reviewobject()
Review tab to create a print of all questions without points and solutions.
fullscreenObject()
show fullscreen view
GUI class for the workflow of copying objects.
static originalQuestionExists($questionId)
const QUESTION_SET_TYPE_RANDOM
type setting value for random question set
copyQuestionToPool($sourceQuestionId, $targetParentId)
$testQuestionSetConfigFactory
uploadObject($redirect=true)
display status information or report errors messages in case of error
const ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT
constant for additional content editing mode "pageobject"
Class ilTestPersonalDefaultSettingsTableGUI.
Generic feedback page GUI class.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static _needsManualScoring($question_id)
cancelCreateQuestionObject()
Called when the creation of a new question is cancelled.
buildPageViewToolbar($qid=0)
Questions per page.
showDetailedResultsObject()
Shows the pass overview and the answers of one ore more users for the scored pass.
Class ilObject Basic functions for all objects.
static getQuestionTypeByTypeId($type_id)
determineObjectiveOrientedContainer()
applyFilterCriteria($in_rows)
static & _instanciateQuestionGUI($question_id)
Creates an instance of a question gui with a given question id.
insertQuestionsBeforeObject()
Insert checked questions before the actual selection.
addDidacticTemplateOptions(array &$a_options)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getLog($ts_from, $ts_to, $test_id, $test_only=FALSE)
Retrieve assessment log datasets from the database.
const QT_ORDERING_HORIZONTAL
const KPRIM_CHOICE_QUESTION_IDENTIFIER
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
const LONG_MENU_QUESTION_IDENTIFIER
static isObjectiveTest($a_trst_ref_id)
Check if test ref_id is used in an objective course.
Class ilUnitConfigurationRepository.
const TEXTSUBSET_QUESTION_IDENTIFIER
deleteSingleUserResultsObject()
Asks for a confirmation to delete selected user data of the test object.
static _goto($a_target)
Redirect script to call a test with the test reference id.
static _lookupTitle($a_id)
lookup object title
const REDIRECT_NONE
Redirect after finishing test constants.
showUserResults($show_pass_details, $show_answers, $show_reached_points=FALSE)
Shows the pass overview of the scored pass for one ore more users.
historyObject()
Creates the change history for a test.
downloadFileObject()
download file
createQuestionpoolTargetObject($cmd)
Called when a new question should be created from a test Important: $cmd may be overwritten if no que...
createObject()
create new object form
static _isActive()
Static getter.
insertRandomSelectionObject()
Inserts a random selection into the test.
redirectTo_ilObjTestSettingsGeneralGUI_showForm_Object()
const CMD_BROWSE_QUESTIONS
const QUESTION_INSTANCE_TYPE_DUPLICATES
confirmRemoveQuestionsObject()
Remove questions from the test after confirmation.
removeParticipantObject()
static lookupParentObjId($questionId)
ilDBInterface $ilDB
static accessViolationRedirect()
cancelDeleteSelectedUserDataObject()
Cancels the deletion of all user data for the test object.
static $infoScreenChildClasses
static _getAllReferences($a_id)
get all reference ids of object
addDefaultsObject()
Adds the defaults of this test to the defaults.
deleteAllUserDataObject()
Asks for a confirmation to delete all user data of the test object.
Base Exception for all Exceptions relating to Modules/Test.
createUserResults($show_pass_details, $show_answers, $show_reached_points, $show_user_results)
participantsActionObject()
Evaluates the actions on the participants page.
afterSave(ilObject $a_new_object)
save object public
const FILE_UPLOAD_IDENTIFIER
const QT_MULTIPLE_CHOICE_SR
const JAVAAPPLET_QUESTION_IDENTIFIER
confirmDeleteSelectedUserDataObject()
Deletes the selected user data for the test object.
cancelRemoveQuestionsObject()
Cancels the removal of questions from the test.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
isCommandClassAnyInfoScreenChild()
deleteAllUserResultsObject()
Asks for a confirmation to delete all user data of the test object.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
prepareSubGuiOutput()
prepares ilias to get output rendered by sub gui class
saveOrderAndObligationsObject()
copyAndLinkQuestionsToPoolObject()
ilObjectDataCache $ilObjDataCache
static _lookupOnlineTestAccess($a_test_id, $a_user_id)
Checks if a user is allowd to run an online exam.
prepareOutput($a_show_subobjects=true)
prepare output
showUserAnswersObject()
Shows the answers of one ore more users for the scored pass.
removeImportFailsObject()
questionsTabGatewayObject()
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
copyAndLinkToQuestionpoolObject()
getBrowseForQuestionsTab(&$tabs_gui)
setValue($a_value)
Set Value.
deleteRegisteredImportFails()
const NUMERIC_QUESTION_IDENTIFIER
if(!is_array($argv)) $options
removeQuestionsObject()
Called when a selection of questions should be removed from the test.
$objectiveOrientedContainer
const ORDERING_HORIZONTAL_IDENTIFIER
const SCORE_ZERO_POINTS_WHEN_UNANSWERED
initImportForm($a_new_type)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Class ilTimingOverviewTableGUI.
confirmDeleteAllUserResultsObject()
Deletes all user data for the test object.
const COUNT_PARTIAL_SOLUTIONS
applyDefaultsObject($confirmed=false)
Applies the selected test defaults.
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...
download_paragraphObject()
download source code paragraph
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
fetchAuthoringQuestionIdParameter()
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
const ORDERING_QUESTION_IDENTIFIER
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
insertQuestionsAfterObject()
Insert checked questions after the actual selection.
special template class to simplify handling of ITX/PEAR
createQuestionPool($name="dummy", $description="")
Creates a new questionpool and returns the reference id.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
static formatDate(ilDateTime $date)
Format a date public.
Output class for assessment test evaluation.
GUI class to create PDF certificates.
static infoPanel($a_keep=true)
redirection script todo: (a better solution should control the processing via a xml file) ...
static isSkillManagementGloballyActivated()
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.
setTitleAndDescription()
called by prepare output
static getSyntaxStylePath()
get syntax style path
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
const TEXT_QUESTION_IDENTIFIER
Basic GUI class for assessment questions.
static isQuestionObligationPossible($questionId)
checks wether the obligation for question with given id is possible or not
const EDIT_CONTEXT_AUTHORING
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
forwardToEvalObjectiveOrientedGUI()
filterObject()
Sets the filter for the question browser.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
participantsObject()
Creates the output of the test participants.
const FLASHAPPLET_QUESTION_IDENTIFIER
browseForQuestionsObject()
writeFilterToSession()
Write filter values to session.
static _createImportDirectory()
creates data directory for import files (data_dir/tst_data/tst_<id>/import, depending on data directo...
const TEST_FIXED_SEQUENCE
Test constants.
const ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT
constant for additional content editing mode "default"
executeCommand()
execute command
exportObject()
Gateway for exports initiated from workspace, as there is a generic forward to {objTypeMainGUI}export...
static getContentStylePath($a_style_id)
get content style path
static prepareGeneration()
Prepare the PDF generation This initializes the purpose for MathJax rendering It has to be called bef...
Test results import parser.
redirectToInfoScreenObject()
Specific feedback page GUI class.
createQuestionPoolAndCopyObject()
randomselectObject()
Creates a form for random selection of questions.
importVerifiedFileObject()
imports question(s) into the questionpool (after verification)
createRandomSelectionObject()
Offers a random selection for insertion in the test.
certificateObject()
Shows the certificate editor.
Create new PHPExcel object
obj_idprivate
static _getManualScoring()
Retrieve the manual scoring settings.
cancelRandomSelectObject()
Cancels the form for random selection of questions.
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
static generatePDF($pdf_output, $output_mode, $filename=null)
importFileObject($parent_id=null, $a_catch_errors=true)
form for new test object import
executeCreateQuestionObject()
Called when a new question should be created from a test after confirmation.
static isAdditionalQuestionContentEditingModePageObjectEnabled()
returns the fact wether content editing with ilias page editor is enabled for questions or not ...
const QUESTION_SET_TYPE_FIXED
type setting value for fixed question set
getCreationMode()
get creation mode
movePageFormObject()
Move current page.
getRefId()
get reference id public
const RENDER_PURPOSE_PRINT_PDF
getObjectiveOrientedContainer()
Class ilLocalUnitConfigurationGUI.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
moveQuestionsObject()
Marks selected questions for moving.
populateQuestionBrowserToolbarButtons(ilToolbarGUI $toolbar, $context)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
addFinishAllPassesButton($unfinished_passes, $ilToolbar)
static setTokenMaxLifetimeInSeconds($token_max_lifetime_in_seconds)
Service GUI class for tests.
insertQuestionsObject()
Insert questions from the questionbrowser into the test.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
printobject()
Print tab to create a print of all questions with points and solutions.
const QT_MULTIPLE_CHOICE_MR
Class ilScoringAdjustmentGUI.
uploadTstObject()
imports test and question(s)
deleteDefaultsObject()
Deletes selected test defaults.
const PDF_OUTPUT_DOWNLOAD
backObject()
Called when the back button in the question browser was pressed.
static redirect($a_script)
http redirect to other script
const QUESTION_SET_TYPE_DYNAMIC
type setting value for dynamic question set (continues testing mode)
const SINGLE_CHOICE_QUESTION_IDENTIFIER
addHeaderAction()
Add header action menu.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
copyQuestionsToPool($questionIds, $qplId)
const RENDER_PURPOSE_PREVIEW
getRandomQuestionsTab(&$tabs_gui)
ilTestScoringByQuestionsGUI
ilTestExpressPageObjectGUI: assMultipleChoiceGUI, assClozeTestGUI, assMatchingQuestionGUI ilTestExpr...
Class ilObjUserTrackingGUI.
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
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.
resetFilter()
Reset filter.
const CMD_SHOW_SKILL_QUEST_ASSIGNS
Test certificate adapter.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
Settings template application class.
const CLOZE_TEST_IDENTIFIER
Question identifier constants.
static instantiateQuestionGUI($a_question_id)
Creates an instance of a question gui with a given question id.
static _setImportDirectory($a_import_dir=null)
set import directory
showPassOverviewObject()
Shows the pass overview of the scored pass for one ore more users.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static _getTestDefaults($test_defaults_id)
const QUESTION_INSTANCE_TYPE_ORIGINALS
__construct()
Constructor public.
static _getImportDirectory()
Get the import directory location of the test.
const CMD_SHOW_FORM
command constants
resetFilterObject()
Resets the filter for the question browser.
Confirmation screen class.
const IMAGEMAP_QUESTION_IDENTIFIER
deleteRegisteredImportFails()
const FORMULA_QUESTION_IDENTIFIER
addParticipantsObject($a_user_ids=array())
setFilterCommand($a_val, $a_caption=null)
Set filter command.
removeQuestionsForm($checked_questions)
Displays a form to confirm the removal of questions from the test.