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);
88 require_once
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
91 require_once
'Modules/Test/classes/class.ilTestPlayerFactory.php';
94 require_once
'Modules/Test/classes/class.ilTestSessionFactory.php';
97 require_once
'Modules/Test/classes/class.ilTestSequenceFactory.php';
101 require_once
'Modules/Test/classes/class.ilTestObjectiveOrientedContainer.php';
110 global $ilAccess, $ilNavigationHistory,
$ilCtrl,
$ilErr,
$tpl,
$lng, $ilTabs, $ilPluginAdmin,
$ilDB,
$tree, $ilias,
$ilUser;
112 if ((!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))) {
113 $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
116 $cmd = $this->ctrl->getCmd(
"infoScreen");
118 $cmdsDisabledDueToOfflineStatus =
array(
119 'resumePlayer',
'resumePlayer',
'outUserResultsOverview',
'outUserListOfAnswerPasses' 122 if (!$this->
getCreationMode() && !$this->
object->isOnline() && in_array($cmd, $cmdsDisabledDueToOfflineStatus)) {
126 $next_class = $this->ctrl->getNextClass($this);
127 $this->ctrl->setReturn($this,
"infoScreen");
129 if (method_exists($this->
object,
"getTestStyleLocation")) {
130 $this->tpl->addCss($this->
object->getTestStyleLocation(
"output"),
"screen");
135 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])
137 $ilNavigationHistory->addItem(
139 "ilias.php?baseClass=ilObjTestGUI&cmd=infoScreen&ref_id=" .
$_GET[
"ref_id"],
145 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()) {
152 if (!$this->testQuestionSetConfigFactory->getQuestionSetConfig()->isValidRequestOnBrokenQuestionSetDepencies($next_class, $cmd)) {
153 $this->ctrl->redirectByClass(
'ilObjTestGUI',
'infoScreen');
159 switch ($next_class) {
160 case 'illtiproviderobjectsettinggui':
163 $this->getSettingsSubTabs();
164 $GLOBALS[
'DIC']->tabs()->activateTab(
'settings');
165 $GLOBALS[
'DIC']->tabs()->activateSubTab(
'lti_provider');
168 $lti_gui->offerLTIRolesForSelection(
false);
169 $this->ctrl->forwardCommand($lti_gui);
173 case 'iltestexportgui':
174 if (!$ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
175 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
180 require_once
'Modules/Test/classes/class.ilTestExportGUI.php';
184 case "ilinfoscreengui":
189 case 'ilobjectmetadatagui':
190 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
191 $ilErr->raiseError($this->lng->txt(
'permission_denied'), $ilErr->WARNING);
196 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
198 $this->ctrl->forwardCommand($md_gui);
201 case "iltestplayerfixedquestionsetgui":
203 require_once
"./Modules/Test/classes/class.ilTestPlayerFixedQuestionSetGUI.php";
204 if (!$this->
object->getKioskMode()) {
209 $this->ctrl->forwardCommand($gui);
212 case "iltestplayerrandomquestionsetgui":
214 require_once
"./Modules/Test/classes/class.ilTestPlayerRandomQuestionSetGUI.php";
215 if (!$this->
object->getKioskMode()) {
220 $this->ctrl->forwardCommand($gui);
223 case "iltestplayerdynamicquestionsetgui":
225 require_once
"./Modules/Test/classes/class.ilTestPlayerDynamicQuestionSetGUI.php";
226 if (!$this->
object->getKioskMode()) {
231 $this->ctrl->forwardCommand($gui);
234 case "iltestevaluationgui":
238 case "iltestevalobjectiveorientedgui":
242 case "iltestservicegui":
245 require_once
"./Modules/Test/classes/class.ilTestServiceGUI.php";
247 $this->ctrl->forwardCommand($serviceGUI);
250 case 'ilpermissiongui':
253 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
255 $ret = $this->ctrl->forwardCommand($perm_gui);
258 case "illearningprogressgui":
261 require_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
263 $this->ctrl->forwardCommand($new_gui);
267 case "ilcertificategui":
270 require_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
271 require_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
273 $this->ctrl->forwardCommand($output_gui);
276 case "iltestscoringgui":
279 require_once
"./Modules/Test/classes/class.ilTestScoringGUI.php";
281 $this->ctrl->forwardCommand($output_gui);
284 case 'ilmarkschemagui':
285 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
287 $this->ctrl->redirect($this,
'infoScreen');
291 require_once
'Modules/Test/classes/class.ilMarkSchemaGUI.php';
293 $this->ctrl->forwardCommand($mark_schema_gui);
296 case 'iltestscoringbyquestionsgui':
299 include_once
'Modules/Test/classes/class.ilTestScoringByQuestionsGUI.php';
301 $this->ctrl->forwardCommand($output_gui);
304 case 'ilobjtestsettingsgeneralgui':
307 require_once
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
319 $this->ctrl->forwardCommand($gui);
322 case 'ilobjtestsettingsscoringresultsgui':
325 require_once
'Modules/Test/classes/class.ilObjTestSettingsScoringResultsGUI.php';
336 $this->ctrl->forwardCommand($gui);
339 case 'ilobjtestdynamicquestionsetconfiggui':
342 require_once
'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfigGUI.php';
344 $this->ctrl->forwardCommand($gui);
347 case 'iltestrandomquestionsetconfiggui':
350 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetConfigGUI.php';
352 $this->ctrl->forwardCommand($gui);
355 case 'iltestquestionbrowsertablegui':
358 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
359 $gui =
new ilTestQuestionBrowserTableGUI($this->ctrl, $this->tpl, $ilTabs, $this->lng, $tree, $ilDB, $ilPluginAdmin, $this->
object, $ilAccess);
360 $gui->setWriteAccess($ilAccess->checkAccess(
"write",
"", $this->ref_id));
362 $this->ctrl->forwardCommand($gui);
365 case 'iltestskilladministrationgui':
368 require_once
'Modules/Test/classes/class.ilTestSkillAdministrationGUI.php';
369 $gui =
new ilTestSkillAdministrationGUI($ilias, $this->ctrl, $ilAccess, $ilTabs, $this->tpl, $this->lng, $ilDB, $tree, $ilPluginAdmin, $this->
object, $this->ref_id);
370 $this->ctrl->forwardCommand($gui);
373 case 'iltestskillevaluationgui':
377 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
378 if ($this->
object->isDynamicTest()) {
379 require_once
'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php';
381 $dynamicQuestionSetConfig->loadFromDb();
383 $questionList->setParentObjId($dynamicQuestionSetConfig->getSourceQuestionPoolId());
387 $questionList->setParentObjId($this->
object->getId());
390 $questionList->load();
392 require_once
'Modules/Test/classes/class.ilTestSessionFactory.php';
396 require_once
'Modules/Test/classes/class.ilTestSkillEvaluationGUI.php';
398 $gui->setQuestionList($questionList);
399 $gui->setTestSession($testSession);
401 $this->ctrl->forwardCommand($gui);
404 case 'ilobjectcopygui':
407 require_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
410 $this->ctrl->forwardCommand($cp);
413 case 'ilrepositorysearchgui':
416 require_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
418 $rep_search->setCallback(
420 'addParticipantsObject',
425 $this->ctrl->setReturn($this,
'participants');
426 $ret =&$this->ctrl->forwardCommand($rep_search);
427 $this->tabs_gui->setTabActive(
'participants');
430 case 'ilpageeditorgui':
431 case 'iltestexpresspageobjectgui':
433 require_once
'Modules/TestQuestionPool/classes/class.ilAssIncompleteQuestionPurger.php';
435 $incompleteQuestionPurger->setOwnerId($ilUser->getId());
436 $incompleteQuestionPurger->purge();
445 if (!in_array($cmd,
array(
'addQuestion',
'browseForQuestions'))) {
449 if (!$qid || in_array($cmd,
array(
'insertQuestions',
'browseForQuestions'))) {
450 require_once
"./Modules/Test/classes/class.ilTestExpressPageObjectGUI.php";
453 $ret =&$this->ctrl->forwardCommand($pageObject);
456 require_once
"./Services/Style/Content/classes/class.ilObjStyleSheet.php";
457 $this->tpl->setCurrentBlock(
"ContentStyle");
458 $this->tpl->setVariable(
459 "LOCATION_CONTENT_STYLESHEET",
462 $this->tpl->parseCurrentBlock();
465 $this->tpl->setCurrentBlock(
"SyntaxStyle");
466 $this->tpl->setVariable(
467 "LOCATION_SYNTAX_STYLESHEET",
470 $this->tpl->parseCurrentBlock();
471 require_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
475 $this->ctrl->setParameterByClass(
'iltestexpresspageobjectgui',
'q_id',
'');
476 $this->ctrl->redirectByClass(
'iltestexpresspageobjectgui', $this->ctrl->getCmd());
481 $q_gui->outAdditionalOutput();
482 $q_gui->object->setObjId($this->
object->getId());
484 $q_gui->setTargetGuiClass(null);
485 $q_gui->setQuestionActionCmd(null);
487 $question = $q_gui->object;
488 $this->ctrl->saveParameter($this,
"q_id");
490 #$this->lng->loadLanguageModule("content"); 491 $this->ctrl->setReturnByClass(
"ilTestExpressPageObjectGUI",
"view");
492 $this->ctrl->setReturn($this,
"questions");
494 require_once
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php";
495 require_once
"./Modules/Test/classes/class.ilTestExpressPageObjectGUI.php";
499 $page_gui->setEditPreview(
true);
500 $page_gui->setEnabledTabs(
false);
501 if (strlen($this->ctrl->getCmd()) == 0) {
502 $this->ctrl->setCmdClass(get_class($page_gui));
503 $this->ctrl->setCmd(
"preview");
506 $page_gui->setQuestionHTML(
array($q_gui->object->getId() => $q_gui->getPreview(
true)));
507 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
509 $page_gui->setOutputMode($this->
object->evalTotalPersons() == 0 ?
"edit" :
'preview');
511 $page_gui->setHeader($question->getTitle());
512 $page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this,
"downloadFile"));
513 $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this,
"fullscreen"));
514 $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this));
515 $page_gui->setPresentationTitle($question->getTitle() .
' [' . $this->lng->txt(
'question_id_short') .
': ' . $question->getId() .
']');
516 $ret =&$this->ctrl->forwardCommand($page_gui);
519 $ilTabs->activateTab(
'assQuestions');
521 $this->tpl->setContent(
$ret);
524 case 'ilassquestionpreviewgui':
528 $this->ctrl->saveParameter($this,
"q_id");
530 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
534 $gui->initPreviewSettings($this->
object->getRefId());
535 $gui->initPreviewSession($ilUser->getId(), (int)
$_GET[
'q_id']);
536 $gui->initHintTracking();
537 $gui->initStyleSheets();
539 $this->ctrl->forwardCommand($gui);
543 case 'ilassquestionpagegui':
547 require_once
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
549 if ($_REQUEST[
'prev_qid']) {
550 $this->ctrl->setParameter($this,
'prev_qid', $_REQUEST[
'prev_qid']);
556 $_GET[
'calling_test'] = $this->
object->getRefId();
557 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
558 $this->tpl->setCurrentBlock(
"ContentStyle");
559 $this->tpl->setVariable(
560 "LOCATION_CONTENT_STYLESHEET",
563 $this->tpl->parseCurrentBlock();
566 $this->tpl->setCurrentBlock(
"SyntaxStyle");
567 $this->tpl->setVariable(
568 "LOCATION_SYNTAX_STYLESHEET",
571 $this->tpl->parseCurrentBlock();
572 require_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
575 $q_gui->setQuestionTabs();
576 $q_gui->outAdditionalOutput();
577 $q_gui->object->setObjId($this->
object->getId());
578 $question =&$q_gui->object;
579 $this->ctrl->saveParameter($this,
"q_id");
580 $this->lng->loadLanguageModule(
"content");
581 $this->ctrl->setReturnByClass(
"ilAssQuestionPageGUI",
"view");
582 $this->ctrl->setReturn($this,
"questions");
584 $page_gui->setEditPreview(
true);
585 if (strlen($this->ctrl->getCmd()) == 0) {
586 $this->ctrl->setCmdClass(get_class($page_gui));
587 $this->ctrl->setCmd(
"preview");
589 $page_gui->setQuestionHTML(
array($q_gui->object->getId() => $q_gui->getPreview(
true)));
590 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
591 $page_gui->setOutputMode($this->
object->evalTotalPersons() == 0 ?
"edit" :
'preview');
592 $page_gui->setHeader($question->getTitle());
593 $page_gui->setPresentationTitle($question->getTitle() .
' [' . $this->lng->txt(
'question_id_short') .
': ' . $question->getId() .
']');
594 $ret =&$this->ctrl->forwardCommand($page_gui);
595 $this->tpl->setContent(
$ret);
598 case 'ilassspecfeedbackpagegui':
599 require_once
"./Modules/TestQuestionPool/classes/feedback/class.ilAssSpecFeedbackPageGUI.php";
601 $this->ctrl->forwardCommand($pg_gui);
604 case 'ilassgenfeedbackpagegui':
605 require_once
"./Modules/TestQuestionPool/classes/feedback/class.ilAssGenFeedbackPageGUI.php";
607 $this->ctrl->forwardCommand($pg_gui);
610 case 'illocalunitconfigurationgui':
614 $this->ctrl->setReturn($this,
"questions");
617 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
619 $questionGUI->object->setObjId($this->
object->getId());
620 $questionGUI->setQuestionTabs();
622 require_once
'Modules/TestQuestionPool/classes/class.ilLocalUnitConfigurationGUI.php';
623 require_once
'Modules/TestQuestionPool/classes/class.ilUnitConfigurationRepository.php';
627 $this->ctrl->forwardCommand($gui);
630 case "ilcommonactiondispatchergui":
631 require_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
633 $this->ctrl->forwardCommand($gui);
636 case 'ilassquestionhintsgui':
641 $this->ctrl->setReturn($this,
"questions");
644 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
646 $questionGUI->object->setObjId($this->
object->getId());
647 $questionGUI->setQuestionTabs();
650 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
655 $gui->setEditingEnabled(
656 $DIC->access()->checkAccess(
'write',
'', $this->
object->getRefId())
659 $ilCtrl->forwardCommand($gui);
663 case 'ilassquestionfeedbackeditinggui':
668 $this->ctrl->setReturn($this,
"questions");
671 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
673 $questionGUI->object->setObjId($this->
object->getId());
674 $questionGUI->setQuestionTabs();
677 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
679 $ilCtrl->forwardCommand($gui);
683 case 'iltesttoplistgui':
685 require_once
'./Modules/Test/classes/class.ilTestToplistGUI.php';
687 $this->ctrl->forwardCommand($gui);
690 case 'ilscoringadjustmentgui':
692 require_once
'./Modules/Test/classes/class.ilScoringAdjustmentGUI.php';
694 $this->ctrl->forwardCommand($gui);
701 if ((strcmp($cmd,
"properties") == 0) && ($_GET[
"browse"])) {
702 $this->questionBrowser();
705 if ((strcmp($cmd,
"properties") == 0) && ($_GET[
"up"] || $_GET[
"down"])) {
710 $ret =&$this->$cmd();
714 if ($_REQUEST[
'prev_qid']) {
715 global $___prev_question_id;
716 $___prev_question_id = $_REQUEST[
'prev_qid'];
717 $this->ctrl->setParameterByClass(
'ilassquestionpagegui',
'prev_qid', $_REQUEST[
'prev_qid']);
718 $this->ctrl->setParameterByClass($_GET[
'sel_question_types'] .
'gui',
'prev_qid', $_REQUEST[
'prev_qid']);
720 $this->create_question_mode =
true;
723 $this->ctrl->setReturn($this,
"questions");
724 require_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
727 $q_gui->object->setObjId($this->
object->getId());
728 if (!$_GET[
'sel_question_types']) {
731 $qType = $_GET[
'sel_question_types'];
733 $this->ctrl->setParameterByClass($qType .
"GUI",
'prev_qid', $_REQUEST[
'prev_qid']);
734 $this->ctrl->setParameterByClass($qType .
"GUI",
'test_ref_id', $_REQUEST[
'ref_id']);
735 $this->ctrl->setParameterByClass($qType .
"GUI",
'q_id', $_REQUEST[
'q_id']);
736 if ($_REQUEST[
'test_express_mode']) {
737 $this->ctrl->setParameterByClass($qType .
"GUI",
'test_express_mode', 1);
740 #global $___test_express_mode; 741 #$___test_express_mode = true; 742 if (!$q_gui->isSaveCommand()) {
743 $_GET[
'calling_test'] = $this->
object->getRefId();
746 $q_gui->setQuestionTabs();
747 #unset($___test_express_mode); 748 $ret =&$this->ctrl->forwardCommand($q_gui);
751 if (!in_array(strtolower(
$_GET[
"baseClass"]),
array(
'iladministrationgui',
'ilrepositorygui')) &&
761 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
765 $this->
object->getRefId(),
766 $this->
object->getId(),
767 $DIC->user()->getId()
778 $DIC->ctrl()->redirectByClass(
'ilTestExportGUI');
786 $qid = $_REQUEST[
'q_id'];
788 if (!$qid || $qid ==
'Array') {
789 $questions = $this->
object->getQuestionTitlesAndIndexes();
790 if (!is_array($questions)) {
791 $questions =
array();
794 $keys = array_keys($questions);
797 $_REQUEST[
'q_id'] = $qid;
798 $_GET[
'q_id'] = $qid;
802 if ($this->
object->checkQuestionParent($qid)) {
806 throw new ilTestException(
'question id does not relate to parent object!');
811 switch ($this->
object->getQuestionSetType()) {
813 $this->ctrl->redirectByClass(
'ilTestExpressPageObjectGUI',
'showPage');
817 $this->ctrl->redirectByClass(
'ilTestRandomQuestionSetConfigGUI');
821 $this->ctrl->redirectByClass(
'ilObjTestDynamicQuestionSetConfigGUI');
827 $this->ctrl->setCmdClass(
'ilTestEvaluationGUI');
828 $this->ctrl->setCmd(
'outUserResultsOverview');
829 $this->tabs_gui->clearTargets();
839 require_once
'Modules/Test/classes/class.ilTestEvaluationGUI.php';
843 $this->ctrl->forwardCommand($gui);
851 require_once
'Modules/Test/classes/class.ilTestEvalObjectiveOrientedGUI.php';
855 $this->ctrl->forwardCommand($gui);
866 public function createUserResults($show_pass_details, $show_answers, $show_reached_points, $show_user_results)
868 global $ilTabs,
$ilDB;
872 require_once
'Services/PDFGeneration/classes/class.ilPDFGeneration.php';
876 $ilTabs->setBackTarget(
877 $this->lng->txt(
'back'),
878 $this->ctrl->getLinkTarget($this,
'participants')
882 require_once
'Services/Link/classes/class.ilLink.php';
884 $ilTabs->setBack2Target($this->lng->txt(
'back_to_objective_container'), $courseLink);
887 $template =
new ilTemplate(
"tpl.il_as_tst_participants_result_output.html",
true,
true,
"Modules/Test");
889 require_once
'Modules/Test/classes/toolbars/class.ilTestResultsToolbarGUI.php';
892 $this->ctrl->setParameter($this,
'pdf',
'1');
893 $toolbar->setPdfExportLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
894 $this->ctrl->setParameter($this,
'pdf',
'');
897 if (isset(
$_GET[
'show_best_solutions'])) {
898 $_SESSION[
'tst_results_show_best_solutions'] =
true;
899 } elseif (isset(
$_GET[
'hide_best_solutions'])) {
900 $_SESSION[
'tst_results_show_best_solutions'] =
false;
901 } elseif (!isset(
$_SESSION[
'tst_results_show_best_solutions'])) {
902 $_SESSION[
'tst_results_show_best_solutions'] =
false;
905 if (
$_SESSION[
'tst_results_show_best_solutions']) {
906 $this->ctrl->setParameter($this,
'hide_best_solutions',
'1');
907 $toolbar->setHideBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
908 $this->ctrl->setParameter($this,
'hide_best_solutions',
'');
910 $this->ctrl->setParameter($this,
'show_best_solutions',
'1');
911 $toolbar->setShowBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
912 $this->ctrl->setParameterByClass(
'',
'show_best_solutions',
'');
916 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
918 if ($this->
object->getFixedParticipants()) {
919 $participantData->setUserIds($show_user_results);
921 $participantData->setActiveIds($show_user_results);
923 $participantData->load($this->
object->getTestId());
924 $toolbar->setParticipantSelectorOptions($participantData->getOptionArray($show_user_results));
929 include_once
"./Modules/Test/classes/class.ilTestServiceGUI.php";
932 $serviceGUI->setParticipantData($participantData);
935 foreach ($show_user_results as
$key => $active_id) {
938 if ($this->
object->getFixedParticipants()) {
939 $active_id = $this->
object->getActiveIdOfUser($active_id);
941 if ($active_id > 0) {
942 $results = $serviceGUI->getResultsOfUserOutput(
943 $this->testSessionFactory->getSession($active_id),
945 $this->
object->_getResultPass($active_id),
953 if ($count < count($show_user_results)) {
956 $template->setCurrentBlock(
"user_result");
962 require_once
'Modules/Test/classes/class.ilTestPDFGenerator.php';
967 $this->
object->getTitle(),
977 require_once
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
993 $this->tpl->getStandardTemplate();
1005 if ($ilUser->getId() != ANONYMOUS_USER_ID) {
1006 require_once(
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1016 $this->ctrl->redirect($this,
"infoScreen");
1021 $this->ctrl->redirectByClass(
"iltestevaluationgui",
"outEvaluation");
1030 if (
$form->checkInput()) {
1031 $this->ctrl->setParameter($this,
"new_type", $this->type);
1036 $form->setValuesByPost();
1037 $this->tpl->setContent(
$form->getHTML());
1042 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
1044 $defaults = $tst->getAvailableDefaults();
1045 if (count($defaults)) {
1046 foreach ($defaults as
$row) {
1047 $a_options[
"tstdef_" . $row[
"test_defaults_id"]] =
array($row[
"name"],
1048 $this->lng->txt(
"tst_default_settings"));
1053 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
1056 foreach ($templates as $item) {
1057 $a_options[
"tsttpl_" . $item[
"id"]] =
array($item[
"title"],
1058 nl2br(trim($item[
"description"])));
1071 $testDefaultsId = $tstdef;
1073 $a_new_object->applyDefaults($testDefaults);
1078 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
1081 $template_settings =
$template->getSettings();
1082 if ($template_settings) {
1089 $a_new_object->saveToDb();
1093 $this->ctrl->setParameter($this,
'ref_id', $a_new_object->
getRefId());
1094 $this->ctrl->redirectByClass(
'ilObjTestSettingsGeneralGUI');
1099 include_once
"./Services/Utilities/classes/class.ilUtil.php";
1100 $path = $this->tree->getPathFull($this->
object->getRefID());
1109 if ($_FILES[
"xmldoc"][
"error"] > UPLOAD_ERR_OK) {
1114 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
1119 $file = pathinfo($_FILES[
"xmldoc"][
"name"]);
1120 $full_path = $basedir .
"/" . $_FILES[
"xmldoc"][
"name"];
1121 ilUtil::moveUploadedFile($_FILES[
"xmldoc"][
"tmp_name"], $_FILES[
"xmldoc"][
"name"], $full_path);
1127 $subdir = basename(
$file[
"basename"],
"." .
$file[
"extension"]);
1133 if (!is_file($qti_file)) {
1141 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
1143 $result = $qtiParser->startParsing();
1144 $founditems =&$qtiParser->getFoundItems();
1148 foreach ($founditems as $item) {
1149 if (strlen($item[
"type"])) {
1156 if (count($founditems) && $complete == 0) {
1165 $_SESSION[
"tst_import_results_file"] = $results_file;
1166 $_SESSION[
"tst_import_xml_file"] = $xml_file;
1167 $_SESSION[
"tst_import_qti_file"] = $qti_file;
1168 $_SESSION[
"tst_import_subdir"] = $subdir;
1176 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.tst_import_verification.html",
"Modules/Test");
1177 $row_class =
array(
"tblrow1",
"tblrow2");
1179 foreach ($founditems as $item) {
1180 $this->tpl->setCurrentBlock(
"verification_row");
1181 $this->tpl->setVariable(
"ROW_CLASS", $row_class[
$counter++ % 2]);
1182 $this->tpl->setVariable(
"QUESTION_TITLE", $item[
"title"]);
1183 $this->tpl->setVariable(
"QUESTION_IDENT", $item[
"ident"]);
1184 include_once
"./Services/QTI/classes/class.ilQTIItem.php";
1185 switch ($item[
"type"]) {
1188 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMultipleChoice"));
1192 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assSingleChoice"));
1196 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assKprimChoice"));
1200 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assLongMenu"));
1204 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assNumeric"));
1208 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFormulaQuestion"));
1212 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextSubset"));
1216 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assClozeTest"));
1220 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assErrorText"));
1224 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assImagemapQuestion"));
1228 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assJavaApplet"));
1232 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFlashApplet"));
1236 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMatchingQuestion"));
1240 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingQuestion"));
1244 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingHorizontal"));
1248 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextQuestion"));
1252 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFileUpload"));
1255 $this->tpl->parseCurrentBlock();
1262 $this->tpl->setCurrentBlock(
"adm_content");
1263 $this->tpl->setVariable(
"TEXT_TYPE", $this->lng->txt(
"question_type"));
1264 $this->tpl->setVariable(
"TEXT_TITLE", $this->lng->txt(
"question_title"));
1265 $this->tpl->setVariable(
"FOUND_QUESTIONS_INTRODUCTION", $this->lng->txt(
"tst_import_verify_found_questions"));
1266 $this->tpl->setVariable(
"VERIFICATION_HEADING", $this->lng->txt(
"import_tst"));
1267 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1269 $this->tpl->setVariable(
"QUESTIONPOOL_ID", $QplOrTstID);
1270 $this->tpl->setVariable(
"VALUE_IMPORT", $this->lng->txt(
"import"));
1271 $this->tpl->setVariable(
"VALUE_CANCEL", $this->lng->txt(
"cancel"));
1272 $this->tpl->parseCurrentBlock();
1280 include_once
"./Modules/Test/classes/class.ilObjTest.php";
1284 $newObj->setType(
$_GET[
"new_type"]);
1286 $newObj->setTitle(
"dummy");
1288 $newObj->setDescription(
"test import");
1290 $newObj->create(
true);
1292 $newObj->createReference();
1294 $newObj->putInTree(
$_GET[
"ref_id"]);
1296 $newObj->setPermissions(
$_GET[
"ref_id"]);
1298 $newObj->mark_schema->flush();
1301 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
1305 if (!isset(
$_POST[
"qpl"]) ||
"-1" === (
string)
$_POST[
"qpl"]) {
1306 $questionParentObjId = $newObj->getId();
1308 $questionParentObjId = $_POST[
"qpl"];
1311 if (is_file(
$_SESSION[
"tst_import_dir"] .
'/' .
$_SESSION[
"tst_import_subdir"] .
"/manifest.xml")) {
1312 $newObj->saveToDb();
1314 $_SESSION[
'tst_import_idents'] = $_POST[
'ident'];
1315 $_SESSION[
'tst_import_qst_parent'] = $questionParentObjId;
1317 $fileName = $_SESSION[
'tst_import_subdir'] .
'.zip';
1318 $fullPath = $_SESSION[
'tst_import_dir'] .
'/' . $fileName;
1320 include_once(
"./Services/Export/classes/class.ilImport.php");
1322 $map = $imp->getMapping();
1323 $map->addMapping(
'Modules/Test',
'tst',
'new_id', $newObj->getId());
1324 $imp->importObject($newObj, $fullPath, $fileName,
'tst',
'Modules/Test',
true);
1327 if (!isset($_POST[
"ident"]) || !is_array($_POST[
"ident"]) || !count($_POST[
"ident"])) {
1328 $qtiParser->setIgnoreItemsEnabled(
true);
1330 $qtiParser->setTestObject($newObj);
1331 $result = $qtiParser->startParsing();
1332 $newObj->saveToDb();
1335 include_once(
"./Modules/LearningModule/classes/class.ilContObjParser.php");
1336 $contParser =
new ilContObjParser($newObj, $_SESSION[
"tst_import_xml_file"], $_SESSION[
"tst_import_subdir"]);
1337 $contParser->setQuestionMapping($qtiParser->getImportMapping());
1338 $contParser->startParsing();
1340 if (isset($_POST[
"ident"]) && is_array($_POST[
"ident"]) && count($_POST[
"ident"]) == $qtiParser->getNumImportedItems()) {
1342 if (@file_exists($_SESSION[
"tst_import_results_file"])) {
1343 include_once(
"./Modules/Test/classes/class.ilTestResultsImportParser.php");
1345 $results->setQuestionIdMapping($qtiParser->getQuestionIdMapping());
1357 ilUtil::redirect(
"ilias.php?ref_id=" . $newObj->getRefId() .
"&baseClass=ilObjTestGUI");
1377 include_once(
"./Modules/File/classes/class.ilObjFile.php");
1379 $fileObj->sendFile();
1388 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
1390 $page_gui->showMediaFullscreen();
1398 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php");
1400 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
1413 $this->questionBrowser();
1425 $this->questionBrowser();
1437 $this->ctrl->redirect($this,
"questions");
1451 $parent_ref = $tree->getParentId($this->
object->getRefId());
1452 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
1454 $qpl->setType(
"qpl");
1455 $qpl->setTitle(
$name);
1458 $qpl->createReference();
1459 $qpl->putInTree($parent_ref);
1460 $qpl->setPermissions($parent_ref);
1463 return $qpl->getRefId();
1473 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_random_select.html",
"Modules/Test");
1474 $questionpools =&$this->
object->getAvailableQuestionpools(
false,
false,
false,
true);
1475 $this->tpl->setCurrentBlock(
"option");
1476 $this->tpl->setVariable(
"VALUE_OPTION",
"0");
1477 $this->tpl->setVariable(
"TEXT_OPTION", $this->lng->txt(
"all_available_question_pools"));
1478 $this->tpl->parseCurrentBlock();
1479 foreach ($questionpools as
$key => $value) {
1480 $this->tpl->setCurrentBlock(
"option");
1481 $this->tpl->setVariable(
"VALUE_OPTION",
$key);
1482 $this->tpl->setVariable(
"TEXT_OPTION", $value[
"title"]);
1483 $this->tpl->parseCurrentBlock();
1485 $this->tpl->setCurrentBlock(
"hidden");
1486 $this->tpl->setVariable(
"HIDDEN_NAME",
"sel_question_types");
1487 $this->tpl->setVariable(
"HIDDEN_VALUE",
$_POST[
"sel_question_types"]);
1488 $this->tpl->parseCurrentBlock();
1489 $this->tpl->setCurrentBlock(
"adm_content");
1490 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
1491 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_random_select_questionpool"));
1492 $this->tpl->setVariable(
"TXT_NR_OF_QUESTIONS", $this->lng->txt(
"tst_random_nr_of_questions"));
1493 $this->tpl->setVariable(
"BTN_SUBMIT", $this->lng->txt(
"submit"));
1494 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1495 $this->tpl->parseCurrentBlock();
1507 $this->ctrl->redirect($this,
"questions");
1520 $question_array = $this->
object->randomSelectQuestions(
$_POST[
"nr_of_questions"],
$_POST[
"sel_qpl"]);
1521 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_random_question_offer.html",
"Modules/Test");
1522 $color_class =
array(
"tblrow1",
"tblrow2");
1524 $questionpools =&$this->
object->getAvailableQuestionpools(
true);
1525 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
1526 foreach ($question_array as $question_id) {
1527 $dataset = $this->
object->getQuestionDataset($question_id);
1528 $this->tpl->setCurrentBlock(
"QTab");
1529 $this->tpl->setVariable(
"COLOR_CLASS", $color_class[
$counter % 2]);
1530 $this->tpl->setVariable(
"QUESTION_TITLE",
$dataset->title);
1531 $this->tpl->setVariable(
"QUESTION_COMMENT",
$dataset->description);
1533 $this->tpl->setVariable(
"QUESTION_AUTHOR",
$dataset->author);
1534 $this->tpl->setVariable(
"QUESTION_POOL", $questionpools[
$dataset->obj_fi][
"title"]);
1535 $this->tpl->parseCurrentBlock();
1538 if (count($question_array) == 0) {
1539 $this->tpl->setCurrentBlock(
"Emptytable");
1540 $this->tpl->setVariable(
"TEXT_NO_QUESTIONS_AVAILABLE", $this->lng->txt(
"no_questions_available"));
1541 $this->tpl->parseCurrentBlock();
1543 $this->tpl->setCurrentBlock(
"Selectionbuttons");
1544 $this->tpl->setVariable(
"BTN_YES", $this->lng->txt(
"random_accept_sample"));
1545 $this->tpl->setVariable(
"BTN_NO", $this->lng->txt(
"random_another_sample"));
1546 $this->tpl->parseCurrentBlock();
1548 $chosen_questions = join($question_array,
",");
1549 $this->tpl->setCurrentBlock(
"adm_content");
1550 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
1551 $this->tpl->setVariable(
"QUESTION_TITLE", $this->lng->txt(
"tst_question_title"));
1552 $this->tpl->setVariable(
"QUESTION_COMMENT", $this->lng->txt(
"description"));
1553 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"tst_question_type"));
1554 $this->tpl->setVariable(
"QUESTION_AUTHOR", $this->lng->txt(
"author"));
1555 $this->tpl->setVariable(
"QUESTION_POOL", $this->lng->txt(
"qpl"));
1556 $this->tpl->setVariable(
"VALUE_CHOSEN_QUESTIONS", $chosen_questions);
1557 $this->tpl->setVariable(
"VALUE_QUESTIONPOOL_SELECTION",
$_POST[
"sel_qpl"]);
1558 $this->tpl->setVariable(
"VALUE_NR_OF_QUESTIONS",
$_POST[
"nr_of_questions"]);
1559 $this->tpl->setVariable(
"TEXT_QUESTION_OFFER", $this->lng->txt(
"tst_question_offer"));
1560 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1561 $this->tpl->parseCurrentBlock();
1573 $selected_array = explode(
",",
$_POST[
"chosen_questions"]);
1574 if (!count($selected_array)) {
1577 $total = $this->
object->evalTotalPersons();
1584 foreach ($selected_array as
$key => $value) {
1585 $this->
object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value);
1587 $this->
object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
1589 $this->ctrl->redirect($this,
"questions");
1596 $this->questionBrowser();
1608 $qpl_ref_id = $_REQUEST[
"sel_qpl"];
1610 $qpl_mode = $_REQUEST[
'usage'];
1612 if (isset($_REQUEST[
'qtype'])) {
1613 include_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
1615 } elseif (isset($_REQUEST[
'sel_question_types'])) {
1616 $sel_question_types = $_REQUEST[
"sel_question_types"];
1619 if (!$qpl_mode || ($qpl_mode == 2 && strcmp($_REQUEST[
"txt_qpl"],
"") == 0) || ($qpl_mode == 3 && strcmp($qpl_ref_id,
"") == 0)) {
1622 $_REQUEST[
'sel_question_types'] = $sel_question_types;
1627 $_SESSION[
"test_id"] = $this->
object->getRefId();
1628 if ($qpl_mode == 2 && strcmp($_REQUEST[
"txt_qpl"],
"") != 0) {
1631 } elseif ($qpl_mode == 1) {
1632 $qpl_ref_id =
$_GET[
"ref_id"];
1635 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php";
1636 $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;
1638 if (isset($_REQUEST[
'prev_qid'])) {
1639 $baselink .=
'&prev_qid=' . $_REQUEST[
'prev_qid'];
1640 } elseif (isset($_REQUEST[
'position'])) {
1641 $baselink .=
'&prev_qid=' . $_REQUEST[
'position'];
1644 if ($_REQUEST[
'test_express_mode']) {
1645 $baselink .=
'&test_express_mode=1';
1648 if (isset($_REQUEST[
'add_quest_cont_edit_mode'])) {
1651 "add_quest_cont_edit_mode={$_REQUEST['add_quest_cont_edit_mode']}",
1656 #var_dump($_REQUEST['prev_qid']); 1672 $this->ctrl->redirect($this,
"questions");
1687 $questionpools =&$this->
object->getAvailableQuestionpools(
false,
false,
false,
true,
false,
"write");
1689 if ($this->
object->getPoolUsage()) {
1692 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
1695 $form->setFormAction($ilCtrl->getFormAction($this,
"executeCreateQuestion"));
1696 $form->setTitle($lng->txt(
"ass_create_question"));
1697 include_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
1701 $hidden->setValue($_REQUEST[
"sel_question_types"]);
1702 $form->addItem($hidden);
1706 $ri =
new ilRadioGroupInputGUI($lng->txt(
"tst_add_quest_cont_edit_mode"),
"add_quest_cont_edit_mode");
1709 $lng->txt(
'tst_add_quest_cont_edit_mode_default'),
1714 $lng->txt(
'tst_add_quest_cont_edit_mode_page_object'),
1720 $form->addItem($ri,
true);
1724 $form->addItem($hi,
true);
1730 $no_pool =
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
1731 $usage->addOption($no_pool);
1732 $existing_pool =
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
1733 $usage->addOption($existing_pool);
1734 $new_pool =
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
1735 $usage->addOption($new_pool);
1736 $form->addItem($usage);
1738 $usage->setValue(1);
1741 $pools_data =
array();
1742 foreach ($questionpools as
$key => $p) {
1743 $pools_data[
$key] = $p[
'title'];
1745 $pools =
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"),
"sel_qpl");
1747 $existing_pool->addSubItem($pools);
1750 $this->lng->loadLanguageModule(
'rbac');
1753 $name->setMaxLength(50);
1754 $new_pool->addSubItem(
$name);
1756 $form->addCommandButton(
"executeCreateQuestion", $lng->txt(
"submit"));
1757 $form->addCommandButton(
"cancelCreateQuestion", $lng->txt(
"cancel"));
1759 return $this->tpl->setVariable(
'ADM_CONTENT',
$form->getHTML());
1763 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'sel_question_types', $_REQUEST[
"sel_question_types"]);
1764 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'add_quest_cont_edit_mode', $_REQUEST[
"add_quest_cont_edit_mode"]);
1765 $link = $ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'handleToolbarCommand',
'',
false,
false);
1777 $questions = $this->
object->getQuestionTitlesAndIndexes();
1779 $this->
object->removeQuestions($removeQuestionIds);
1781 $this->
object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
1785 if ($_REQUEST[
'test_express_mode']) {
1788 $deleted_tmp = $removeQuestionIds;
1789 $first = array_shift($deleted_tmp);
1790 foreach ((
array) $questions as
$key => $value) {
1791 if (!in_array(
$key, $removeQuestionIds)) {
1799 } elseif (
$key == $first) {
1804 $first = array_shift($deleted_tmp);
1809 count($questions) == count($removeQuestionIds) ||
1812 $this->ctrl->setParameter($this,
'q_id',
'');
1813 $this->ctrl->redirect($this,
'showPage');
1816 $this->ctrl->setParameter($this,
'q_id', $return_to);
1817 $this->ctrl->redirect($this,
"showPage");
1819 $this->ctrl->setParameter($this,
'q_id',
'');
1820 $this->ctrl->redirect($this,
'questions');
1833 if ($_REQUEST[
'test_express_mode']) {
1834 $this->ctrl->setParameter($this,
'q_id', $_REQUEST[
'q_id']);
1835 $this->ctrl->redirect($this,
"showPage");
1837 $this->ctrl->redirect($this,
"questions");
1850 $total = $this->
object->evalTotalPersons();
1853 $question = sprintf($this->lng->txt(
"tst_remove_questions_and_results"),
$total);
1855 if (count($checked_questions) == 1) {
1856 $question = $this->lng->txt(
"tst_remove_question");
1858 $question = $this->lng->txt(
"tst_remove_questions");
1862 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1864 $cgui->setHeaderText($question);
1866 $this->ctrl->saveParameter($this,
'test_express_mode');
1867 $this->ctrl->saveParameter($this,
'q_id');
1869 $cgui->setFormAction($this->ctrl->getFormAction($this));
1870 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelRemoveQuestions");
1871 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmRemoveQuestions");
1873 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
1874 $removablequestions =&$this->
object->getTestQuestions();
1875 if (count($removablequestions)) {
1876 foreach ($removablequestions as
$data) {
1877 if (in_array($data[
"question_id"], $checked_questions)) {
1879 $txt .=
' [' . $this->lng->txt(
'question_id_short') .
': ' . $data[
'question_id'] .
']';
1881 if ($data[
"description"]) {
1882 $txt .=
"<div class=\"small\">" . $data[
"description"] .
"</div>";
1885 $cgui->addItem(
"q_id[]", $data[
"question_id"],
$txt);
1890 $this->tpl->setContent($cgui->getHTML());
1899 $checked_questions = $_REQUEST[
"q_id"];
1901 if (!is_array($checked_questions) && $checked_questions) {
1902 $checked_questions =
array($checked_questions);
1905 if (!is_array($checked_questions)) {
1906 $checked_questions = [];
1909 if (count($checked_questions) > 0) {
1911 } elseif (0 === count($checked_questions)) {
1913 $this->ctrl->redirect($this,
"questions");
1922 $selected_questions = null;
1923 $selected_questions =
$_POST[
'q_id'];
1924 if (is_array($selected_questions)) {
1925 $_SESSION[
'tst_qst_move_' . $this->
object->getTestId()] =
$_POST[
'q_id'];
1930 $this->ctrl->redirect($this,
'questions');
1939 $move_questions =
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
1941 if (!is_array(
$_POST[
'q_id']) || 0 === count(
$_POST[
'q_id'])) {
1943 $this->ctrl->redirect($this,
'questions');
1945 if (count(
$_POST[
'q_id']) > 1) {
1947 $this->ctrl->redirect($this,
'questions');
1950 $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()],
$_POST[
'q_id'][0], $insert_mode);
1953 $this->ctrl->redirect($this,
"questions");
1962 $move_questions =
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
1963 if (!is_array(
$_POST[
'q_id']) || 0 === count(
$_POST[
'q_id'])) {
1965 $this->ctrl->redirect($this,
'questions');
1967 if (count(
$_POST[
'q_id']) > 1) {
1969 $this->ctrl->redirect($this,
'questions');
1972 $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()],
$_POST[
'q_id'][0], $insert_mode);
1975 $this->ctrl->redirect($this,
"questions");
1986 if (!count($selected_array)) {
1988 $this->ctrl->redirect($this,
"browseForQuestions");
1990 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
1991 $manscoring =
false;
1992 foreach ($selected_array as
$key => $value) {
1993 $this->
object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value);
1998 $this->
object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
2004 $this->ctrl->redirect($this,
"questions");
2013 $ilHelp = $DIC[
'ilHelp'];
2015 $subScreenId =
array(
'createQuestion');
2017 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
2019 $ilCtrl->setParameter($this,
'qtype', $_REQUEST[
'qtype']);
2023 $form->setFormAction($ilCtrl->getFormAction($this,
"executeCreateQuestion"));
2024 $form->setTitle($lng->txt(
"ass_create_question"));
2025 include_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
2028 $questionTypes = $pool->getQuestionTypes(
false,
true);
2032 foreach ($questionTypes as $label =>
$data) {
2036 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
2042 $questions = $this->
object->getQuestionTitlesAndIndexes();
2047 $options[
$key] = $lng->txt(
'behind') .
' ' .
$title .
' [' . $this->lng->txt(
'question_id_short') .
': ' .
$key .
']';
2049 $si->setOptions($options);
2050 $si->setValue($_REQUEST[
'q_id']);
2056 $subScreenId[] =
'editMode';
2058 $ri =
new ilRadioGroupInputGUI($lng->txt(
"tst_add_quest_cont_edit_mode"),
"add_quest_cont_edit_mode");
2061 $lng->txt(
'tst_add_quest_cont_edit_mode_default'),
2066 $lng->txt(
'tst_add_quest_cont_edit_mode_page_object'),
2072 $form->addItem($ri,
true);
2076 $form->addItem($hi,
true);
2079 if ($this->
object->getPoolUsage()) {
2080 $subScreenId[] =
'poolSelect';
2085 $no_pool =
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
2086 $usage->addOption($no_pool);
2087 $existing_pool =
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
2088 $usage->addOption($existing_pool);
2089 $new_pool =
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
2090 $usage->addOption($new_pool);
2091 $form->addItem($usage);
2093 $usage->setValue(1);
2096 $pools_data =
array();
2097 foreach ($questionpools as
$key => $p) {
2098 $pools_data[
$key] = $p[
'title'];
2100 $pools =
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"),
"sel_qpl");
2102 $existing_pool->addSubItem($pools);
2106 $name->setMaxLength(50);
2107 $new_pool->addSubItem(
$name);
2110 $form->addCommandButton(
"executeCreateQuestion", $lng->txt(
"create"));
2111 $form->addCommandButton(
"questions", $lng->txt(
"cancel"));
2113 $ilHelp->setScreenId(
'assQuestions');
2114 $ilHelp->setSubScreenId(implode(
'_', $subScreenId));
2116 return $tpl->setContent(
$form->getHTML());
2121 global $ilAccess, $ilTabs;
2123 $ilTabs->activateTab(
'assQuestions');
2126 $this->ctrl->setParameter($this,
'test_express_mode',
'');
2128 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
2131 $this->ctrl->redirect($this,
"infoScreen");
2134 if (
$_GET[
'browse']) {
2135 return $this->questionbrowser();
2141 $this->ctrl->setParameter($this,
'q_id',
'');
2144 ilUtil::redirect(
"ilias.php?baseClass=ilObjQuestionPoolGUI&ref_id=" .
$_GET[
"eqpl"] .
"&cmd=editQuestionForTest&calling_test=" .
$_GET[
"ref_id"] .
"&q_id=" .
$_GET[
"eqid"]);
2147 if (
$_GET[
"up"] > 0) {
2148 $this->
object->questionMoveUp(
$_GET[
"up"]);
2150 if (
$_GET[
"down"] > 0) {
2151 $this->
object->questionMoveDown(
$_GET[
"down"]);
2155 $selected_array =
array();
2156 array_push($selected_array,
$_GET[
"add"]);
2157 $total = $this->
object->evalTotalPersons();
2164 $this->insertQuestions($selected_array);
2168 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_questions.html",
"Modules/Test");
2170 $total = $this->
object->evalTotalPersons();
2171 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
2173 $link = $this->ctrl->getLinkTarget($this,
"participants");
2174 $link =
"<a href=\"" . $link .
"\">" . $this->lng->txt(
"test_has_datasets_warning_page_view_link") .
"</a>";
2175 ilUtil::sendInfo($this->lng->txt(
"test_has_datasets_warning_page_view") .
" " . $link);
2179 $ilToolbar->addButton($this->lng->txt(
"ass_create_question"), $this->ctrl->getLinkTarget($this,
"addQuestion"));
2181 if ($this->
object->getPoolUsage()) {
2182 $ilToolbar->addSeparator();
2184 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
2189 $ilToolbar->addSeparator();
2190 $ilToolbar->addButton($this->lng->txt(
"random_selection"), $this->ctrl->getLinkTarget($this,
"randomselect"));
2194 $online_access =
false;
2195 if ($this->
object->getFixedParticipants()) {
2196 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
2198 if ($online_access_result ===
true) {
2199 $online_access =
true;
2203 if ($this->
object->isOnline() && $this->
object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
2204 if ((!$this->
object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id)) {
2205 $testSession = $this->testSessionFactory->getSession();
2206 $testSequence = $this->testSequenceFactory->getSequenceByTestSession($testSession);
2208 $testPlayerGUI = $this->testPlayerFactory->getPlayerGUI();
2210 $executable = $this->
object->isExecutable($testSession, $ilUser->getId(), $allowPassIncrease =
true);
2212 if ($executable[
"executable"]) {
2213 if ($testSession->getActiveId() > 0) {
2216 if ($testSequence->hasStarted($testSession)) {
2217 $execTestLabel = $this->lng->txt(
"tst_resume_test");
2218 $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI,
'resumePlayer');
2220 $execTestLabel = $this->
object->getStartTestLabel($testSession->getActiveId());
2221 $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI,
'startPlayer');
2226 $execTestLabel = $this->
object->getStartTestLabel($testSession->getActiveId());
2227 $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI,
'startPlayer');
2230 $ilToolbar->addSeparator();
2231 $ilToolbar->addButton($execTestLabel, $execTestLink);
2238 $this->tpl->setCurrentBlock(
"adm_content");
2239 include_once
"./Modules/Test/classes/tables/class.ilTestQuestionsTableGUI.php";
2240 $checked_move = is_array(
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()]) && (count(
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()]));
2241 $table_gui =
new ilTestQuestionsTableGUI($this,
'questions', (($ilAccess->checkAccess(
"write",
"", $this->ref_id) ? true :
false)), $checked_move,
$total);
2242 $data = $this->
object->getTestQuestions();
2243 $table_gui->setData($data);
2244 $this->tpl->setVariable(
'QUESTIONBROWSER', $table_gui->getHTML());
2245 $this->tpl->setVariable(
"ACTION_QUESTION_FORM", $this->ctrl->getFormAction($this));
2246 $this->tpl->parseCurrentBlock();
2255 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
2283 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
2286 $participantData->load($this->
object->getTestId());
2288 $this->
object->removeTestResults($participantData);
2291 $this->ctrl->redirect($this,
"participants");
2305 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
2308 if ($this->
object->getFixedParticipants()) {
2309 $participantData->setUserIds(
$_POST[
"chbUser"]);
2311 $participantData->setActiveIds(
$_POST[
"chbUser"]);
2314 $participantData->load($this->
object->getTestId());
2316 $this->
object->removeTestResults($participantData);
2319 $this->ctrl->redirect($this,
"participants");
2331 $this->ctrl->redirect($this,
"participants");
2346 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_maintenance.html",
"Modules/Test");
2348 $this->tpl->setCurrentBlock(
"confirm_delete");
2349 $this->tpl->setVariable(
"BTN_CONFIRM_DELETE_ALL", $this->lng->txt(
"confirm"));
2350 $this->tpl->setVariable(
"BTN_CANCEL_DELETE_ALL", $this->lng->txt(
"cancel"));
2351 $this->tpl->parseCurrentBlock();
2353 $this->tpl->setCurrentBlock(
"adm_content");
2354 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
2355 $this->tpl->parseCurrentBlock();
2364 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2366 $cgui->setFormAction($this->ctrl->getFormAction($this,
"participants"));
2367 $cgui->setHeaderText($this->lng->txt(
"delete_all_user_data_confirmation"));
2368 $cgui->setCancel($this->lng->txt(
"cancel"),
"participants");
2369 $cgui->setConfirm($this->lng->txt(
"proceed"),
"confirmDeleteAllUserResults");
2371 $this->tpl->setContent($cgui->getHTML());
2383 if (count(
$_POST[
"chbUser"]) == 0) {
2385 $this->ctrl->redirect($this,
"participants");
2388 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2390 $cgui->setHeaderText($this->lng->txt(
"confirm_delete_single_user_data"));
2392 $cgui->setFormAction($this->ctrl->getFormAction($this));
2393 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteSelectedUserData");
2394 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmDeleteSelectedUserData");
2396 include_once
'./Services/User/classes/class.ilObjUser.php';
2397 foreach (
$_POST[
"chbUser"] as
$key => $active_id) {
2398 if ($this->
object->getFixedParticipants()) {
2399 $user_id = $active_id;
2401 $user_id = $this->
object->_getUserIdFromActiveId($active_id);
2405 if ($this->
object->getAnonymity()) {
2406 $name = $this->lng->txt(
"anonymous");
2407 } elseif (
$user[
"lastname"]) {
2409 $user[
"login"] .
")";
2411 $name = $this->lng->txt(
"deleted_user");
2419 $this->lng->txt(
"usr")
2423 $this->tpl->setContent($cgui->getHTML());
2435 include_once
"./Modules/Test/classes/tables/class.ilTestHistoryTableGUI.php";
2437 $table_gui->setTestObject($this->
object);
2438 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
2440 $table_gui->setData(
$log);
2441 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2446 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2448 $form->setTarget(
"_top");
2450 $this->ctrl->setParameter($this,
"new_type", $new_type);
2451 $form->setFormAction($this->ctrl->getFormAction($this));
2452 $form->setTitle($this->lng->txt(
"import_tst"));
2455 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
2456 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"xmldoc");
2458 $fi->setRequired(
true);
2459 $form->addItem($fi);
2462 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
2464 $questionpools = $tst->getAvailableQuestionpools(
true,
false,
true,
true);
2465 if (count($questionpools)) {
2466 $options =
array(
"-1" => $this->lng->txt(
"dont_use_questionpool"));
2467 foreach ($questionpools as
$key => $value) {
2471 $pool =
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"),
"qpl");
2472 $pool->
setInfo($this->lng->txt(
'select_question_pool_info'));
2474 $form->addItem($pool);
2477 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
2478 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
2490 $command =
$_POST[
"command"];
2491 if (strlen($command)) {
2492 $method = $command .
"Object";
2493 if (method_exists($this, $method)) {
2498 $this->ctrl->redirect($this,
"participants");
2508 global $ilAccess, $ilToolbar,
$lng;
2512 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
2515 $this->ctrl->redirect($this,
"infoScreen");
2518 if ($this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken()) {
2520 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->getDepenciesBrokenMessage($this->lng)
2522 } elseif ($this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesInVulnerableState()) {
2524 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->getDepenciesInVulnerableStateMessage($this->lng)
2528 if ($this->
object->getFixedParticipants()) {
2530 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
2535 'auto_complete_name' => $lng->txt(
'user'),
2536 'submit_name' => $lng->txt(
'add')
2540 $ilToolbar->addSeparator();
2542 $search_btn->setCaption(
'tst_search_users');
2543 $search_btn->setUrl($this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
2544 $ilToolbar->addButtonInstance($search_btn);
2545 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
2547 $participants =&$this->
object->getInvitedUsers();
2549 $unfinished_passes =
false;
2550 foreach ($participants as
$data) {
2551 $maxpass = $this->
object->_getMaxPass($data[
"active_id"]);
2552 if (!is_null($maxpass)) {
2556 if (strlen($data[
"active_id"])) {
2557 $last_access = $this->
object->_getLastAccess($data[
"active_id"]);
2560 $this->ctrl->setParameterByClass(
'iltestevaluationgui',
'active_id', $data[
'active_id']);
2562 if ($data[
'active_id'] == null) {
2563 if (strlen($data[
"firstname"] . $data[
"lastname"]) == 0) {
2564 $fullname = $lng->txt(
"deleted_user");
2565 } elseif ($this->
object->getAnonymity()) {
2566 $fullname = $lng->txt(
'anonymous');
2568 $fullname = trim($data[
"lastname"] .
", " . $data[
"firstname"] .
" " . $data[
"title"]);
2571 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
2575 $unfinished_pass_data = 0;
2576 if ($data[
"unfinished_passes"] == 1) {
2577 $unfinished_pass_data = 1;
2578 $unfinished_passes =
true;
2582 'usr_id' => $data[
"usr_id"],
2583 'active_id' => $data[
'active_id'],
2584 'login' => $data[
"login"],
2585 'clientip' => $data[
"clientip"],
2586 'firstname' => $data[
"firstname"],
2587 'lastname' => $data[
"lastname"],
2588 'name' => $fullname,
2589 'started' => ($data[
"active_id"] > 0) ? 1 : 0,
2590 'unfinished' => $unfinished_pass_data,
2591 'finished' => ($data[
"test_finished"] == 1) ? 1 : 0,
2593 'maxpass' => $maxpass,
2594 'result' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'outParticipantsResultsOverview'),
2595 'finish_link' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'finishTestPassForSingleUser')
2598 include_once
"./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php";
2602 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken(),
2603 $this->
object->getAnonymity(),
2607 $table_gui->setResetCommand(
'fpResetFiler');
2609 $table_gui->setData(
$rows);
2610 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2612 if (count(
$rows) > 0) {
2613 $ilToolbar->addSeparator();
2615 $delete_all_results_btn->setCaption(
'delete_all_user_data');
2616 $delete_all_results_btn->setUrl($this->ctrl->getLinkTarget($this,
'deleteAllUserResults'));
2617 $ilToolbar->addButtonInstance($delete_all_results_btn);
2621 $participants =&$this->
object->getTestParticipants();
2623 $unfinished_passes =
false;
2625 foreach ($participants as
$data) {
2626 $maxpass = $this->
object->_getMaxPass($data[
"active_id"]);
2627 if (!is_null($maxpass)) {
2631 if (strlen($data[
"active_id"])) {
2632 $last_access = $this->
object->_getLastAccess($data[
"active_id"]);
2635 $this->ctrl->setParameterByClass(
'iltestevaluationgui',
'active_id', $data[
'active_id']);
2637 $unfinished_pass_data = 0;
2638 if ($data[
"unfinished_passes"] == 1) {
2639 $unfinished_pass_data = 1;
2640 $unfinished_passes =
true;
2643 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
2646 'usr_id' => $data[
"active_id"],
2647 'active_id' => $data[
'active_id'],
2648 'login' => $data[
"login"],
2649 'name' => $fullname,
2650 'firstname' => $data[
"firstname"],
2651 'lastname' => $data[
"lastname"],
2652 'started' => ($data[
"active_id"] > 0) ? 1 : 0,
2653 'unfinished' => $unfinished_pass_data,
2654 'finished' => ($data[
"test_finished"] == 1) ? 1 : 0,
2656 'maxpass' => $maxpass,
2657 'result' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'outParticipantsResultsOverview'),
2658 'finish_link' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'finishTestPassForSingleUser')
2661 include_once
"./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php";
2665 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken(),
2666 $this->
object->getAnonymity(),
2670 if (count(
$rows) > 0) {
2671 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
2673 $delete_all_results_btn->setCaption(
'delete_all_user_data');
2674 $delete_all_results_btn->setUrl($this->ctrl->getLinkTarget($this,
'deleteAllUserResults'));
2675 $ilToolbar->addStickyItem($delete_all_results_btn);
2680 $table_gui->setFilterCommand(
'npSetFilter');
2681 $table_gui->setResetCommand(
'npResetFilter');
2683 $table_gui->setData(
$rows);
2684 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2694 if ($unfinished_passes) {
2695 $ilToolbar->addSeparator();
2697 $finish_all_user_passes_btn->setCaption(
'finish_all_user_passes');
2698 $finish_all_user_passes_btn->setUrl($this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'finishAllUserPasses'));
2699 $ilToolbar->addButtonInstance($finish_all_user_passes_btn);
2707 include_once
"./Modules/Test/classes/tables/class.ilTimingOverviewTableGUI.php";
2710 $participants =&$this->
object->getTestParticipants();#
2711 $times = $this->
object->getStartingTimeOfParticipants();
2712 $addons = $this->
object->getTimeExtensionsOfParticipants();
2714 $tbl_data =
array();
2715 foreach ($participants as $participant) {
2719 if ($times[$participant[
'active_id']]) {
2721 $tblRow[
'started'] = $started;
2723 $tblRow[
'started'] =
'';
2726 if ($addons[$participant[
'active_id']] > 0) {
2727 $tblRow[
'extratime'] = $addons[$participant[
'active_id']];
2730 $tblRow[
'login'] = $participant[
'login'];
2732 if ($this->
object->getAnonymity()) {
2733 $tblRow[
'name'] = $this->lng->txt(
"anonymous");
2735 $tblRow[
'name'] = $participant[
'lastname'] .
', ' . $participant[
'firstname'];
2738 $tbl_data[] = $tblRow;
2740 $table_gui->setData($tbl_data);
2742 $this->tpl->setContent($table_gui->getHTML());
2751 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
2754 $this->ctrl->redirect($this,
"infoScreen");
2757 if ($this->
object->getProcessingTimeInSeconds() > 0 && $this->
object->getNrOfTries() == 1) {
2760 $res = $this->
object->addExtraTime(
$form->getInput(
'participant'),
$form->getInput(
'extratime'));
2762 $this->ctrl->redirect($this,
'timingOverview');
2764 return $this->tpl->setVariable(
"ADM_CONTENT",
$form->getHTML());
2775 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2777 $form->setFormAction($this->ctrl->getFormAction($this));
2778 $form->setTableWidth(
"100%");
2779 $form->setId(
"tst_change_workingtime");
2780 $form->setTitle($this->lng->txt(
"tst_change_workingtime"));
2783 $participantslist =
new ilSelectInputGUI($this->lng->txt(
'participants'),
"participant");
2784 $participants =&$this->
object->getTestParticipants();
2785 $times = $this->
object->getStartingTimeOfParticipants();
2786 $addons = $this->
object->getTimeExtensionsOfParticipants();
2788 '' => $this->lng->txt(
'please_select'),
2789 '0' => $this->lng->txt(
'all_participants')
2791 foreach ($participants as $participant) {
2794 if ($this->
object->getAnonymity()) {
2795 $name = $this->lng->txt(
"anonymous");
2797 $name = $participant[
'lastname'] .
', ' . $participant[
'firstname'];
2801 if ($times[$participant[
'active_id']]) {
2804 if ($addons[$participant[
'active_id']] > 0) {
2805 $started .=
", " . $this->lng->txt(
'extratime') .
': ' . $addons[$participant[
'active_id']] .
' ' . $this->lng->txt(
'minutes');
2807 $options[$participant[
'active_id']] = $participant[
'login'] .
' (' .
$name .
')' . $started;
2809 $participantslist->setRequired(
true);
2810 $participantslist->setOptions(
$options);
2811 $form->addItem($participantslist);
2814 $extratime =
new ilNumberInputGUI($this->lng->txt(
"extratime"),
"extratime");
2815 $extratime->
setInfo($this->lng->txt(
'tst_extratime_info'));
2816 $extratime->setRequired(
true);
2817 $extratime->setMinValue(0);
2818 $extratime->setMinvalueShouldBeGreater(
false);
2819 $extratime->setSuffix($this->lng->txt(
'minutes'));
2820 $extratime->setSize(5);
2821 $form->addItem($extratime);
2823 if (is_array(
$_POST) && strlen(
$_POST[
'cmd'][
'timing'])) {
2827 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
2828 $form->addCommandButton(
"timing", $this->lng->txt(
"save"));
2830 $form->addCommandButton(
'timingOverview', $this->lng->txt(
"cancel"));
2837 $this->tpl->setContent(
$form->getHTML());
2844 $sess_filter = str_replace(
'"',
'', $sess_filter);
2845 $sess_filter = explode(
':', $sess_filter);
2846 $filter = substr($sess_filter[2], 0, strlen($sess_filter[2])-1);
2848 if ($filter ==
'all' || $filter ==
false) {
2849 return $in_rows; #unchanged - no filter.
2852 $with_result =
array();
2853 $without_result =
array();
2854 foreach ($in_rows as
$row) {
2856 'SELECT count(solution_id) count 2858 WHERE active_fi = ' . $ilDB->quote($row[
'active_id'])
2860 $count = $ilDB->fetchAssoc(
$result);
2861 $count = $count[
'count'];
2864 $without_result[] =
$row;
2866 $with_result[] =
$row;
2870 if ($filter ==
'withSolutions') {
2871 return $with_result;
2873 return $without_result;
2878 include_once(
"./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php");
2881 $table_gui->resetOffset();
2887 include_once(
"./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php");
2892 $this->
object->getAnonymity(),
2896 $table_gui->resetOffset();
2902 include_once(
"./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php");
2907 $this->
object->getAnonymity(),
2911 $table_gui->resetOffset();
2917 include_once(
"./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php");
2922 $this->
object->getAnonymity(),
2926 $table_gui->resetOffset();
2940 $this->
showUserResults($show_pass_details =
true, $show_answers =
true, $show_reached_points =
true);
2953 $this->
showUserResults($show_pass_details =
false, $show_answers =
true);
2966 $this->
showUserResults($show_pass_details =
true, $show_answers =
false);
2974 public function showUserResults($show_pass_details, $show_answers, $show_reached_points =
false)
2976 $show_user_results =
$_SESSION[
"show_user_results"];
2978 if (count($show_user_results) == 0) {
2980 $this->ctrl->redirect($this,
"participants");
2987 $this->tpl->setVariable(
"ADM_CONTENT",
$template->get());
2989 if ($this->
object->getShowSolutionAnswersOnly()) {
2997 if (is_array(
$_POST[
"chbUser"])) {
2998 foreach (
$_POST[
"chbUser"] as $user_id) {
2999 $this->
object->disinviteUser($user_id);
3004 $this->ctrl->redirect($this,
"participants");
3009 if (is_array(
$_POST[
"chbUser"])) {
3010 foreach (
$_POST[
"chbUser"] as $user_id) {
3011 $this->
object->setClientIP($user_id,
$_POST[
"clientip_" . $user_id]);
3016 $this->ctrl->redirect($this,
"participants");
3028 global $ilAccess, $ilias;
3029 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
3032 $this->ctrl->redirect($this,
"infoScreen");
3035 $isPdfDeliveryRequest = isset(
$_GET[
'pdf']) &&
$_GET[
'pdf'];
3038 $template =
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html",
true,
true,
"Modules/Test");
3040 if (!$isPdfDeliveryRequest) {
3041 $this->ctrl->setParameter($this,
"pdf",
"1");
3042 $template->setCurrentBlock(
"pdf_export");
3043 $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this,
"print"));
3044 $this->ctrl->setParameter($this,
"pdf",
"");
3045 $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
3048 $template->setCurrentBlock(
"navigation_buttons");
3049 $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
3054 require_once
'Services/PDFGeneration/classes/class.ilPDFGeneration.php';
3065 require_once
'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
3067 $questionHeaderBlockBuilder->setHeaderMode($this->
object->getTitleOutput());
3069 if ($isPdfDeliveryRequest) {
3070 require_once
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
3074 foreach ($this->
object->questions as $question) {
3076 $question_gui = $this->
object->createQuestionGUI(
"", $question);
3078 if ($isPdfDeliveryRequest) {
3082 $questionHeaderBlockBuilder->setQuestionTitle($question_gui->object->getTitle());
3083 $questionHeaderBlockBuilder->setQuestionPoints($question_gui->object->getMaximumPoints());
3084 $questionHeaderBlockBuilder->setQuestionPosition(
$counter);
3085 $template->setVariable(
"QUESTION_HEADER", $questionHeaderBlockBuilder->getHTML());
3087 $template->setVariable(
"TXT_QUESTION_ID", $this->lng->txt(
'question_id_short'));
3088 $template->setVariable(
"QUESTION_ID", $question_gui->object->getId());
3089 $result_output = $question_gui->getSolutionOutput(
"", null,
false,
true,
false, $this->
object->getShowSolutionFeedback());
3090 $template->setVariable(
"SOLUTION_OUTPUT", $result_output);
3091 $template->parseCurrentBlock(
"question");
3093 $max_points += $question_gui->object->getMaximumPoints();
3103 if ($isPdfDeliveryRequest) {
3104 require_once
'Modules/Test/classes/class.ilTestPDFGenerator.php';
3107 $this->tpl->setVariable(
"PRINT_CONTENT",
$template->get());
3122 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
3125 $this->ctrl->redirect($this,
"infoScreen");
3128 $template =
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html",
true,
true,
"Modules/Test");
3132 $isPdfDeliveryRequest = isset(
$_GET[
'pdf']) &&
$_GET[
'pdf'];
3137 require_once
'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
3139 $questionHeaderBlockBuilder->setHeaderMode($this->
object->getTitleOutput());
3141 if ($isPdfDeliveryRequest) {
3142 require_once
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
3146 require_once
'Services/PDFGeneration/classes/class.ilPDFGeneration.php';
3150 foreach ($this->
object->questions as $question) {
3152 $question_gui = $this->
object->createQuestionGUI(
"", $question);
3155 $questionHeaderBlockBuilder->setQuestionTitle($question_gui->object->getTitle());
3156 $questionHeaderBlockBuilder->setQuestionPoints($question_gui->object->getMaximumPoints());
3157 $questionHeaderBlockBuilder->setQuestionPosition(
$counter);
3158 $template->setVariable(
"QUESTION_HEADER", $questionHeaderBlockBuilder->getHTML());
3160 $template->setVariable(
"SOLUTION_OUTPUT", $question_gui->getPreview(
false));
3161 $template->parseCurrentBlock(
"question");
3163 $max_points += $question_gui->object->getMaximumPoints();
3179 if ($isPdfDeliveryRequest) {
3180 require_once
'Modules/Test/classes/class.ilTestPDFGenerator.php';
3183 $this->ctrl->setParameter($this,
"pdf",
"1");
3184 $template->setCurrentBlock(
"pdf_export");
3185 $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this,
"review"));
3186 $this->ctrl->setParameter($this,
"pdf",
"");
3187 $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
3190 $template->setCurrentBlock(
"navigation_buttons");
3191 $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
3195 $this->tpl->setVariable(
"PRINT_CONTENT",
$template->get());
3203 if (is_array($a_user_ids)) {
3205 foreach ($a_user_ids as $user_id) {
3206 $client_ip =
$_POST[
"client_ip"][
$i];
3207 $this->
object->inviteUser($user_id, $client_ip);
3214 $message = $this->lng->txt(
"tst_invited_selected_users");
3223 $this->ctrl->redirect($this,
"participants");
3229 public function defaultsObject()
3236 global $ilAccess, $ilToolbar,
$tpl;
3238 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
3240 $this->ctrl->redirect($this,
"infoScreen");
3243 $ilToolbar->setFormAction($this->ctrl->getFormAction($this,
'addDefaults'));
3244 $ilToolbar->addFormButton($this->lng->txt(
'add'),
'addDefaults');
3245 require_once
'Services/Form/classes/class.ilTextInputGUI.php';
3246 $ilToolbar->addInputItem(
new ilTextInputGUI($this->lng->txt(
'tst_defaults_defaults_of_test'),
'name'),
true);
3248 require_once
'Modules/Test/classes/tables/class.ilTestPersonalDefaultSettingsTableGUI.php';
3250 $defaults = $this->
object->getAvailableDefaults();
3252 $tpl->setContent(
$table->getHTML());
3260 if (isset(
$_POST[
'chb_defaults']) && is_array(
$_POST[
'chb_defaults']) && count(
$_POST[
'chb_defaults'])) {
3261 foreach (
$_POST[
'chb_defaults'] as $test_default_id) {
3262 $this->
object->deleteDefaults($test_default_id);
3267 $this->defaultsObject();
3284 if (!is_array(
$_POST[
"chb_defaults"]) || 1 !== count(
$_POST[
"chb_defaults"])) {
3286 $this->lng->txt(
"tst_defaults_apply_select_one")
3289 return $this->defaultsObject();
3293 if ($this->
object->evalTotalPersons() > 0) {
3295 $this->lng->txt(
"tst_defaults_apply_not_possible")
3298 return $this->defaultsObject();
3301 $defaults =&$this->
object->getTestDefaults(
$_POST[
"chb_defaults"][0]);
3302 $defaultSettings = unserialize($defaults[
"defaults"]);
3304 if (isset($defaultSettings[
'isRandomTest'])) {
3305 if ($defaultSettings[
'isRandomTest']) {
3312 } elseif (isset($defaultSettings[
'questionSetType'])) {
3313 $newQuestionSetType = $defaultSettings[
'questionSetType'];
3315 $oldQuestionSetType = $this->
object->getQuestionSetType();
3316 $questionSetTypeSettingSwitched = ($oldQuestionSetType != $newQuestionSetType);
3318 $oldQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfigByType($oldQuestionSetType);
3321 case !$questionSetTypeSettingSwitched:
3322 case !$oldQuestionSetConfig->doesQuestionSetRelatedDataExist():
3329 require_once
'Modules/Test/classes/confirmations/class.ilTestSettingsChangeConfirmationGUI.php';
3332 $confirmation->setFormAction($this->ctrl->getFormAction($this));
3333 $confirmation->setCancel($this->lng->txt(
'cancel'),
'defaults');
3334 $confirmation->setConfirm($this->lng->txt(
'confirm'),
'confirmedApplyDefaults');
3336 $confirmation->setOldQuestionSetType($this->
object->getQuestionSetType());
3337 $confirmation->setNewQuestionSetType($newQuestionSetType);
3338 $confirmation->setQuestionLossInfoEnabled(
false);
3339 $confirmation->build();
3341 $confirmation->populateParametersFromPost();
3343 $this->tpl->setContent($this->ctrl->getHTML($confirmation));
3348 if ($questionSetTypeSettingSwitched && $this->
object->isOnline()) {
3349 $this->
object->setOnline(
false);
3351 $info = $this->lng->txt(
"tst_set_offline_due_to_switched_question_set_type_setting");
3356 $this->
object->applyDefaults($defaults);
3360 if ($questionSetTypeSettingSwitched && $oldQuestionSetConfig->doesQuestionSetRelatedDataExist()) {
3361 $oldQuestionSetConfig->removeQuestionSetRelatedData();
3364 $this->ctrl->redirect($this,
'defaults');
3372 if (strlen(
$_POST[
"name"]) > 0) {
3373 $this->
object->addDefaults(
$_POST[
'name']);
3377 $this->defaultsObject();
3382 if (in_array($this->ctrl->getCmdClass(), self::$infoScreenChildClasses)) {
3396 #if( !include 'competenzenRocker.php' ) exit; 3398 $this->ctrl->setCmd(
"showSummary");
3399 $this->ctrl->setCmdClass(
"ilinfoscreengui");
3400 $this->infoScreen();
3405 $this->ctrl->setCmd(
"showSummary");
3406 $this->ctrl->setCmdClass(
"ilinfoscreengui");
3407 $this->infoScreen(
$_GET[
'lock']);
3413 public function infoScreen($session_lock =
"")
3420 global $ilAccess,
$ilUser, $ilToolbar;
3422 if (
$_GET[
'createRandomSolutions']) {
3425 $this->
object->createRandomSolutions(
$_GET[
'createRandomSolutions']);
3427 $ilCtrl->redirect($this);
3430 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id)) {
3431 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->
ilias->error_obj->MESSAGE);
3436 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
3438 $info->setOpenFormTag(
false);
3441 return $this->ctrl->forwardCommand(
$info);
3444 require_once
'Modules/Test/classes/class.ilTestInfoScreenToolbarFactory.php';
3446 $toolbarFactory->setTestOBJ($this->
object);
3447 $toolbar = $toolbarFactory->getToolbarInstance();
3452 $toolbar->setSessionLockString($session_lock);
3456 if ($this->
object->getShowInfo()) {
3457 $info->enablePrivateNotes();
3460 if (strlen($this->
object->getIntroduction())) {
3461 $info->addSection($this->lng->txt(
"tst_introduction"));
3462 $info->addProperty(
"", $this->
object->prepareTextareaOutput($this->object->getIntroduction(),
true) .
3463 $info->getHiddenToggleButton());
3465 $info->addSection(
"");
3466 $info->addProperty(
"",
$info->getHiddenToggleButton());
3469 $info->addSection($this->lng->txt(
"tst_general_properties"));
3470 if ($this->
object->getShowInfo()) {
3471 $info->addProperty($this->lng->txt(
"author"), $this->
object->getAuthor());
3472 $info->addProperty($this->lng->txt(
"title"), $this->
object->getTitle());
3474 if ($this->
object->isOnline() && $this->
object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
3475 if ((!$this->
object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id)) {
3476 if ($this->
object->getShowInfo() || !$this->
object->getForceJS()) {
3478 $checked_javascript =
false;
3479 if ($this->
object->getJavaScriptOutput()) {
3480 $checked_javascript =
true;
3485 if ($this->
object->getNrOfTries() != 1) {
3486 if ($this->
object->getUsePreviousAnswers() == 0) {
3487 if ($this->
object->getShowInfo()) {
3488 $info->addProperty($this->lng->txt(
"tst_use_previous_answers"), $this->lng->txt(
"tst_dont_use_previous_answers"));
3491 $use_previous_answers =
false;
3492 if ($ilUser->prefs[
"tst_use_previous_answers"]) {
3493 $checked_previous_answers =
true;
3495 $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);
3502 $info->hideFurtherSections(
false);
3504 if ($this->
object->getShowInfo()) {
3505 $info->addSection($this->lng->txt(
"tst_sequence_properties"));
3506 $info->addProperty($this->lng->txt(
"tst_sequence"), $this->lng->txt(($this->
object->getSequenceSettings() ==
TEST_FIXED_SEQUENCE)?
"tst_sequence_fixed":
"tst_sequence_postpone"));
3508 $info->addSection($this->lng->txt(
"tst_heading_scoring"));
3509 $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"));
3510 $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"));
3511 if ($this->
object->isRandomTest()) {
3512 $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"));
3515 $info->addSection($this->lng->txt(
"tst_score_reporting"));
3516 $score_reporting_text =
"";
3517 switch ($this->
object->getScoreReporting()) {
3519 $score_reporting_text = $this->lng->txt(
"tst_report_after_test");
3522 $score_reporting_text = $this->lng->txt(
"tst_report_after_first_question");
3525 $score_reporting_text = $this->lng->txt(
"tst_report_after_date");
3528 $score_reporting_text = $this->lng->txt(
"tst_report_never");
3531 $info->addProperty($this->lng->txt(
"tst_score_reporting"), $score_reporting_text);
3532 $reporting_date = $this->
object->getReportingDate();
3533 if ($reporting_date) {
3534 #preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches); 3535 #$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])); 3536 #$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date); 3538 $this->lng->txt(
'tst_score_reporting_date'),
3543 $info->addSection($this->lng->txt(
"tst_session_settings"));
3544 $info->addProperty($this->lng->txt(
"tst_nr_of_tries"), ($this->
object->getNrOfTries() == 0)?$this->lng->txt(
"unlimited"):$this->
object->getNrOfTries());
3545 if ($this->
object->getNrOfTries() != 1) {
3546 $info->addProperty($this->lng->txt(
"tst_nr_of_tries_of_user"), (
$toolbar->getTestSession()->getPass() ==
false)?$this->lng->txt(
"tst_no_tries"):
$toolbar->getTestSequence()->getPass());
3549 if ($this->
object->getEnableProcessingTime()) {
3550 $info->addProperty($this->lng->txt(
"tst_processing_time"), $this->
object->getProcessingTime());
3552 if (strlen($this->
object->getAllowedUsers()) && ($this->
object->getAllowedUsersTimeGap())) {
3553 $info->addProperty($this->lng->txt(
"tst_allowed_users"), $this->
object->getAllowedUsers());
3556 $starting_time = $this->
object->getStartingTime();
3557 if ($this->
object->isStartingTimeEnabled() && $starting_time != 0) {
3560 $ending_time = $this->
object->getEndingTime();
3561 if ($this->
object->isEndingTimeEnabled() && $ending_time != 0) {
3564 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
3568 $this->ctrl->forwardCommand(
$info);
3573 require_once
'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
3577 require_once
'Modules/Test/classes/class.ilTestSkillLevelThresholdImportFails.php';
3581 $this->ctrl->redirect($this,
'infoScreen');
3587 switch ($this->ctrl->getCmd()) {
3590 case "redirectToInfoScreen":
3597 case "outCorrectSolution":
3599 case "showAnswersOfUser":
3600 case "outUserResultsOverview":
3601 case "backFromSummary":
3602 case "show_answers":
3605 case "outTestSummary":
3606 case "outQuestionSummary":
3607 case "gotoQuestion":
3608 case "selectImagemapRegion":
3609 case "confirmSubmitAnswers":
3610 case "finalSubmission":
3612 case "outUserPassDetails":
3613 case "checkPassword":
3614 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
"infoScreen"),
"",
$_GET[
"ref_id"]);
3617 case "evalAllUsers":
3618 case "evalUserDetail":
3619 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
"eval_stat"),
"",
$_GET[
"ref_id"]);
3626 case "importVerifiedFile":
3627 case "cancelImport":
3630 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$_GET[
"ref_id"]);
3638 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
3639 $this->ctrl->saveParameterByClass($this->ctrl->getCmdClass(),
'q_id');
3641 $tabs_gui->setBackTarget($this->lng->txt(
"backtocallingtest"), $this->ctrl->getLinkTargetByClass($this->ctrl->getCmdClass(),
"questions"));
3643 "tst_browse_for_questions",
3644 $this->ctrl->getLinkTarget($this,
"browseForQuestions"),
3645 array(
"browseForQuestions",
"filter",
"resetFilter",
"resetTextFilter",
"insertQuestions"),
3656 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
3658 $tabs_gui->setBackTarget($this->lng->txt(
"backtocallingtest"), $this->ctrl->getLinkTarget($this,
"questions"));
3661 $this->ctrl->getLinkTarget($this,
"randomQuestions"),
3662 array(
"randomQuestions"),
3678 include_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
3679 include_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
3681 $output_gui->certificateEditor();
3687 $ilTabs->activateTab(
'assQuestions');
3688 $a_cmd = $ilCtrl->getCmd();
3690 if (!$this->
object->isRandomTest()) {
3691 #if (in_array($this->object->getEnabledViewMode(), array('both', 'express'))) { 3692 $questions_per_page = ($a_cmd ==
'questions_per_page' || ($a_cmd ==
'removeQuestions' && $_REQUEST[
'test_express_mode'])) ? true :
false;
3694 $this->tabs_gui->addSubTabTarget(
3695 "questions_per_page_view",
3696 $this->ctrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'showPage'),
3704 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
3707 if (!in_array(
'questions',
$template->getHiddenTabs())) {
3709 $ilTabs->addSubTabTarget(
3710 "edit_test_questions",
3711 $this->ctrl->getLinkTarget($this,
'questions'),
3712 array(
"questions",
"browseForQuestions",
"questionBrowser",
"createQuestion",
3713 "randomselect",
"filter",
"resetFilter",
"insertQuestions",
3714 "back",
"createRandomSelection",
"cancelRandomSelect",
3715 "insertRandomSelection",
"removeQuestions",
"moveQuestions",
3716 "insertQuestionsBefore",
"insertQuestionsAfter",
"confirmRemoveQuestions",
3717 "cancelRemoveQuestions",
"executeCreateQuestion",
"cancelCreateQuestion",
3718 "addQuestionpool",
"saveRandomQuestions",
"saveQuestionSelectionMode"),
3722 if (in_array($a_cmd,
array(
'questions',
'createQuestion')) || ($a_cmd ==
'removeQuestions' && !$_REQUEST[
'test_express_mode'])) {
3723 $this->tabs_gui->activateSubTab(
'edit_test_questions');
3729 if (!$this->
object->isRandomTest()) {
3730 $ilTabs->addSubTabTarget(
3732 $this->ctrl->getLinkTarget($this,
'print'),
3736 $this->ctrl->getCmd() ==
'print' 3738 $ilTabs->addSubTabTarget(
3740 $this->ctrl->getLinkTarget($this,
'review'),
3744 $this->ctrl->getCmd() ==
'review' 3754 $ilTabs->addSubTabTarget(
3756 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"outEvaluation"),
3757 array(
"outEvaluation",
"detailedEvaluation",
"exportEvaluation",
"evalUserDetail",
"passDetails",
3758 "outStatisticsResultsOverview",
"statisticsPassDetails"),
3763 $ilTabs->addSubTabTarget(
3764 "tst_results_aggregated",
3765 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"eval_a"),
3772 $ilTabs->addSubTabTarget(
3773 "tst_single_results",
3774 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"singleResults"),
3775 array(
"singleResults"),
3781 public function getSettingsSubTabs($hiddenTabs =
array())
3786 global $ilTabs, $ilias;
3789 $ilTabs->addSubTabTarget(
3791 $this->ctrl->getLinkTargetByClass(
'ilObjTestSettingsGeneralGUI'),
3793 array(
'ilobjtestsettingsgeneralgui')
3796 if (!in_array(
'mark_schema', $hiddenTabs)) {
3797 $ilTabs->addSubTabTarget(
3799 $this->ctrl->getLinkTargetByClass(
'ilmarkschemagui',
'showMarkSchema'),
3801 array(
'ilmarkschemagui')
3806 $ilTabs->addSubTabTarget(
3808 $this->ctrl->getLinkTargetByClass(
'ilObjTestSettingsScoringResultsGUI'),
3810 array(
'ilobjtestsettingsscoringresultsgui')
3814 include_once
"Services/Certificate/classes/class.ilCertificate.php";
3816 $ilTabs->addSubTabTarget(
3818 $this->ctrl->getLinkTarget($this,
'certificate'),
3819 array(
"certificate",
"certificateEditor",
"certificateRemoveBackground",
"certificateSave",
3820 "certificatePreview",
"certificateDelete",
"certificateUpload",
"certificateImport"),
3821 array(
"",
"ilobjtestgui",
"ilcertificategui")
3825 if (!in_array(
'defaults', $hiddenTabs)) {
3827 $ilTabs->addSubTabTarget(
3828 "tst_default_settings",
3829 $this->ctrl->getLinkTarget($this,
"defaults"),
3830 array(
"defaults",
"deleteDefaults",
"addDefaults",
"applyDefaults"),
3831 array(
"",
"ilobjtestgui",
"ilcertificategui")
3836 if ($lti_settings->hasSettingsAccess()) {
3837 $this->tabs_gui->addSubTabTarget(
3839 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class),
3841 [ilLTIProviderObjectSettingGUI::class]
3851 $ilTabs->addSubTabTarget(
3853 $this->ctrl->getLinkTarget($this,
'participants'),
3855 "participants",
"saveClientIP",
3856 "removeParticipant",
3857 "showParticipantAnswersForAuthor",
3858 "deleteAllUserResults",
3859 "cancelDeleteAllUserData",
"deleteSingleUserResults",
3860 "outParticipantsResultsOverview",
"outParticipantsPassDetails",
3861 "showPassOverview",
"showUserAnswers",
"participantsAction",
3862 "showDetailedResults",
3863 'npResetFilter',
'npSetFilter' 3868 if (!$this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken()) {
3869 if ($this->
object->getProcessingTimeInSeconds() > 0 && $this->
object->getNrOfTries() == 1) {
3871 $ilTabs->addSubTabTarget(
3873 $this->ctrl->getLinkTarget($this,
'timingOverview'),
3874 array(
"timing",
"timingOverview"),
3889 global $ilAccess, $ilHelp;
3891 if (preg_match(
'/^ass(.*?)gui$/i', $this->ctrl->getNextClass($this))) {
3893 } elseif ($this->ctrl->getNextClass($this) ==
'ilassquestionpagegui') {
3897 $ilHelp->setScreenIdComponent(
"tst");
3899 $hidden_tabs =
array();
3901 $template = $this->
object->getTemplate();
3903 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
3906 $hidden_tabs =
$template->getHiddenTabs();
3910 $curUserHasWriteAccess = $ilAccess->checkAccess(
"write",
"", $this->ref_id);
3912 switch ($this->ctrl->getCmdClass()) {
3914 case 'iltestoutputgui':
3917 case 'iltestevaluationgui':
3918 $nonSelfTabbingCommands =
array(
3919 'outParticipantsResultsOverview',
'outEvaluation',
3920 'eval_a',
'singleResults',
'detailedEvaluation' 3922 if (in_array($this->ctrl->getCmd(), $nonSelfTabbingCommands)) {
3926 case 'iltestevalobjectiveorientedgui':
3929 case 'ilmarkschemagui':
3930 case 'ilobjtestsettingsgeneralgui':
3931 case 'ilobjtestsettingsscoringresultsgui':
3933 if ($curUserHasWriteAccess) {
3934 $this->getSettingsSubTabs($hidden_tabs);
3941 require_once
'Services/Link/classes/class.ilLink.php';
3943 $this->tabs_gui->setBack2Target($this->lng->txt(
'back_to_objective_container'), $courseLink);
3946 switch ($this->ctrl->getCmd()) {
3951 case "directfeedback":
3953 case "outCorrectSolution":
3955 case "showAnswersOfUser":
3956 case "outUserResultsOverview":
3957 case "backFromSummary":
3958 case "show_answers":
3961 case "confirmFinish":
3962 case "outTestSummary":
3963 case "outQuestionSummary":
3964 case "gotoQuestion":
3965 case "selectImagemapRegion":
3966 case "confirmSubmitAnswers":
3967 case "finalSubmission":
3969 case "outUserPassDetails":
3970 case "checkPassword":
3971 case "exportCertificate":
3972 case "finishListOfAnswers":
3973 case "backConfirmFinish":
3974 case "showFinalStatement":
3977 case "browseForQuestions":
3980 case "resetTextFilter":
3981 case "insertQuestions":
3983 if ($this->ctrl->getNextClass($this) !=
"illearningprogressgui") {
3989 case "certificateservice":
3990 case "certificateImport":
3991 case "certificateUpload":
3992 case "certificateEditor":
3993 case "certificateDelete":
3994 case "certificateSave":
3996 case "deleteDefaults":
3998 case "applyDefaults":
3999 case "inviteParticipants":
4000 case "searchParticipants":
4001 if ($curUserHasWriteAccess && in_array($this->ctrl->getCmdClass(),
array(
'ilobjtestgui',
'ilcertificategui'))) {
4002 $this->getSettingsSubTabs($hidden_tabs);
4010 case "detailedEvaluation":
4011 case "outEvaluation":
4012 case "singleResults":
4013 case "exportEvaluation":
4014 case "evalUserDetail":
4015 case "outStatisticsResultsOverview":
4016 case "statisticsPassDetails":
4021 if (strcmp(strtolower(get_class($this->
object)),
"ilobjtest") == 0) {
4023 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && !in_array(
'assQuestions', $hidden_tabs)) {
4024 $force_active = (
$_GET[
"up"] !=
"" ||
$_GET[
"down"] !=
"")
4027 if (!$force_active) {
4028 if (
$_GET[
"browse"] == 1) {
4029 $force_active =
true;
4033 switch ($this->
object->getQuestionSetType()) {
4035 $target = $this->ctrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'showPage');
4039 $target = $this->ctrl->getLinkTargetByClass(
'ilTestRandomQuestionSetConfigGUI');
4043 $target = $this->ctrl->getLinkTargetByClass(
'ilObjTestDynamicQuestionSetConfigGUI');
4047 $this->tabs_gui->addTarget(
4051 array(
"questions",
"browseForQuestions",
"questionBrowser",
"createQuestion",
4052 "randomselect",
"filter",
"resetFilter",
"insertQuestions",
4053 "back",
"createRandomSelection",
"cancelRandomSelect",
4054 "insertRandomSelection",
"removeQuestions",
"moveQuestions",
4055 "insertQuestionsBefore",
"insertQuestionsAfter",
"confirmRemoveQuestions",
4056 "cancelRemoveQuestions",
"executeCreateQuestion",
"cancelCreateQuestion",
4057 "addQuestionpool",
"saveRandomQuestions",
"saveQuestionSelectionMode",
"print",
4058 "addsource",
"removesource",
"randomQuestions"),
4066 if ($ilAccess->checkAccess(
"read",
"", $this->ref_id) && !in_array(
'info_short', $hidden_tabs)) {
4067 $this->tabs_gui->addTarget(
4069 $this->ctrl->getLinkTarget($this,
'infoScreen'),
4070 array(
"infoScreen",
"outIntroductionPage",
"showSummary",
4071 "setAnonymousId",
"outUserListOfAnswerPasses",
"redirectToInfoScreen")
4076 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
4077 if (!in_array(
'settings', $hidden_tabs)) {
4078 $settingsCommands =
array(
4079 "marks",
"showMarkSchema",
"addMarkStep",
"deleteMarkSteps",
"addSimpleMarkSchema",
"saveMarks",
4080 "certificate",
"certificateEditor",
"certificateRemoveBackground",
"certificateSave",
4081 "certificatePreview",
"certificateDelete",
"certificateUpload",
"certificateImport",
4082 "scoring",
"defaults",
"addDefaults",
"deleteDefaults",
"applyDefaults",
4083 "inviteParticipants",
"saveFixedParticipantsStatus",
"searchParticipants",
"addParticipants" 4086 require_once
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
4088 foreach ($reflection->getConstants() as
$name => $value) {
4089 if (substr($name, 0, 4) ==
'CMD_') {
4090 $settingsCommands[] = $value;
4094 require_once
'Modules/Test/classes/class.ilObjTestSettingsScoringResultsGUI.php';
4095 $reflection =
new ReflectionClass(
'ilObjTestSettingsScoringResultsGUI');
4096 foreach ($reflection->getConstants() as $name => $value) {
4097 if (substr($name, 0, 4) ==
'CMD_') {
4098 $settingsCommands[] = $value;
4102 $settingsCommands[] =
"";
4104 $this->tabs_gui->addTarget(
4106 $this->ctrl->getLinkTargetByClass(
'ilObjTestSettingsGeneralGUI'),
4108 array(
"ilmarkschemagui",
"ilobjtestsettingsgeneralgui",
"ilobjtestsettingsscoringresultsgui",
"ilobjtestgui",
"ilcertificategui")
4114 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentsGUI.php';
4116 $link = $this->ctrl->getLinkTargetByClass(
4117 array(
'ilTestSkillAdministrationGUI',
'ilAssQuestionSkillAssignmentsGUI'),
4121 $this->tabs_gui->addTarget(
'tst_tab_competences', $link,
array(),
array());
4124 if (!in_array(
'participants', $hidden_tabs)) {
4126 $this->tabs_gui->addTarget(
4128 $this->ctrl->getLinkTarget($this,
'participants'),
4130 "participants",
"saveClientIP",
4131 "removeParticipant",
4132 "showParticipantAnswersForAuthor",
4133 "deleteAllUserResults",
4134 "cancelDeleteAllUserData",
"deleteSingleUserResults",
4135 "outParticipantsResultsOverview",
"outParticipantsPassDetails",
4136 "showPassOverview",
"showUserAnswers",
"participantsAction",
4137 "showDetailedResults",
4138 'timing',
'timingOverview',
'npResetFilter',
'npSetFilter',
'showTimingForm' 4145 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
4147 $this->tabs_gui->addTarget(
4148 'learning_progress',
4149 $this->ctrl->getLinkTargetByClass(
array(
'illearningprogressgui'),
''),
4151 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
4155 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && !in_array(
'manscoring', $hidden_tabs)) {
4156 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
4158 if (count($scoring)) {
4160 $this->tabs_gui->addTarget(
4162 $this->ctrl->getLinkTargetByClass(
'ilTestScoringByQuestionsGUI',
'showManScoringByQuestionParticipantsTable'),
4164 'showManScoringParticipantsTable',
'applyManScoringParticipantsFilter',
'resetManScoringParticipantsFilter',
'showManScoringParticipantScreen',
4165 'showManScoringByQuestionParticipantsTable',
'applyManScoringByQuestionFilter',
'resetManScoringByQuestionFilter',
'saveManScoringByQuestion' 4175 $scoring_adjust_active = (bool) $setting->get(
'assessment_adjustments_enabled',
false);
4176 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && $scoring_adjust_active && !in_array(
'scoringadjust', $hidden_tabs)) {
4178 $this->tabs_gui->addTarget(
4180 $this->ctrl->getLinkTargetByClass(
'ilScoringAdjustmentGUI',
'showquestionlist'),
4183 'savescoringfortest',
4184 'adjustscoringfortest' 4190 if ((($ilAccess->checkAccess(
"tst_statistics",
"", $this->ref_id)) || ($ilAccess->checkAccess(
"write",
"", $this->ref_id))) && !in_array(
'statistics', $hidden_tabs)) {
4192 $this->tabs_gui->addTarget(
4194 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"outEvaluation"),
4196 "statistics",
"outEvaluation",
"exportEvaluation",
"detailedEvaluation",
"eval_a",
"evalUserDetail",
4197 "passDetails",
"outStatisticsResultsOverview",
"statisticsPassDetails",
"singleResults" 4203 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
4204 if (!in_array(
'history', $hidden_tabs)) {
4207 $this->tabs_gui->addTarget(
4209 $this->ctrl->getLinkTarget($this,
'history'),
4215 if (!in_array(
'meta_data', $hidden_tabs)) {
4217 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
4219 $mdtab = $mdgui->getTab();
4221 $this->tabs_gui->addTarget(
4230 if (!in_array(
'export', $hidden_tabs)) {
4232 $this->tabs_gui->addTarget(
4234 $this->ctrl->getLinkTargetByClass(
'iltestexportgui',
''),
4236 array(
'iltestexportgui')
4241 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->ref_id)&& !in_array(
'permissions', $hidden_tabs)) {
4242 $this->tabs_gui->addTarget(
4244 $this->ctrl->getLinkTargetByClass(
array(get_class($this),
'ilpermissiongui'),
"perm"),
4245 array(
"perm",
"info",
"owner"),
4251 if ($this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken()) {
4252 $hideTabs = $this->testQuestionSetConfigFactory->getQuestionSetConfig()->getHiddenTabsOnBrokenDepencies();
4254 foreach ($hideTabs as $tabId) {
4255 $this->tabs_gui->removeTab($tabId);
4265 $DIC->ctrl()->redirectByClass(
'ilObjTestGUI',
"infoScreen");
4280 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
4282 $_GET[
"baseClass"] =
"ilObjTestGUI";
4283 $_GET[
"cmd"] =
"infoScreen";
4284 $_GET[
"ref_id"] = $a_target;
4285 include_once(
"ilias.php");
4288 } elseif ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
4290 $lng->txt(
"msg_no_perm_read_item"),
4296 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
4307 if ($this->create_question_mode) {
4313 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
4317 $ilCtrl->saveParameter($this,
'q_mode');
4319 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'test_express_mode', 1);
4320 $ilCtrl->setParameter($this,
'test_express_mode', 1);
4321 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'q_id', $_REQUEST[
'q_id']);
4322 $ilCtrl->setParameter($this,
'q_id', $_REQUEST[
'q_id']);
4323 $ilToolbar->setFormAction($ilCtrl->getFormActionByClass(
'iltestexpresspageobjectgui',
'edit'));
4325 if ($this->
object->evalTotalPersons() == 0) {
4346 $ilToolbar->addFormButton($lng->txt(
"ass_create_question"),
"addQuestion");
4348 $ilToolbar->addSeparator();
4350 if ($this->
object->getPoolUsage()) {
4351 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
4355 $show_separator =
true;
4359 $questions = $this->
object->getQuestionTitlesAndIndexes();
4363 foreach ($questions as
$id => $label) {
4364 $options[
$id] = $label .
' [' . $this->lng->txt(
'question_id_short') .
': ' .
$id .
']';
4367 $optionKeys = array_keys(
$options);
4396 if (count($questions)) {
4397 if (isset($show_separator) && $show_separator) {
4398 $ilToolbar->addSeparator();
4402 $btn->setCaption(
"test_prev_question");
4403 $btn->setUrl($ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'prevQuestion'));
4404 $ilToolbar->addButtonInstance($btn);
4406 if (count(
$options) <= 1 || $optionKeys[0] == $qid) {
4407 $btn->setDisabled(
true);
4411 $btn->setCaption(
"test_next_question");
4412 $btn->setUrl($ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'nextQuestion'));
4413 $ilToolbar->addButtonInstance($btn);
4415 if (count(
$options) <= 1 || $optionKeys[count($optionKeys) - 1] == $qid) {
4416 $btn->setDisabled(
true);
4420 if (count($questions) > 1) {
4421 $ilToolbar->addSeparator();
4423 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
4425 $si->addCustomAttribute(
"onChange=\"forms['ilToolbar'].submit();\"");
4429 $si->setValue($qid);
4432 $ilToolbar->addInputItem(
$si,
true);
4435 $total = $this->
object->evalTotalPersons();
4450 if (count($questions) && !
$total) {
4451 $ilCtrl->setParameter($this,
'q_id', $_REQUEST[
'q_id']);
4452 $ilToolbar->addSeparator();
4453 $ilToolbar->addButton($lng->txt(
"test_delete_page"), $ilCtrl->getLinkTarget($this,
"removeQuestions"));
4456 if (count($questions) > 1 && !
$total) {
4457 $ilToolbar->addSeparator();
4458 $ilToolbar->addButton($lng->txt(
"test_move_page"), $ilCtrl->getLinkTarget($this,
"movePageForm"));
4463 $online_access =
false;
4464 if ($this->
object->getFixedParticipants()) {
4465 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
4467 if ($online_access_result ===
true) {
4468 $online_access =
true;
4472 if ($this->
object->isOnline() && $this->
object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
4473 if ((!$this->
object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id)) {
4474 $testSession = $this->testSessionFactory->getSession();
4476 $executable = $this->
object->isExecutable($testSession, $ilUser->getId(), $allowPassIncrease =
true);
4478 if ($executable[
"executable"]) {
4480 $player_instance = $player_factory->getPlayerGUI();
4482 if ($testSession->getActiveId() > 0) {
4483 $ilToolbar->addSeparator();
4484 $ilToolbar->addButton($lng->txt(
'tst_resume_test'), $ilCtrl->getLinkTarget($player_instance,
'resumePlayer'));
4486 $ilToolbar->addSeparator();
4487 $ilToolbar->addButton($lng->txt(
'tst_start_test'), $ilCtrl->getLinkTarget($player_instance,
'startTest'));
4497 $this->ctrl->redirect($this,
'questions');
4503 foreach ($questionIds as $q_id) {
4505 $newIds[$q_id] = $newId;
4517 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
4520 $newtitle = $question_gui->object->getTitle();
4521 if ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle())) {
4523 while ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle() .
" ($counter)")) {
4526 $newtitle = $question_gui->object->getTitle() .
" ($counter)";
4529 return $question_gui->object->createNewOriginalFromThisDuplicate($targetParentId, $newtitle);
4537 global $ilObjDataCache;
4539 $qplId = $ilObjDataCache->lookupObjId($_REQUEST[
'sel_qpl']);
4542 foreach (
$result->ids as $oldId => $newId) {
4547 $oldOriginal->delete($oldOriginal->getId());
4550 $questionInstance->setNewOriginalId($newId);
4554 $this->ctrl->redirect($this,
'questions');
4560 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
4564 $title->setRequired(
true);
4570 $form->addCommandButton(
'createQuestionPoolAndCopy', $lng->txt(
'create'));
4572 if (isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id'])) {
4573 foreach ($_REQUEST[
'q_id'] as
$id) {
4575 $hidden->setValue($id);
4576 $form->addItem($hidden);
4592 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
4596 'copyAndLinkToQuestionpool' == $this->ctrl->getCmd() &&
4597 (!isset($_REQUEST[
'q_id']) || !is_array($_REQUEST[
'q_id']))
4600 $this->ctrl->redirect($this,
'questions');
4603 if (isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id'])) {
4604 foreach ($_REQUEST[
'q_id'] as $q_id) {
4611 if (
$type !==
'tst') {
4613 $this->ctrl->redirect($this,
'questions');
4626 if ($_REQUEST[
'title']) {
4627 $title = $_REQUEST[
'title'];
4629 $title = $_REQUEST[
'txt_qpl'];
4638 $_REQUEST[
'sel_qpl'] =
$ref_id;
4660 $ilTabs->activateSubTab(
'edit_test_questions');
4662 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_qpl_select_copy.html",
"Modules/Test");
4663 $questionpools =&$this->
object->getAvailableQuestionpools(
false,
false,
false,
true,
false,
"write");
4664 if (count($questionpools) == 0) {
4665 $this->tpl->setCurrentBlock(
"option");
4666 $this->tpl->setVariable(
"VALUE_QPL",
"");
4667 $this->tpl->parseCurrentBlock();
4669 foreach ($questionpools as
$key => $value) {
4670 $this->tpl->setCurrentBlock(
"option");
4671 $this->tpl->setVariable(
"VALUE_OPTION",
$key);
4672 $this->tpl->setVariable(
"TEXT_OPTION", $value[
"title"]);
4673 $this->tpl->parseCurrentBlock();
4677 if (isset($_REQUEST[
'q_id']) && is_array($_REQUEST[
'q_id'])) {
4678 foreach ($_REQUEST[
'q_id'] as
$id) {
4679 $this->tpl->setCurrentBlock(
"hidden");
4680 $this->tpl->setVariable(
"HIDDEN_NAME",
"q_id[]");
4681 $this->tpl->setVariable(
"HIDDEN_VALUE", $id);
4682 $this->tpl->parseCurrentBlock();
4683 $this->tpl->setCurrentBlock(
"adm_content");
4686 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
4688 if (count($questionpools) == 0) {
4689 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_enter_questionpool"));
4690 $cmd =
'createQuestionPoolAndCopy';
4692 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_select_questionpool"));
4695 $this->tpl->setVariable(
"CMD_SUBMIT", $cmd);
4696 $this->tpl->setVariable(
"BTN_SUBMIT", $this->lng->txt(
"submit"));
4697 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
4701 case 'copyAndLinkQuestionsToPool':
4703 $hidden->setValue(1);
4704 $createForm->addItem($hidden);
4706 case 'copyQuestionsToPool':
4709 $createForm->setFormAction($this->ctrl->getFormAction($this));
4711 $this->tpl->parseCurrentBlock();
4719 $simpleSetters =
array(
4722 'use_pool' =>
'setPoolUsage',
4723 'question_set_type' =>
'setQuestionSetType',
4726 'intro_enabled' =>
'setIntroductionEnabled',
4727 'showinfo' =>
'setShowInfo',
4730 'chb_starting_time' =>
'setStartingTimeEnabled',
4731 'chb_ending_time' =>
'setEndingTimeEnabled',
4732 'password_enabled' =>
'setPasswordEnabled',
4733 'fixedparticipants' =>
'setFixedParticipants',
4734 'limitUsers' =>
'setLimitUsersEnabled',
4737 'nr_of_tries' =>
'setNrOfTries',
4738 'chb_processing_time' =>
'setEnableProcessingTime',
4739 'kiosk' =>
'setKiosk',
4740 'examid_in_test_pass' =>
'setShowExamIdInTestPassEnabled',
4743 'title_output' =>
'setTitleOutput',
4745 'chb_shuffle_questions' =>
'setShuffleQuestions',
4746 'offer_hints' =>
'setOfferingQuestionHintsEnabled',
4747 'instant_feedback' =>
'setScoringFeedbackOptionsByArray',
4748 'obligations_enabled' =>
'setObligationsEnabled',
4751 'chb_use_previous_answers' =>
'setUsePreviousAnswers',
4752 'chb_show_cancel' =>
'setShowCancel',
4753 'chb_postpone' =>
'setPostponingEnabled',
4754 'list_of_questions' =>
'setListOfQuestionsSettings',
4755 'chb_show_marker' =>
'setShowMarker',
4758 'enable_examview' =>
'setEnableExamview',
4759 'showfinalstatement' =>
'setShowFinalStatement',
4760 'redirection_enabled' => null,
4761 'sign_submission' =>
'setSignSubmission',
4762 'mailnotification' =>
'setMailNotification',
4765 'count_system' =>
'setCountSystem',
4766 'mc_scoring' =>
'setMCScoring',
4767 'score_cutting' =>
'setScoreCutting',
4768 'pass_scoring' =>
'setPassScoring',
4769 'pass_deletion_allowed' =>
'setPassDeletionAllowed',
4772 'results_access_enabled' =>
'setScoreReporting',
4773 'grading_status' =>
'setShowGradingStatusEnabled',
4774 'grading_mark' =>
'setShowGradingMarkEnabled',
4777 'solution_details' =>
'setShowSolutionDetails',
4778 'solution_feedback' =>
'setShowSolutionFeedback',
4779 'solution_suggested' =>
'setShowSolutionSuggested',
4780 'solution_printview' =>
'setShowSolutionPrintview',
4781 'highscore_enabled' =>
'setHighscoreEnabled',
4782 'solution_signature' =>
'setShowSolutionSignature',
4783 'examid_in_test_res' =>
'setShowExamIdInTestResultsEnabled',
4784 'exp_sc_short' =>
'setExportSettingsSingleChoiceShort',
4787 'anonymity' =>
'setAnonymity',
4788 'enable_archiving' =>
'setEnableArchiving' 4791 if (!$templateData[
'results_presentation'][
'value']) {
4792 $templateData[
'results_presentation'][
'value'] =
array();
4795 foreach ($simpleSetters as $field => $setter) {
4796 if ($templateData[$field] && strlen($setter)) {
4797 $object->$setter($templateData[$field][
'value']);
4803 if ($templateData[$field][
'value'] > 0) {
4805 $object->setAutosaveIval($templateData[$field][
'value'] * 1000);
4811 case 'redirection_enabled':
4820 if (strlen($templateData[$field][
'value'])) {
4822 $object->setRedirectionUrl($templateData[$field][
'value']);
4825 $object->setRedirectionUrl(
'');
4834 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
4837 $this->ctrl->redirect($this,
"infoScreen");
4842 $orders = $obligations =
array();
4844 foreach ((
array) $_REQUEST[
'order'] as $qId => $order) {
4845 $id = (int) str_replace(
'q_',
'', $qId);
4847 $orders[
$id] = $order;
4850 if ($this->
object->areObligationsEnabled() && isset($_REQUEST[
'obligatory']) && is_array($_REQUEST[
'obligatory'])) {
4851 foreach ($_REQUEST[
'obligatory'] as $qId => $obligation) {
4852 $id = (int) str_replace(
'q_',
'', $qId);
4855 $obligations[
$id] = $obligation;
4860 $this->
object->setQuestionOrderAndObligations(
4866 $ilCtrl->redirect($this,
'questions');
4876 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
4878 $form->setFormAction($ilCtrl->getFormAction($this,
"movePage"));
4879 $form->setTitle($lng->txt(
"test_move_page"));
4882 $old_pos->setValue($_REQUEST[
'q_id']);
4883 $form->addItem($old_pos);
4885 $questions = $this->
object->getQuestionTitlesAndIndexes();
4886 if (!is_array($questions)) {
4887 $questions =
array();
4890 foreach ($questions as $k => $q) {
4891 if ($k == $_REQUEST[
'q_id']) {
4892 unset($questions[$k]);
4895 $questions[$k] = $lng->txt(
'behind') .
' ' . $q;
4897 #$questions['0'] = $lng->txt('first'); 4900 0 => $lng->txt(
'first')
4902 foreach ($questions as $k => $q) {
4903 $options[$k] = $q .
' [' . $this->lng->txt(
'question_id_short') .
': ' . $k .
']';
4908 $form->addItem($pos);
4910 $form->addCommandButton(
"movePage", $lng->txt(
"submit"));
4911 $form->addCommandButton(
"showPage", $lng->txt(
"cancel"));
4913 return $tpl->setContent(
$form->getHTML());
4919 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
4922 $this->ctrl->redirect($this,
"infoScreen");
4925 $this->
object->moveQuestionAfter($_REQUEST[
'q_id'], $_REQUEST[
'position_after']);
4933 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'q_id', $_REQUEST[
'q_id']);
4934 $ilCtrl->redirectByClass(
'iltestexpresspageobjectgui',
'showPage');
4940 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
4943 $this->ctrl->redirect($this,
"infoScreen");
4946 if ($_REQUEST[
'q_id'] && !is_array($_REQUEST[
'q_id'])) {
4947 $ids =
array($_REQUEST[
'q_id']);
4948 } elseif ($_REQUEST[
'q_id']) {
4949 $ids = $_REQUEST[
'q_id'];
4952 $this->ctrl->redirect($this,
'questions');
4957 $questionTitles = $this->
object->getQuestionTitles();
4959 foreach ($ids as
$id) {
4960 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
4963 $title = $question->object->getTitle();
4965 while (in_array(
$title .
' (' .
$i .
')', $questionTitles)) {
4969 $title .=
' (' . $i .
')';
4971 $questionTitles[] =
$title;
4973 $new_id = $question->object->duplicate(
false,
$title);
4976 $clone->object->setObjId($this->
object->getId());
4977 $clone->object->saveToDb();
4979 $this->
object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $new_id,
true);
4987 $this->ctrl->redirect($this,
'questions');
4995 if (!isset(
$_GET[
'pdf'])) {
4999 if (!(
bool)
$_GET[
'pdf']) {
5008 require_once
'Modules/Course/classes/Objectives/class.ilLOSettings.php';
5013 $this->objectiveOrientedContainer->setObjId($containerObjId);
5014 $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.
showUserResults($show_pass_details, $show_answers, $show_reached_points=false)
Shows the pass overview of the scored pass for one ore more users.
static _lookupName($a_user_id)
lookup user name
copyQuestionsToPoolObject()
static getSettingsTemplateConfig()
getQuestionpoolCreationForm()
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
applyTemplate($templateData, $object)
const PDF_PRINT_VIEW_QUESTIONS
This class represents an option in a radio group.
static _getAvailableQuestionpools($use_object_id=false, $equal_points=false, $could_be_offline=false, $showPath=false, $with_questioncount=false, $permission="read", $usr_id="")
Returns the available question pools for the active user.
static 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.
static getQuestionTypeByTypeId($type_id)
determineObjectiveOrientedContainer()
applyFilterCriteria($in_rows)
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
const PDF_USER_RESULT
PDF Purposes.
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.
const QT_ORDERING_HORIZONTAL
const KPRIM_CHOICE_QUESTION_IDENTIFIER
if(!array_key_exists('StateId', $_REQUEST)) $id
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 setUseRelativeDates($a_status)
set use relative dates
static _lookupTitle($a_id)
lookup object title
const REDIRECT_NONE
Redirect after finishing test constants.
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
static useRelativeDates()
check if relative dates are used
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()
setCustomRolesForSelection($a_roles)
Set custom roles for mapping to LTI roles.
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()
catch(Exception $e) $message
getBrowseForQuestionsTab(&$tabs_gui)
deleteRegisteredImportFails()
const NUMERIC_QUESTION_IDENTIFIER
foreach($_POST as $key=> $value) $res
if(isset($_POST['submit'])) $form
GUI class for LTI provider object settings.
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
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.
This class represents a text property in a property form.
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()
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.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
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 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.
static _getLog($ts_from, $ts_to, $test_id, $test_only=false)
Retrieve assessment log datasets from the database.
cancelRandomSelectObject()
Cancels the form for random selection of questions.
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
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.
static generatePDF($pdf_output, $output_mode, $filename=null, $purpose=null)
if(empty($password)) $table
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)
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.
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.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
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.