4require_once
'./Modules/Test/exceptions/class.ilTestException.php';
5require_once
'./Services/Object/classes/class.ilObjectGUI.php';
6require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
7require_once
'./Modules/Test/classes/class.ilObjAssessmentFolderGUI.php';
8require_once
'./Modules/Test/classes/class.ilObjAssessmentFolder.php';
9require_once
'./Modules/Test/classes/class.ilTestExpressPage.php';
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"));
89 require_once
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
92 require_once
'Modules/Test/classes/class.ilTestPlayerFactory.php';
95 require_once
'Modules/Test/classes/class.ilTestSessionFactory.php';
98 require_once
'Modules/Test/classes/class.ilTestSequenceFactory.php';
102 require_once
'Modules/Test/classes/class.ilTestObjectiveOrientedContainer.php';
111 global $ilAccess, $ilNavigationHistory,
$ilCtrl,
$ilErr,
$tpl,
$lng, $ilTabs, $ilPluginAdmin,
$ilDB,
$tree,
$ilias,
$ilUser;
113 if((!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])))
115 $ilias->raiseError($this->lng->txt(
"permission_denied"),
$ilias->error_obj->MESSAGE);
118 $cmd = $this->ctrl->getCmd(
"infoScreen");
120 $cmdsDisabledDueToOfflineStatus = array(
121 'resumePlayer',
'resumePlayer',
'outUserResultsOverview',
'outUserListOfAnswerPasses'
124 if(!$this->
getCreationMode() && !$this->object->isOnline() && in_array(
$cmd, $cmdsDisabledDueToOfflineStatus))
129 $next_class = $this->ctrl->getNextClass($this);
130 $this->ctrl->setReturn($this,
"infoScreen");
132 if(method_exists($this->
object,
"getTestStyleLocation")) $this->tpl->addCss($this->object->getTestStyleLocation(
"output"),
"screen");
136 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])
139 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
140 "ilias.php?baseClass=ilObjTestGUI&cmd=infoScreen&ref_id=" .
$_GET[
"ref_id"],
"tst");
145 if(IS_PAYMENT_ENABLED)
147 require_once
'Services/Payment/classes/class.ilPaymentObject.php';
151 $this->tpl->getStandardTemplate();
153 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
155 $ret = $this->ctrl->forwardCommand($pp);
165 global $___prev_question_id;
166 $___prev_question_id =
$_REQUEST[
'prev_qid'];
167 $this->ctrl->setParameter($this,
'prev_qid',
$_REQUEST[
'prev_qid']);
170 if( !$this->
getCreationMode() && $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken() )
172 if( !$this->testQuestionSetConfigFactory->getQuestionSetConfig()->isValidRequestOnBrokenQuestionSetDepencies($next_class,
$cmd) )
174 $this->ctrl->redirectByClass(
'ilObjTestGUI',
'infoScreen');
182 case 'iltestexportgui':
183 if(!$ilAccess->checkAccess(
'write',
'', $this->ref_id))
185 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
190 require_once
'Modules/Test/classes/class.ilTestExportGUI.php';
194 case "ilinfoscreengui":
199 case 'ilobjectmetadatagui':
200 if(!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId()))
202 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
207 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
209 $this->ctrl->forwardCommand($md_gui);
212 case "iltestplayerfixedquestionsetgui":
214 require_once
"./Modules/Test/classes/class.ilTestPlayerFixedQuestionSetGUI.php";
218 $this->ctrl->forwardCommand($gui);
221 case "iltestplayerrandomquestionsetgui":
223 require_once
"./Modules/Test/classes/class.ilTestPlayerRandomQuestionSetGUI.php";
227 $this->ctrl->forwardCommand($gui);
230 case "iltestplayerdynamicquestionsetgui":
232 require_once
"./Modules/Test/classes/class.ilTestPlayerDynamicQuestionSetGUI.php";
236 $this->ctrl->forwardCommand($gui);
239 case "iltestevaluationgui":
243 case "iltestevalobjectiveorientedgui":
247 case "iltestservicegui":
250 require_once
"./Modules/Test/classes/class.ilTestServiceGUI.php";
252 $this->ctrl->forwardCommand($serviceGUI);
255 case 'ilpermissiongui':
258 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
260 $ret =& $this->ctrl->forwardCommand($perm_gui);
263 case "illearningprogressgui":
266 require_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
268 $this->ctrl->forwardCommand($new_gui);
272 case "ilcertificategui":
275 require_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
276 require_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
278 $this->ctrl->forwardCommand($output_gui);
281 case "iltestscoringgui":
284 require_once
"./Modules/Test/classes/class.ilTestScoringGUI.php";
286 $this->ctrl->forwardCommand($output_gui);
289 case 'ilmarkschemagui':
290 if(!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId()))
293 $this->ctrl->redirect($this,
'infoScreen');
297 require_once
'Modules/Test/classes/class.ilMarkSchemaGUI.php';
299 $this->ctrl->forwardCommand($mark_schema_gui);
302 case 'iltestscoringbyquestionsgui':
305 include_once
'Modules/Test/classes/class.ilTestScoringByQuestionsGUI.php';
307 $this->ctrl->forwardCommand($output_gui);
310 case 'ilobjtestsettingsgeneralgui':
313 require_once
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
315 $this->ctrl, $ilAccess, $this->lng, $this->tpl, $this->tree,
$ilDB, $ilPluginAdmin,
$ilUser, $this
317 $this->ctrl->forwardCommand($gui);
320 case 'ilobjtestsettingsscoringresultsgui':
323 require_once
'Modules/Test/classes/class.ilObjTestSettingsScoringResultsGUI.php';
325 $this->ctrl, $ilAccess, $this->lng, $this->tpl, $this->tree,
$ilDB, $ilPluginAdmin, $this
327 $this->ctrl->forwardCommand($gui);
330 case 'ilobjtestdynamicquestionsetconfiggui':
333 require_once
'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfigGUI.php';
335 $this->ctrl->forwardCommand($gui);
338 case 'iltestrandomquestionsetconfiggui':
341 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetConfigGUI.php';
343 $this->ctrl->forwardCommand($gui);
346 case 'iltestquestionbrowsertablegui':
349 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
351 $gui->setWriteAccess($ilAccess->checkAccess(
"write",
"", $this->ref_id));
353 $this->ctrl->forwardCommand($gui);
356 case 'iltestskilladministrationgui':
359 require_once
'Modules/Test/classes/class.ilTestSkillAdministrationGUI.php';
360 $gui =
new ilTestSkillAdministrationGUI(
$ilias, $this->ctrl, $ilAccess, $ilTabs, $this->tpl, $this->lng,
$ilDB,
$tree, $ilPluginAdmin, $this->
object, $this->ref_id);
361 $this->ctrl->forwardCommand($gui);
364 case 'iltestskillevaluationgui':
368 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
369 if( $this->object->isDynamicTest() )
371 require_once
'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php';
373 $dynamicQuestionSetConfig->loadFromDb();
375 $questionList->setParentObjId($dynamicQuestionSetConfig->getSourceQuestionPoolId());
381 $questionList->setParentObjId($this->object->getId());
384 $questionList->load();
386 require_once
'Modules/Test/classes/class.ilTestSessionFactory.php';
389 $testResults = $this->
object->getTestResult($testSession->getActiveId(), $testSession->getPass(),
true);
391 require_once
'Modules/Test/classes/class.ilTestSkillEvaluationGUI.php';
392 $gui =
new ilTestSkillEvaluationGUI($this->ctrl, $ilTabs, $this->tpl, $this->lng,
$ilDB, $this->object->getTestId(),$this->object->getRefId(), $this->object->getId());
393 $gui->setQuestionList($questionList);
394 $gui->setTestSession($testSession);
395 $gui->setTestResults($testResults);
397 $this->ctrl->forwardCommand($gui);
400 case 'ilobjectcopygui':
403 require_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
406 $this->ctrl->forwardCommand($cp);
409 case 'ilrepositorysearchgui':
412 require_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
414 $rep_search->setCallback($this,
415 'addParticipantsObject',
420 $this->ctrl->setReturn($this,
'participants');
421 $ret =& $this->ctrl->forwardCommand($rep_search);
422 $this->tabs_gui->setTabActive(
'participants');
425 case 'ilpageeditorgui':
426 case 'iltestexpresspageobjectgui':
428 require_once
'Modules/TestQuestionPool/classes/class.ilAssIncompleteQuestionPurger.php';
430 $incompleteQuestionPurger->setOwnerId(
$ilUser->getId());
431 $incompleteQuestionPurger->purge();
438 if(!$qid || $qid ==
'Array')
440 $questions = $this->
object->getQuestionTitlesAndIndexes();
441 if(!is_array($questions))
442 $questions = array();
444 $keys = array_keys($questions);
448 $_GET[
'q_id'] = $qid;
453 if(!in_array(
$cmd, array(
'addQuestion',
'browseForQuestions')))
458 if(!$qid || in_array(
$cmd, array(
'insertQuestions',
'browseForQuestions')))
460 require_once
"./Modules/Test/classes/class.ilTestExpressPageObjectGUI.php";
463 $ret =& $this->ctrl->forwardCommand($pageObject);
466 require_once
"./Services/Style/classes/class.ilObjStyleSheet.php";
467 $this->tpl->setCurrentBlock(
"ContentStyle");
468 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
470 $this->tpl->parseCurrentBlock();
473 $this->tpl->setCurrentBlock(
"SyntaxStyle");
474 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
476 $this->tpl->parseCurrentBlock();
477 require_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
482 $this->ctrl->setParameterByClass(
'iltestexpresspageobjectgui',
'q_id',
'');
483 $this->ctrl->redirectByClass(
'iltestexpresspageobjectgui', $this->ctrl->getCmd());
486 $q_gui->outAdditionalOutput();
487 $q_gui->object->setObjId($this->object->getId());
489 $q_gui->setTargetGuiClass(
null);
490 $q_gui->setQuestionActionCmd(
null);
492 $question = $q_gui->object;
493 $this->ctrl->saveParameter($this,
"q_id");
495 #$this->lng->loadLanguageModule("content");
496 $this->ctrl->setReturnByClass(
"ilTestExpressPageObjectGUI",
"view");
497 $this->ctrl->setReturn($this,
"questions");
499 require_once
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php";
500 require_once
"./Modules/Test/classes/class.ilTestExpressPageObjectGUI.php";
504 $page_gui->setEditPreview(
true);
505 $page_gui->setEnabledTabs(
false);
506 if(strlen($this->ctrl->getCmd()) == 0)
508 $this->ctrl->setCmdClass(get_class($page_gui));
509 $this->ctrl->setCmd(
"preview");
512 $page_gui->setQuestionHTML(array($q_gui->object->getId() => $q_gui->getPreview(TRUE)));
513 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
515 $page_gui->setOutputMode($this->object->evalTotalPersons() == 0 ?
"edit" :
'preview');
517 $page_gui->setHeader($question->getTitle());
518 $page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this,
"downloadFile"));
519 $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this,
"fullscreen"));
520 $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this));
521 $page_gui->setPresentationTitle($question->getTitle() .
' ['. $this->lng->txt(
'question_id_short') .
': ' . $question->getId() .
']');
522 $ret =& $this->ctrl->forwardCommand($page_gui);
525 $ilTabs->activateTab(
'assQuestions');
527 $this->tpl->setContent(
$ret);
530 case 'ilassquestionpreviewgui':
534 $this->ctrl->saveParameter($this,
"q_id");
536 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
539 $gui->initQuestion((
int)
$_GET[
'q_id'], $this->object->getId());
540 $gui->initPreviewSettings($this->object->getRefId());
541 $gui->initPreviewSession(
$ilUser->getId(), (
int)
$_GET[
'q_id']);
542 $gui->initHintTracking();
543 $gui->initStyleSheets();
545 $this->ctrl->forwardCommand($gui);
549 case 'ilassquestionpagegui':
550 require_once
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
554 $this->ctrl->setParameter($this,
'prev_qid',
$_REQUEST[
'prev_qid']);
560 $_GET[
'calling_test'] = $this->
object->getRefId();
561 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
562 $this->tpl->setCurrentBlock(
"ContentStyle");
563 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
565 $this->tpl->parseCurrentBlock();
568 $this->tpl->setCurrentBlock(
"SyntaxStyle");
569 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
571 $this->tpl->parseCurrentBlock();
572 require_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
574 $q_gui->setQuestionTabs();
575 $q_gui->outAdditionalOutput();
576 $q_gui->object->setObjId($this->object->getId());
577 $question =& $q_gui->object;
578 $this->ctrl->saveParameter($this,
"q_id");
579 $this->lng->loadLanguageModule(
"content");
580 $this->ctrl->setReturnByClass(
"ilAssQuestionPageGUI",
"view");
581 $this->ctrl->setReturn($this,
"questions");
583 $page_gui->setEditPreview(
true);
584 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';
656 case 'ilassquestionfeedbackeditinggui':
661 $this->ctrl->setReturn($this,
"questions");
664 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
666 $questionGUI->object->setObjId($this->object->getId());
667 $questionGUI->setQuestionTabs();
670 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
676 case 'iltesttoplistgui':
678 require_once
'./Modules/Test/classes/class.ilTestToplistGUI.php';
680 $this->ctrl->forwardCommand($gui);
683 case 'ilscoringadjustmentgui':
685 require_once
'./Modules/Test/classes/class.ilScoringAdjustmentGUI.php';
687 $this->ctrl->forwardCommand($gui);
694 if((strcmp(
$cmd,
"properties") == 0) && (
$_GET[
"browse"]))
696 $this->questionBrowser();
699 if((strcmp(
$cmd,
"properties") == 0) && (
$_GET[
"up"] ||
$_GET[
"down"]))
711 global $___prev_question_id;
712 $___prev_question_id =
$_REQUEST[
'prev_qid'];
713 $this->ctrl->setParameterByClass(
'ilassquestionpagegui',
'prev_qid',
$_REQUEST[
'prev_qid']);
714 $this->ctrl->setParameterByClass(
$_GET[
'sel_question_types'] .
'gui',
'prev_qid',
$_REQUEST[
'prev_qid']);
716 $this->create_question_mode =
true;
719 $this->ctrl->setReturn($this,
"questions");
720 require_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
722 $q_gui->object->setObjId($this->object->getId());
723 if(!
$_GET[
'sel_question_types'])
727 $qType =
$_GET[
'sel_question_types'];
729 $this->ctrl->setParameterByClass($qType .
"GUI",
'prev_qid',
$_REQUEST[
'prev_qid']);
730 $this->ctrl->setParameterByClass($qType .
"GUI",
'test_ref_id',
$_REQUEST[
'ref_id']);
731 $this->ctrl->setParameterByClass($qType .
"GUI",
'q_id',
$_REQUEST[
'q_id']);
733 $this->ctrl->setParameterByClass($qType .
"GUI",
'test_express_mode', 1);
735 #global $___test_express_mode;
736 #$___test_express_mode = true;
737 if(!$q_gui->isSaveCommand())
738 $_GET[
'calling_test'] = $this->
object->getRefId();
740 $q_gui->setQuestionTabs();
741 #unset($___test_express_mode);
742 $ret =& $this->ctrl->forwardCommand($q_gui);
745 if ( !in_array(strtolower(
$_GET[
"baseClass"]), array(
'iladministrationgui',
'ilrepositorygui')) &&
755 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
758 $this->object->getType(), $this->object->getRefId(),
759 $this->object->getId(),
$ilUser->getId()
770 $DIC->ctrl()->redirectByClass(
'ilTestExportGUI');
775 switch( $this->object->getQuestionSetType() )
778 $this->ctrl->redirectByClass(
'ilTestExpressPageObjectGUI',
'showPage');
781 $this->ctrl->redirectByClass(
'ilTestRandomQuestionSetConfigGUI');
784 $this->ctrl->redirectByClass(
'ilObjTestDynamicQuestionSetConfigGUI');
790 $this->ctrl->setCmdClass(
'ilTestEvaluationGUI');
791 $this->ctrl->setCmd(
'outUserResultsOverview');
792 $this->tabs_gui->clearTargets();
802 require_once
'Modules/Test/classes/class.ilTestEvaluationGUI.php';
806 $this->ctrl->forwardCommand($gui);
814 require_once
'Modules/Test/classes/class.ilTestEvalObjectiveOrientedGUI.php';
818 $this->ctrl->forwardCommand($gui);
829 public function createUserResults($show_pass_details, $show_answers, $show_reached_points, $show_user_results)
831 global $ilTabs,
$ilDB;
833 $ilTabs->setBackTarget(
834 $this->lng->txt(
'back'), $this->ctrl->getLinkTarget($this,
'participants')
839 require_once
'Services/Link/classes/class.ilLink.php';
841 $ilTabs->setBack2Target($this->lng->txt(
'back_to_objective_container'), $courseLink);
844 $template =
new ilTemplate(
"tpl.il_as_tst_participants_result_output.html", TRUE, TRUE,
"Modules/Test");
846 require_once
'Modules/Test/classes/toolbars/class.ilTestResultsToolbarGUI.php';
849 $this->ctrl->setParameter($this,
'pdf',
'1');
850 $toolbar->setPdfExportLinkTarget( $this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()) );
851 $this->ctrl->setParameter($this,
'pdf',
'');
855 if( isset(
$_GET[
'show_best_solutions']) )
857 $_SESSION[
'tst_results_show_best_solutions'] =
true;
859 elseif( isset(
$_GET[
'hide_best_solutions']) )
861 $_SESSION[
'tst_results_show_best_solutions'] =
false;
863 elseif( !isset(
$_SESSION[
'tst_results_show_best_solutions']) )
865 $_SESSION[
'tst_results_show_best_solutions'] =
false;
868 if(
$_SESSION[
'tst_results_show_best_solutions'] )
870 $this->ctrl->setParameter($this,
'hide_best_solutions',
'1');
871 $toolbar->setHideBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
872 $this->ctrl->setParameter($this,
'hide_best_solutions',
'');
876 $this->ctrl->setParameter($this,
'show_best_solutions',
'1');
877 $toolbar->setShowBestSolutionsLinkTarget($this->ctrl->getLinkTarget($this, $this->ctrl->getCmd()));
878 $this->ctrl->setParameterByClass(
'',
'show_best_solutions',
'');
882 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
884 if( $this->object->getFixedParticipants() )
886 $participantData->setUserIds($show_user_results);
890 $participantData->setActiveIds($show_user_results);
892 $participantData->load($this->object->getTestId());
893 $toolbar->setParticipantSelectorOptions($participantData->getOptionArray($show_user_results));
896 $template->setVariable(
'RESULTS_TOOLBAR', $this->ctrl->getHTML($toolbar));
898 include_once
"./Modules/Test/classes/class.ilTestServiceGUI.php";
901 $serviceGUI->setParticipantData($participantData);
904 foreach ($show_user_results as $key => $active_id)
908 if ($this->object->getFixedParticipants())
910 $active_id = $this->
object->getActiveIdOfUser( $active_id );
914 $results = $serviceGUI->getResultsOfUserOutput(
915 $this->testSessionFactory->getSession( $active_id ),
917 $this->object->_getResultPass( $active_id ),
925 if ($count < count( $show_user_results ))
927 $template->touchBlock(
"break" );
929 $template->setCurrentBlock(
"user_result" );
930 $template->setVariable(
"USER_RESULT",
$results );
931 $template->parseCurrentBlock();
936 require_once
'class.ilTestPDFGenerator.php';
950 require_once
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
966 $this->tpl->getStandardTemplate();
978 require_once
'Services/WebDAV/classes/class.ilDAVServer.php';
988 $this->ctrl->redirect($this,
"infoScreen");
993 $this->ctrl->redirectByClass(
"iltestevaluationgui",
"outEvaluation");
1002 if($form->checkInput())
1004 $this->ctrl->setParameter($this,
"new_type", $this->type);
1009 $form->setValuesByPost();
1010 $this->tpl->setContent($form->getHTML());
1015 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
1017 $defaults = $tst->getAvailableDefaults();
1018 if (count($defaults))
1020 foreach ($defaults as
$row)
1022 $a_options[
"tstdef_".$row[
"test_defaults_id"]] = array(
$row[
"name"],
1023 $this->lng->txt(
"tst_default_settings"));
1028 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
1032 foreach($templates as $item)
1034 $a_options[
"tsttpl_".$item[
"id"]] = array($item[
"title"],
1035 nl2br(trim($item[
"description"])));
1049 $testDefaultsId = $tstdef;
1051 $a_new_object->applyDefaults($testDefaults);
1057 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
1060 $template_settings = $template->getSettings();
1061 if($template_settings)
1069 $a_new_object->saveToDb();
1073 $this->ctrl->setParameter($this,
'ref_id', $a_new_object->
getRefId());
1074 $this->ctrl->redirectByClass(
'ilObjTestSettingsGeneralGUI');
1079 include_once
"./Services/Utilities/classes/class.ilUtil.php";
1080 $path = $this->tree->getPathFull($this->object->getRefID());
1089 if ($_FILES[
"xmldoc"][
"error"] > UPLOAD_ERR_OK)
1095 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
1100 $file = pathinfo($_FILES[
"xmldoc"][
"name"]);
1101 $full_path = $basedir.
"/".$_FILES[
"xmldoc"][
"name"];
1108 $subdir = basename(
$file[
"basename"],
".".
$file[
"extension"]);
1114 if(!is_file($qti_file))
1123 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
1125 $result = $qtiParser->startParsing();
1126 $founditems =& $qtiParser->getFoundItems();
1128 if (count($founditems) == 0)
1142 foreach ($founditems as $item)
1144 if (strlen($item[
"type"]))
1164 $_SESSION[
"tst_import_results_file"] = $results_file;
1165 $_SESSION[
"tst_import_xml_file"] = $xml_file;
1166 $_SESSION[
"tst_import_qti_file"] = $qti_file;
1167 $_SESSION[
"tst_import_subdir"] = $subdir;
1169 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.tst_import_verification.html",
"Modules/Test");
1170 $row_class = array(
"tblrow1",
"tblrow2");
1172 foreach ($founditems as $item)
1174 $this->tpl->setCurrentBlock(
"verification_row");
1175 $this->tpl->setVariable(
"ROW_CLASS", $row_class[$counter++ % 2]);
1176 $this->tpl->setVariable(
"QUESTION_TITLE", $item[
"title"]);
1177 $this->tpl->setVariable(
"QUESTION_IDENT", $item[
"ident"]);
1178 include_once
"./Services/QTI/classes/class.ilQTIItem.php";
1179 switch ($item[
"type"])
1183 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMultipleChoice"));
1187 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assSingleChoice"));
1191 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assKprimChoice"));
1195 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assLongMenu"));
1199 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assNumeric"));
1203 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFormulaQuestion"));
1207 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextSubset"));
1211 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assClozeTest"));
1215 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assErrorText"));
1219 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assImagemapQuestion"));
1223 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assJavaApplet"));
1227 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFlashApplet"));
1231 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMatchingQuestion"));
1235 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingQuestion"));
1239 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingHorizontal"));
1243 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextQuestion"));
1247 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assFileUpload"));
1250 $this->tpl->parseCurrentBlock();
1257 $this->tpl->setCurrentBlock(
"adm_content");
1258 $this->tpl->setVariable(
"TEXT_TYPE", $this->lng->txt(
"question_type"));
1259 $this->tpl->setVariable(
"TEXT_TITLE", $this->lng->txt(
"question_title"));
1260 $this->tpl->setVariable(
"FOUND_QUESTIONS_INTRODUCTION", $this->lng->txt(
"tst_import_verify_found_questions"));
1261 $this->tpl->setVariable(
"VERIFICATION_HEADING", $this->lng->txt(
"import_tst"));
1262 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1264 $this->tpl->setVariable(
"QUESTIONPOOL_ID", $QplOrTstID);
1265 $this->tpl->setVariable(
"VALUE_IMPORT", $this->lng->txt(
"import"));
1266 $this->tpl->setVariable(
"VALUE_CANCEL", $this->lng->txt(
"cancel"));
1267 $this->tpl->parseCurrentBlock();
1275 include_once
"./Modules/Test/classes/class.ilObjTest.php";
1279 $newObj->setType(
$_GET[
"new_type"]);
1281 $newObj->setTitle(
"dummy");
1283 $newObj->setDescription(
"test import");
1285 $newObj->create(
true);
1287 $newObj->createReference();
1289 $newObj->putInTree(
$_GET[
"ref_id"]);
1291 $newObj->setPermissions(
$_GET[
"ref_id"]);
1293 $newObj->notify(
"new",
$_GET[
"ref_id"],
$_GET[
"parent_non_rbac_id"],
$_GET[
"ref_id"],$newObj->getRefId());
1295 $newObj->mark_schema->flush();
1298 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
1301 if (!isset(
$_POST[
"qpl"]) ||
"-1" === (
string)
$_POST[
"qpl"])
1303 $qpl_id = $newObj->getId();
1311 if( !isset(
$_POST[
"ident"]) || !is_array(
$_POST[
"ident"]) || !count(
$_POST[
"ident"]) )
1313 $qtiParser->setIgnoreItemsEnabled(
true);
1315 $qtiParser->setTestObject($newObj);
1316 $result = $qtiParser->startParsing();
1317 $newObj->saveToDb();
1320 include_once (
"./Modules/LearningModule/classes/class.ilContObjParser.php");
1322 $contParser->setQuestionMapping($qtiParser->getImportMapping());
1323 $contParser->startParsing();
1325 if( isset(
$_POST[
"ident"]) && is_array(
$_POST[
"ident"]) && count(
$_POST[
"ident"]) == $qtiParser->getFoundItems() )
1328 if (@file_exists(
$_SESSION[
"tst_import_results_file"]))
1330 include_once (
"./Modules/Test/classes/class.ilTestResultsImportParser.php");
1340 $newObj->updateMetaData();
1343 "&baseClass=ilObjTestGUI");
1363 include_once(
"./Modules/File/classes/class.ilObjFile.php");
1365 $fileObj->sendFile();
1374 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
1376 $page_gui->showMediaFullscreen();
1385 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php");
1387 $pg_obj->send_paragraph (
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
1400 $this->questionBrowser();
1412 $this->questionBrowser();
1424 $this->ctrl->redirect($this,
"questions");
1438 $parent_ref =
$tree->getParentId($this->object->getRefId());
1439 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
1441 $qpl->setType(
"qpl");
1442 $qpl->setTitle($name);
1443 $qpl->setDescription($description);
1445 $qpl->createReference();
1446 $qpl->putInTree($parent_ref);
1447 $qpl->setPermissions($parent_ref);
1450 return $qpl->getRefId();
1460 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_random_select.html",
"Modules/Test");
1461 $questionpools =& $this->
object->getAvailableQuestionpools(FALSE, FALSE, FALSE, TRUE);
1462 $this->tpl->setCurrentBlock(
"option");
1463 $this->tpl->setVariable(
"VALUE_OPTION",
"0");
1464 $this->tpl->setVariable(
"TEXT_OPTION", $this->lng->txt(
"all_available_question_pools"));
1465 $this->tpl->parseCurrentBlock();
1466 foreach ($questionpools as $key => $value)
1468 $this->tpl->setCurrentBlock(
"option");
1469 $this->tpl->setVariable(
"VALUE_OPTION", $key);
1470 $this->tpl->setVariable(
"TEXT_OPTION", $value[
"title"]);
1471 $this->tpl->parseCurrentBlock();
1473 $this->tpl->setCurrentBlock(
"hidden");
1474 $this->tpl->setVariable(
"HIDDEN_NAME",
"sel_question_types");
1475 $this->tpl->setVariable(
"HIDDEN_VALUE",
$_POST[
"sel_question_types"]);
1476 $this->tpl->parseCurrentBlock();
1477 $this->tpl->setCurrentBlock(
"adm_content");
1478 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
1479 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_random_select_questionpool"));
1480 $this->tpl->setVariable(
"TXT_NR_OF_QUESTIONS", $this->lng->txt(
"tst_random_nr_of_questions"));
1481 $this->tpl->setVariable(
"BTN_SUBMIT", $this->lng->txt(
"submit"));
1482 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1483 $this->tpl->parseCurrentBlock();
1495 $this->ctrl->redirect($this,
"questions");
1508 $question_array = $this->
object->randomSelectQuestions(
$_POST[
"nr_of_questions"],
$_POST[
"sel_qpl"]);
1509 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_random_question_offer.html",
"Modules/Test");
1510 $color_class = array(
"tblrow1",
"tblrow2");
1512 $questionpools =& $this->
object->getAvailableQuestionpools(
true);
1513 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
1514 foreach ($question_array as $question_id)
1516 $dataset = $this->
object->getQuestionDataset($question_id);
1517 $this->tpl->setCurrentBlock(
"QTab");
1518 $this->tpl->setVariable(
"COLOR_CLASS", $color_class[$counter % 2]);
1519 $this->tpl->setVariable(
"QUESTION_TITLE", $dataset->title);
1520 $this->tpl->setVariable(
"QUESTION_COMMENT", $dataset->description);
1522 $this->tpl->setVariable(
"QUESTION_AUTHOR", $dataset->author);
1523 $this->tpl->setVariable(
"QUESTION_POOL", $questionpools[$dataset->obj_fi][
"title"]);
1524 $this->tpl->parseCurrentBlock();
1527 if (count($question_array) == 0)
1529 $this->tpl->setCurrentBlock(
"Emptytable");
1530 $this->tpl->setVariable(
"TEXT_NO_QUESTIONS_AVAILABLE", $this->lng->txt(
"no_questions_available"));
1531 $this->tpl->parseCurrentBlock();
1535 $this->tpl->setCurrentBlock(
"Selectionbuttons");
1536 $this->tpl->setVariable(
"BTN_YES", $this->lng->txt(
"random_accept_sample"));
1537 $this->tpl->setVariable(
"BTN_NO", $this->lng->txt(
"random_another_sample"));
1538 $this->tpl->parseCurrentBlock();
1540 $chosen_questions = join($question_array,
",");
1541 $this->tpl->setCurrentBlock(
"adm_content");
1542 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
1543 $this->tpl->setVariable(
"QUESTION_TITLE", $this->lng->txt(
"tst_question_title"));
1544 $this->tpl->setVariable(
"QUESTION_COMMENT", $this->lng->txt(
"description"));
1545 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"tst_question_type"));
1546 $this->tpl->setVariable(
"QUESTION_AUTHOR", $this->lng->txt(
"author"));
1547 $this->tpl->setVariable(
"QUESTION_POOL", $this->lng->txt(
"qpl"));
1548 $this->tpl->setVariable(
"VALUE_CHOSEN_QUESTIONS", $chosen_questions);
1549 $this->tpl->setVariable(
"VALUE_QUESTIONPOOL_SELECTION",
$_POST[
"sel_qpl"]);
1550 $this->tpl->setVariable(
"VALUE_NR_OF_QUESTIONS",
$_POST[
"nr_of_questions"]);
1551 $this->tpl->setVariable(
"TEXT_QUESTION_OFFER", $this->lng->txt(
"tst_question_offer"));
1552 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1553 $this->tpl->parseCurrentBlock();
1565 $selected_array = split(
",",
$_POST[
"chosen_questions"]);
1566 if (!count($selected_array))
1572 $total = $this->
object->evalTotalPersons();
1582 foreach ($selected_array as $key => $value)
1584 $this->
object->insertQuestion( $this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value );
1586 $this->
object->saveCompleteStatus( $this->testQuestionSetConfigFactory->getQuestionSetConfig() );
1588 $this->ctrl->redirect($this,
"questions");
1595 $this->questionBrowser();
1613 include_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
1616 else if(isset(
$_REQUEST[
'sel_question_types']))
1618 $sel_question_types =
$_REQUEST[
"sel_question_types"];
1621 if (!$qpl_mode || ($qpl_mode == 2 && strcmp(
$_REQUEST[
"txt_qpl"],
"") == 0) || ($qpl_mode == 3 && strcmp($qpl_ref_id,
"") == 0))
1625 $_REQUEST[
'sel_question_types'] = $sel_question_types;
1632 $_SESSION[
"test_id"] = $this->
object->getRefId();
1633 if ($qpl_mode == 2 && strcmp(
$_REQUEST[
"txt_qpl"],
"") != 0)
1638 else if ($qpl_mode == 1)
1640 $qpl_ref_id =
$_GET[
"ref_id"];
1643 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php";
1644 $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;
1648 $baselink .=
'&prev_qid=' .
$_REQUEST[
'prev_qid'];
1652 $baselink .=
'&prev_qid=' .
$_REQUEST[
'position'];
1656 $baselink .=
'&test_express_mode=1';
1659 if( isset(
$_REQUEST[
'add_quest_cont_edit_mode']) )
1662 $baselink,
"add_quest_cont_edit_mode={$_REQUEST['add_quest_cont_edit_mode']}",
false
1666#var_dump($_REQUEST['prev_qid']);
1682 $this->ctrl->redirect($this,
"questions");
1697 $questionpools =& $this->
object->getAvailableQuestionpools(FALSE, FALSE, FALSE, TRUE, FALSE,
"write");
1699 if ($this->object->getPoolUsage()) {
1702 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
1705 $form->setFormAction(
$ilCtrl->getFormAction($this,
"executeCreateQuestion"));
1706 $form->setTitle(
$lng->txt(
"ass_create_question"));
1707 include_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
1711 $hidden->setValue(
$_REQUEST[
"sel_question_types"]);
1712 $form->addItem($hidden);
1720 $lng->txt(
'tst_add_quest_cont_edit_mode_default'),
1725 $lng->txt(
'tst_add_quest_cont_edit_mode_page_object'),
1731 $form->addItem($ri,
true);
1737 $form->addItem($hi,
true);
1742 $usage->setRequired(
true);
1743 $no_pool =
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
1744 $usage->addOption($no_pool);
1745 $existing_pool =
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
1746 $usage->addOption($existing_pool);
1747 $new_pool =
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
1748 $usage->addOption($new_pool);
1749 $form->addItem($usage);
1751 $usage->setValue(1);
1754 $pools_data = array();
1755 foreach($questionpools as $key => $p) {
1756 $pools_data[$key] = $p[
'title'];
1758 $pools =
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"),
"sel_qpl");
1759 $pools->setOptions($pools_data);
1760 $existing_pool->addSubItem($pools);
1763 $this->lng->loadLanguageModule(
'rbac');
1764 $name =
new ilTextInputGUI($this->lng->txt(
"rbac_create_qpl"),
"txt_qpl");
1766 $name->setMaxLength(50);
1767 $new_pool->addSubItem($name);
1769 $form->addCommandButton(
"executeCreateQuestion",
$lng->txt(
"submit"));
1770 $form->addCommandButton(
"cancelCreateQuestion",
$lng->txt(
"cancel"));
1772 return $this->tpl->setVariable(
'ADM_CONTENT', $form->getHTML());
1778 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'sel_question_types',
$_REQUEST[
"sel_question_types"]);
1779 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'add_quest_cont_edit_mode',
$_REQUEST[
"add_quest_cont_edit_mode"]);
1780 $link =
$ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'handleToolbarCommand',
'',
false,
false);
1790 $removeQuestionIds = (array)
$_POST[
"q_id"];
1792 $questions = $this->
object->getQuestionTitlesAndIndexes();
1794 $this->
object->removeQuestions($removeQuestionIds);
1796 $this->
object->saveCompleteStatus( $this->testQuestionSetConfigFactory->getQuestionSetConfig() );
1804 $deleted_tmp = $removeQuestionIds;
1805 $first = array_shift($deleted_tmp);
1806 foreach((array)$questions as $key => $value)
1808 if(!in_array($key, $removeQuestionIds))
1818 else if($key == $first)
1825 $first = array_shift($deleted_tmp);
1830 count($questions) == count($removeQuestionIds) ||
1834 $this->ctrl->setParameter($this,
'q_id',
'');
1835 $this->ctrl->redirect($this,
'showPage');
1838 $this->ctrl->setParameter($this,
'q_id', $return_to);
1839 $this->ctrl->redirect($this,
"showPage");
1843 $this->ctrl->setParameter($this,
'q_id',
'');
1844 $this->ctrl->redirect($this,
'questions');
1858 $this->ctrl->setParameter($this,
'q_id',
$_REQUEST[
'q_id']);
1859 $this->ctrl->redirect($this,
"showPage");
1862 $this->ctrl->redirect($this,
"questions");
1875 $total = $this->
object->evalTotalPersons();
1879 $question = sprintf($this->lng->txt(
"tst_remove_questions_and_results"),
$total);
1883 if (count($checked_questions) == 1)
1885 $question = $this->lng->txt(
"tst_remove_question");
1889 $question = $this->lng->txt(
"tst_remove_questions");
1893 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1895 $cgui->setHeaderText($question);
1897 $this->ctrl->saveParameter($this,
'test_express_mode');
1898 $this->ctrl->saveParameter($this,
'q_id');
1900 $cgui->setFormAction($this->ctrl->getFormAction($this));
1901 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelRemoveQuestions");
1902 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmRemoveQuestions");
1904 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
1905 $removablequestions =& $this->
object->getTestQuestions();
1906 if (count($removablequestions))
1908 foreach ($removablequestions as
$data)
1910 if (in_array(
$data[
"question_id"], $checked_questions))
1913 $txt .=
' ['. $this->lng->txt(
'question_id_short') .
': ' .
$data[
'question_id'] .
']';
1915 if(
$data[
"description"])
1917 $txt .=
"<div class=\"small\">".$data[
"description"].
"</div>";
1920 $cgui->addItem(
"q_id[]",
$data[
"question_id"],
$txt);
1925 $this->tpl->setContent($cgui->getHTML());
1939 if (!is_array($checked_questions) && $checked_questions) {
1940 $checked_questions = array($checked_questions);
1942 if (count($checked_questions) > 0)
1947 elseif (count($checked_questions) == 0)
1950 $this->ctrl->redirect($this,
"questions");
1959 $selected_questions = NULL;
1960 $selected_questions =
$_POST[
'q_id'];
1961 if (is_array($selected_questions))
1963 $_SESSION[
'tst_qst_move_' . $this->
object->getTestId()] =
$_POST[
'q_id'];
1970 $this->ctrl->redirect($this,
'questions');
1979 $move_questions =
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
1981 if (count(
$_POST[
'q_id']) == 0)
1984 $this->ctrl->redirect($this,
'questions');
1986 if (count(
$_POST[
'q_id']) > 1)
1989 $this->ctrl->redirect($this,
'questions');
1992 $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()],
$_POST[
'q_id'][0], $insert_mode);
1994 unset(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]);
1995 $this->ctrl->redirect($this,
"questions");
2004 $move_questions =
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
2005 if (count(
$_POST[
'q_id']) == 0)
2008 $this->ctrl->redirect($this,
'questions');
2010 if (count(
$_POST[
'q_id']) > 1)
2013 $this->ctrl->redirect($this,
'questions');
2016 $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()],
$_POST[
'q_id'][0], $insert_mode);
2018 unset(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]);
2019 $this->ctrl->redirect($this,
"questions");
2029 $selected_array = (is_array(
$_POST[
'q_id'])) ?
$_POST[
'q_id'] : array();
2030 if (!count($selected_array))
2033 $this->ctrl->redirect($this,
"browseForQuestions");
2037 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
2038 $manscoring = FALSE;
2039 foreach ($selected_array as $key => $value)
2041 $this->
object->insertQuestion( $this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value );
2047 $this->
object->saveCompleteStatus( $this->testQuestionSetConfigFactory->getQuestionSetConfig() );
2056 $this->ctrl->redirect($this,
"questions");
2065 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
2071 $form->setFormAction(
$ilCtrl->getFormAction($this,
"executeCreateQuestion"));
2072 $form->setTitle(
$lng->txt(
"ass_create_question"));
2073 include_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
2076 $questionTypes = $pool->getQuestionTypes(
false,
true);
2080 foreach($questionTypes as $label =>
$data)
2085 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
2088 $form->addItem(
$si,
true);
2091 $questions = $this->
object->getQuestionTitlesAndIndexes();
2096 foreach($questions as $key => $title)
2098 $options[$key] =
$lng->txt(
'behind') .
' '. $title .
' ['.$this->lng->txt(
'question_id_short') .
': '. $key .
']';
2102 $form->addItem(
$si,
true);
2111 $lng->txt(
'tst_add_quest_cont_edit_mode_default'),
2116 $lng->txt(
'tst_add_quest_cont_edit_mode_page_object'),
2122 $form->addItem($ri,
true);
2128 $form->addItem($hi,
true);
2131 if($this->object->getPoolUsage())
2135 $usage->setRequired(
true);
2136 $no_pool =
new ilRadioOption($this->lng->txt(
"assessment_no_pool"), 1);
2137 $usage->addOption($no_pool);
2138 $existing_pool =
new ilRadioOption($this->lng->txt(
"assessment_existing_pool"), 3);
2139 $usage->addOption($existing_pool);
2140 $new_pool =
new ilRadioOption($this->lng->txt(
"assessment_new_pool"), 2);
2141 $usage->addOption($new_pool);
2142 $form->addItem($usage);
2144 $usage->setValue(1);
2147 $pools_data = array();
2148 foreach($questionpools as $key => $p)
2150 $pools_data[$key] = $p[
'title'];
2152 $pools =
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"),
"sel_qpl");
2153 $pools->setOptions($pools_data);
2154 $existing_pool->addSubItem($pools);
2158 $name->setMaxLength(50);
2159 $new_pool->addSubItem($name);
2162 $form->addCommandButton(
"executeCreateQuestion",
$lng->txt(
"create"));
2163 $form->addCommandButton(
"questions",
$lng->txt(
"cancel"));
2165 return $tpl->setContent($form->getHTML());
2170 global $ilAccess, $ilTabs;
2172 $ilTabs->activateTab(
'assQuestions');
2175 $this->ctrl->setParameter($this,
'test_express_mode',
'');
2177 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
2181 $this->ctrl->redirect($this,
"infoScreen");
2184 if (
$_GET[
'browse'])
2186 return $this->questionbrowser();
2192 $this->ctrl->setParameter($this,
'q_id',
'');
2196 ilUtil::redirect(
"ilias.php?baseClass=ilObjQuestionPoolGUI&ref_id=" .
$_GET[
"eqpl"] .
"&cmd=editQuestionForTest&calling_test=".
$_GET[
"ref_id"].
"&q_id=" .
$_GET[
"eqid"]);
2199 if (
$_GET[
"up"] > 0)
2201 $this->
object->questionMoveUp(
$_GET[
"up"]);
2203 if (
$_GET[
"down"] > 0)
2205 $this->
object->questionMoveDown(
$_GET[
"down"]);
2210 $selected_array = array();
2211 array_push($selected_array,
$_GET[
"add"]);
2212 $total = $this->
object->evalTotalPersons();
2222 $this->insertQuestions($selected_array);
2226 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_questions.html",
"Modules/Test");
2228 $total = $this->
object->evalTotalPersons();
2229 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
2233 $link = $this->ctrl->getLinkTarget($this,
"participants");
2234 $link =
"<a href=\"".$link.
"\">".$this->lng->txt(
"test_has_datasets_warning_page_view_link").
"</a>";
2235 ilUtil::sendInfo($this->lng->txt(
"test_has_datasets_warning_page_view").
" ".$link);
2240 $ilToolbar->addButton($this->lng->txt(
"ass_create_question"), $this->ctrl->getLinkTarget($this,
"addQuestion"));
2242 if( $this->object->getPoolUsage() )
2244 $ilToolbar->addSeparator();
2246 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
2251 $ilToolbar->addSeparator();
2252 $ilToolbar->addButton($this->lng->txt(
"random_selection"), $this->ctrl->getLinkTarget($this,
"randomselect"));
2256 $online_access =
false;
2257 if ($this->object->getFixedParticipants())
2259 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
2261 if ($online_access_result ===
true)
2263 $online_access =
true;
2267 if( $this->object->isOnline() && $this->object->isComplete( $this->testQuestionSetConfigFactory->getQuestionSetConfig() ) )
2269 if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id))
2271 $testSession = $this->testSessionFactory->getSession();
2272 $testSequence = $this->testSequenceFactory->getSequenceByTestSession($testSession);
2274 $testPlayerGUI = $this->testPlayerFactory->getPlayerGUI();
2276 $executable = $this->
object->isExecutable($testSession,
$ilUser->getId(), $allowPassIncrease = TRUE);
2278 if ($executable[
"executable"])
2280 if ($testSession->getActiveId() > 0)
2284 if ($testSequence->hasStarted($testSession))
2286 $execTestLabel = $this->lng->txt(
"tst_resume_test");
2287 $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI,
'resumePlayer');
2291 $execTestLabel = $this->
object->getStartTestLabel($testSession->getActiveId());
2292 $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI,
'startPlayer');
2299 $execTestLabel = $this->
object->getStartTestLabel($testSession->getActiveId());
2300 $execTestLink = $this->ctrl->getLinkTarget($testPlayerGUI,
'startPlayer');
2303 $ilToolbar->addSeparator();
2304 $ilToolbar->addButton($execTestLabel, $execTestLink);
2313 $this->tpl->setCurrentBlock(
"adm_content");
2314 include_once
"./Modules/Test/classes/tables/class.ilTestQuestionsTableGUI.php";
2315 $checked_move = is_array(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]) && (count(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]));
2316 $table_gui =
new ilTestQuestionsTableGUI($this,
'questions', (($ilAccess->checkAccess(
"write",
"", $this->ref_id) ?
true :
false)), $checked_move,
$total);
2317 $data = $this->
object->getTestQuestions();
2318 $table_gui->setData(
$data);
2319 $this->tpl->setVariable(
'QUESTIONBROWSER', $table_gui->getHTML());
2320 $this->tpl->setVariable(
"ACTION_QUESTION_FORM", $this->ctrl->getFormAction($this));
2321 $this->tpl->parseCurrentBlock();
2330 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
2357 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
2360 $participantData->load($this->object->getTestId());
2362 $this->
object->removeTestResults($participantData);
2365 $this->ctrl->redirect($this,
"participants");
2379 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
2382 if( $this->object->getFixedParticipants() )
2384 $participantData->setUserIds(
$_POST[
"chbUser"]);
2388 $participantData->setActiveIds(
$_POST[
"chbUser"]);
2391 $participantData->load($this->object->getTestId());
2393 $this->
object->removeTestResults($participantData);
2396 $this->ctrl->redirect($this,
"participants");
2408 $this->ctrl->redirect($this,
"participants");
2423 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_maintenance.html",
"Modules/Test");
2425 $this->tpl->setCurrentBlock(
"confirm_delete");
2426 $this->tpl->setVariable(
"BTN_CONFIRM_DELETE_ALL", $this->lng->txt(
"confirm"));
2427 $this->tpl->setVariable(
"BTN_CANCEL_DELETE_ALL", $this->lng->txt(
"cancel"));
2428 $this->tpl->parseCurrentBlock();
2430 $this->tpl->setCurrentBlock(
"adm_content");
2431 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
2432 $this->tpl->parseCurrentBlock();
2441 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2443 $cgui->setFormAction($this->ctrl->getFormAction($this,
"participants"));
2444 $cgui->setHeaderText($this->lng->txt(
"delete_all_user_data_confirmation"));
2445 $cgui->setCancel($this->lng->txt(
"cancel"),
"participants");
2446 $cgui->setConfirm($this->lng->txt(
"proceed"),
"confirmDeleteAllUserResults");
2448 $this->tpl->setContent($cgui->getHTML());
2460 if (count(
$_POST[
"chbUser"]) == 0)
2463 $this->ctrl->redirect($this,
"participants");
2466 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
2468 $cgui->setHeaderText($this->lng->txt(
"confirm_delete_single_user_data"));
2470 $cgui->setFormAction($this->ctrl->getFormAction($this));
2471 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDeleteSelectedUserData");
2472 $cgui->setConfirm($this->lng->txt(
"confirm"),
"confirmDeleteSelectedUserData");
2474 include_once
'./Services/User/classes/class.ilObjUser.php';
2475 foreach (
$_POST[
"chbUser"] as $key => $active_id)
2477 if ($this->object->getFixedParticipants())
2479 $user_id = $active_id;
2483 $user_id = $this->
object->_getUserIdFromActiveId($active_id);
2487 if ($this->object->getAnonymity())
2489 $name = $this->lng->txt(
"anonymous");
2491 else if($user[
"lastname"])
2493 $name = $user[
"lastname"].
", ".$user[
"firstname"].
" (".
2498 $name = $this->lng->txt(
"deleted_user");
2501 $cgui->addItem(
"chbUser[]", $active_id, $name,
2505 $this->tpl->setContent($cgui->getHTML());
2517 include_once
"./Modules/Test/classes/tables/class.ilTestHistoryTableGUI.php";
2519 $table_gui->setTestObject($this->
object);
2520 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
2522 $table_gui->setData(
$log);
2523 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2528 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2530 $form->setTarget(
"_top");
2532 $this->ctrl->setParameter($this,
"new_type", $new_type);
2533 $form->setFormAction($this->ctrl->getFormAction($this));
2534 $form->setTitle($this->lng->txt(
"import_tst"));
2537 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
2538 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"xmldoc");
2539 $fi->setSuffixes(array(
"zip"));
2540 $fi->setRequired(
true);
2541 $form->addItem($fi);
2544 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
2546 $questionpools = $tst->getAvailableQuestionpools(TRUE, FALSE, TRUE, TRUE);
2547 if (count($questionpools))
2549 $options = array(
"-1" => $this->lng->txt(
"dont_use_questionpool"));
2550 foreach ($questionpools as $key => $value)
2555 $pool =
new ilSelectInputGUI($this->lng->txt(
"select_questionpool"),
"qpl");
2557 $form->addItem($pool);
2560 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
2561 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
2573 $command =
$_POST[
"command"];
2574 if (strlen($command))
2576 $method = $command .
"Object";
2577 if (method_exists($this, $method))
2583 $this->ctrl->redirect($this,
"participants");
2593 global $ilAccess, $ilToolbar,
$lng;
2597 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
2601 $this->ctrl->redirect($this,
"infoScreen");
2604 if( $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken() )
2607 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->getDepenciesBrokenMessage($this->lng)
2610 elseif( $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesInVulnerableState() )
2613 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->getDepenciesInVulnerableStateMessage($this->lng)
2617 if ($this->object->getFixedParticipants())
2620 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
2625 'auto_complete_name' =>
$lng->txt(
'user'),
2626 'submit_name' =>
$lng->txt(
'add')
2630 $ilToolbar->addSeparator();
2632 $search_btn->setCaption(
'tst_search_users');
2633 $search_btn->setUrl($this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
2634 $ilToolbar->addButtonInstance($search_btn);
2635 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
2637 $participants =& $this->
object->getInvitedUsers();
2639 foreach ($participants as
$data)
2641 $maxpass = $this->
object->_getMaxPass($data[
"active_id"]);
2642 if (!is_null($maxpass))
2647 if (strlen(
$data[
"active_id"]))
2649 $last_access = $this->
object->_getLastAccess($data[
"active_id"]);
2650 $access = $last_access;
2652 $this->ctrl->setParameterByClass(
'iltestevaluationgui',
'active_id',
$data[
'active_id']);
2654 if (
$data[
'active_id'] ==
null)
2656 if ( strlen(
$data[
"firstname"].
$data[
"lastname"]) == 0 )
2658 $fullname =
$lng->txt(
"deleted_user");
2660 else if($this->object->getAnonymity())
2662 $fullname =
$lng->txt(
'anonymous');
2666 $fullname = trim(
$data[
"lastname"] .
", " .
$data[
"firstname"] .
" " .
$data[
"title"]);
2669 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
2673 array_push($rows, array(
2674 'usr_id' =>
$data[
"usr_id"],
2675 'active_id' =>
$data[
'active_id'],
2676 'login' =>
$data[
"login"],
2677 'clientip' =>
$data[
"clientip"],
2678 'firstname' =>
$data[
"firstname"],
2679 'lastname' =>
$data[
"lastname"],
2680 'name' => $fullname,
2681 'started' => (
$data[
"active_id"] > 0) ? 1 : 0,
2682 'finished' => (
$data[
"test_finished"] == 1) ? 1 : 0,
2683 'access' => $access,
2684 'maxpass' => $maxpass,
2685 'result' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'outParticipantsResultsOverview')
2688 include_once
"./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php";
2690 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken(),
2691 $this->object->getAnonymity(), count($rows)
2693 $table_gui->setFilterCommand(
'fpSetFilter');
2694 $table_gui->setResetCommand(
'fpResetFiler');
2696 $table_gui->setData($rows);
2697 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2699 if(count($rows) > 0)
2701 $ilToolbar->addSeparator();
2703 $delete_all_results_btn->setCaption(
'delete_all_user_data');
2704 $delete_all_results_btn->setUrl($this->ctrl->getLinkTarget($this,
'deleteAllUserResults'));
2705 $ilToolbar->addButtonInstance($delete_all_results_btn);
2710 $participants =& $this->
object->getTestParticipants();
2712 foreach ($participants as
$data)
2714 $maxpass = $this->
object->_getMaxPass($data[
"active_id"]);
2715 if (!is_null($maxpass))
2720 if (strlen(
$data[
"active_id"]))
2722 $last_access = $this->
object->_getLastAccess($data[
"active_id"]);
2723 $access = $last_access;
2725 $this->ctrl->setParameterByClass(
'iltestevaluationgui',
'active_id',
$data[
'active_id']);
2727 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
2729 array_push($rows, array(
2730 'usr_id' =>
$data[
"active_id"],
2731 'active_id' =>
$data[
'active_id'],
2732 'login' =>
$data[
"login"],
2733 'name' => $fullname,
2734 'firstname' =>
$data[
"firstname"],
2735 'lastname' =>
$data[
"lastname"],
2736 'started' => (
$data[
"active_id"] > 0) ? 1 : 0,
2737 'finished' => (
$data[
"test_finished"] == 1) ? 1 : 0,
2738 'access' => $access,
2739 'maxpass' => $maxpass,
2740 'result' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'outParticipantsResultsOverview')
2743 include_once
"./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php";
2745 $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken(),
2746 $this->object->getAnonymity(), count($rows)
2749 if(count($rows) > 0)
2751 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
2753 $delete_all_results_btn->setCaption(
'delete_all_user_data');
2754 $delete_all_results_btn->setUrl($this->ctrl->getLinkTarget($this,
'deleteAllUserResults'));
2755 $ilToolbar->addStickyItem($delete_all_results_btn);
2758 $table_gui->setFilterCommand(
'npSetFilter');
2759 $table_gui->setResetCommand(
'npResetFilter');
2761 $table_gui->setData($rows);
2762 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2770 include_once
"./Modules/Test/classes/tables/class.ilTimingOverviewTableGUI.php";
2773 $participants =& $this->
object->getTestParticipants();#
2774 $times = $this->
object->getStartingTimeOfParticipants();
2775 $addons = $this->
object->getTimeExtensionsOfParticipants();
2777 $tbl_data = array();
2778 foreach ($participants as $participant)
2783 if ($times[$participant[
'active_id']])
2786 $tblRow[
'started'] = $started;
2790 $tblRow[
'started'] =
'';
2793 if ($addons[$participant[
'active_id']] > 0)
2795 $tblRow[
'extratime'] = $addons[$participant[
'active_id']];
2798 $tblRow[
'login'] = $participant[
'login'];
2800 if ($this->object->getAnonymity())
2802 $tblRow[
'name'] = $this->lng->txt(
"anonymous");
2806 $tblRow[
'name'] = $participant[
'lastname'] .
', ' . $participant[
'firstname'];
2809 $tbl_data[] = $tblRow;
2811 $table_gui->setData($tbl_data);
2813 $this->tpl->setContent($table_gui->getHTML());
2822 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
2826 $this->ctrl->redirect($this,
"infoScreen");
2829 if ($this->object->getProcessingTimeInSeconds() > 0 && $this->object->getNrOfTries() == 1)
2832 if (count(
$_POST) && $form->checkInput())
2834 $res = $this->
object->addExtraTime($form->getInput(
'participant'), $form->getInput(
'extratime'));
2835 ilUtil::sendSuccess(sprintf($this->lng->txt(
'tst_extratime_added'), $form->getInput(
'extratime')),
true);
2836 $this->ctrl->redirect($this,
'timingOverview');
2840 return $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
2853 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2855 $form->setFormAction($this->ctrl->getFormAction($this));
2856 $form->setTableWidth(
"100%");
2857 $form->setId(
"tst_change_workingtime");
2858 $form->setTitle($this->lng->txt(
"tst_change_workingtime"));
2861 $participantslist =
new ilSelectInputGUI($this->lng->txt(
'participants'),
"participant");
2862 $participants =& $this->
object->getTestParticipants();
2863 $times = $this->
object->getStartingTimeOfParticipants();
2864 $addons = $this->
object->getTimeExtensionsOfParticipants();
2866 '' => $this->lng->txt(
'please_select'),
2867 '0' => $this->lng->txt(
'all_participants')
2869 foreach ($participants as $participant)
2873 if ($this->object->getAnonymity())
2875 $name = $this->lng->txt(
"anonymous");
2879 $name = $participant[
'lastname'] .
', ' . $participant[
'firstname'];
2883 if ($times[$participant[
'active_id']])
2887 if ($addons[$participant[
'active_id']] > 0) $started .=
", " . $this->lng->txt(
'extratime') .
': ' . $addons[$participant[
'active_id']] .
' ' . $this->lng->txt(
'minutes');
2888 $options[$participant[
'active_id']] = $participant[
'login'] .
' (' .$name.
')'.$started;
2890 $participantslist->setRequired(
true);
2891 $participantslist->setOptions(
$options);
2892 $form->addItem($participantslist);
2895 $extratime =
new ilNumberInputGUI($this->lng->txt(
"extratime"),
"extratime");
2896 $extratime->setInfo($this->lng->txt(
'tst_extratime_info'));
2897 $extratime->setRequired(
true);
2898 $extratime->setMinValue(0);
2899 $extratime->setMinvalueShouldBeGreater(
false);
2900 $extratime->setSuffix($this->lng->txt(
'minutes'));
2901 $extratime->setSize(5);
2902 $form->addItem($extratime);
2904 if (is_array(
$_POST) && strlen(
$_POST[
'cmd'][
'timing'])) $form->setValuesByArray(
$_POST);
2906 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) $form->addCommandButton(
"timing", $this->lng->txt(
"save"));
2907 $form->addCommandButton(
'timingOverview', $this->lng->txt(
"cancel"));
2914 $this->tpl->setContent($form->getHTML());
2921 $sess_filter = str_replace(
'"',
'',$sess_filter);
2922 $sess_filter = explode(
':', $sess_filter);
2923 $filter = substr($sess_filter[2],0, strlen($sess_filter[2])-1);
2925 if ($filter ==
'all' || $filter ==
false)
2927 return $in_rows; #unchanged - no filter.
2930 $with_result = array();
2931 $without_result = array();
2932 foreach ($in_rows as
$row)
2935 'SELECT count(solution_id) count
2937 WHERE active_fi = ' .
$ilDB->quote(
$row[
'active_id'])
2940 $count = $count[
'count'];
2944 $without_result[] =
$row;
2948 $with_result[] =
$row;
2952 if ($filter ==
'withSolutions')
2954 return $with_result;
2956 return $without_result;
2962 include_once(
"./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php");
2964 $table_gui->writeFilterToSession();
2965 $table_gui->resetOffset();
2971 include_once(
"./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php");
2973 $this,
"participants",
false, $this->object->getAnonymity(), 0
2975 $table_gui->resetFilter();
2976 $table_gui->resetOffset();
2982 include_once(
"./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php");
2984 $this,
"participants",
false, $this->object->getAnonymity(), 0
2986 $table_gui->writeFilterToSession();
2987 $table_gui->resetOffset();
2994 include_once(
"./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php");
2996 $this,
"participants",
false, $this->object->getAnonymity(), 0
2998 $table_gui->resetFilter();
2999 $table_gui->resetOffset();
3015 $this->
showUserResults($show_pass_details = TRUE, $show_answers = TRUE, $show_reached_points = TRUE);
3029 $this->
showUserResults($show_pass_details = FALSE, $show_answers = TRUE);
3043 $this->
showUserResults($show_pass_details = TRUE, $show_answers = FALSE);
3053 $show_user_results =
$_SESSION[
"show_user_results"];
3055 if (count($show_user_results) == 0)
3058 $this->ctrl->redirect($this,
"participants");
3062 $template = $this->
createUserResults( $show_pass_details, $show_answers, $show_reached_points, $show_user_results);
3066 $this->tpl->setVariable(
"ADM_CONTENT", $template->get());
3068 if ($this->object->getShowSolutionAnswersOnly())
3077 if (is_array(
$_POST[
"chbUser"]))
3079 foreach (
$_POST[
"chbUser"] as $user_id)
3081 $this->
object->disinviteUser($user_id);
3088 $this->ctrl->redirect($this,
"participants");
3093 if (is_array(
$_POST[
"chbUser"]))
3095 foreach (
$_POST[
"chbUser"] as $user_id)
3097 $this->
object->setClientIP($user_id,
$_POST[
"clientip_".$user_id]);
3104 $this->ctrl->redirect($this,
"participants");
3116 global $ilAccess,
$ilias;
3117 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
3121 $this->ctrl->redirect($this,
"infoScreen");
3124 $isPdfDeliveryRequest = isset(
$_GET[
'pdf']) &&
$_GET[
'pdf'];
3127 $template =
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html", TRUE, TRUE,
"Modules/Test");
3129 if(!$isPdfDeliveryRequest)
3131 $this->ctrl->setParameter($this,
"pdf",
"1");
3132 $template->setCurrentBlock(
"pdf_export");
3133 $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this,
"print"));
3134 $this->ctrl->setParameter($this,
"pdf",
"");
3135 $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
3136 $template->parseCurrentBlock();
3138 $template->setCurrentBlock(
"navigation_buttons");
3139 $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
3140 $template->parseCurrentBlock();
3146 $print_date = mktime(date(
"H"), date(
"i"), date(
"s"), date(
"m") , date(
"d"), date(
"Y"));
3150 require_once
'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
3152 $questionHeaderBlockBuilder->setHeaderMode($this->object->getTitleOutput());
3154 if($isPdfDeliveryRequest)
3156 require_once
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
3160 foreach ($this->object->questions as $question)
3162 $template->setCurrentBlock(
"question");
3163 $question_gui = $this->
object->createQuestionGUI(
"", $question);
3165 if( $isPdfDeliveryRequest )
3170 $questionHeaderBlockBuilder->setQuestionTitle($question_gui->object->getTitle());
3171 $questionHeaderBlockBuilder->setQuestionPoints($question_gui->object->getMaximumPoints());
3172 $questionHeaderBlockBuilder->setQuestionPosition($counter);
3173 $template->setVariable(
"QUESTION_HEADER", $questionHeaderBlockBuilder->getHTML());
3175 $template->setVariable(
"TXT_QUESTION_ID", $this->lng->txt(
'question_id_short'));
3176 $template->setVariable(
"QUESTION_ID", $question_gui->object->getId());
3177 $result_output = $question_gui->getSolutionOutput(
"", NULL, FALSE, TRUE, FALSE, $this->object->getShowSolutionFeedback());
3178 if (strlen($result_output) == 0) $result_output = $question_gui->getPreview(FALSE);
3179 $template->setVariable(
"SOLUTION_OUTPUT", $result_output);
3180 $template->parseCurrentBlock(
"question");
3182 $max_points += $question_gui->object->getMaximumPoints();
3192 if( $isPdfDeliveryRequest )
3194 require_once
'class.ilTestPDFGenerator.php';
3199 $this->tpl->setVariable(
"PRINT_CONTENT", $template->get());
3210 function reviewobject()
3212 global $ilAccess,
$ilias;
3213 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
3217 $this->ctrl->redirect($this,
"infoScreen");
3220 $template =
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html", TRUE, TRUE,
"Modules/Test");
3224 $isPdfDeliveryRequest = isset(
$_GET[
'pdf']) &&
$_GET[
'pdf'];
3227 $print_date = mktime(date(
"H"), date(
"i"), date(
"s"), date(
"m") , date(
"d"), date(
"Y"));
3231 require_once
'Modules/Test/classes/class.ilTestQuestionHeaderBlockBuilder.php';
3233 $questionHeaderBlockBuilder->setHeaderMode($this->object->getTitleOutput());
3235 if($isPdfDeliveryRequest)
3237 require_once
'Services/WebAccessChecker/classes/class.ilWACSignedPath.php';
3241 foreach ($this->object->questions as $question)
3243 $template->setCurrentBlock(
"question");
3244 $question_gui = $this->
object->createQuestionGUI(
"", $question);
3246 $questionHeaderBlockBuilder->setQuestionTitle($question_gui->object->getTitle());
3247 $questionHeaderBlockBuilder->setQuestionPoints($question_gui->object->getMaximumPoints());
3248 $questionHeaderBlockBuilder->setQuestionPosition($counter);
3249 $template->setVariable(
"QUESTION_HEADER", $questionHeaderBlockBuilder->getHTML());
3253 $result_output = $question_gui->getPreview(
false);
3255 if (strlen($result_output) == 0) $result_output = $question_gui->getPreview(FALSE);
3256 $template->setVariable(
"SOLUTION_OUTPUT", $result_output);
3257 $template->parseCurrentBlock(
"question");
3259 $max_points += $question_gui->object->getMaximumPoints();
3271 if($isPdfDeliveryRequest)
3273 require_once
'class.ilTestPDFGenerator.php';
3278 $this->ctrl->setParameter($this,
"pdf",
"1");
3279 $template->setCurrentBlock(
"pdf_export");
3280 $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this,
"review"));
3281 $this->ctrl->setParameter($this,
"pdf",
"");
3282 $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
3283 $template->parseCurrentBlock();
3285 $template->setCurrentBlock(
"navigation_buttons");
3286 $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
3287 $template->parseCurrentBlock();
3290 $this->tpl->setVariable(
"PRINT_CONTENT", $template->get());
3298 if (is_array($a_user_ids))
3301 foreach ($a_user_ids as $user_id)
3303 $client_ip =
$_POST[
"client_ip"][$i];
3304 $this->
object->inviteUser($user_id, $client_ip);
3312 $message = $this->lng->txt(
"tst_invited_selected_users");
3314 if (strlen($message))
3324 $this->ctrl->redirect($this,
"participants");
3330 public function defaultsObject()
3337 global $ilAccess, $ilToolbar,
$tpl;
3339 if(!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
3342 $this->ctrl->redirect($this,
"infoScreen");
3345 $ilToolbar->setFormAction($this->ctrl->getFormAction($this,
'addDefaults'));
3346 $ilToolbar->addFormButton($this->lng->txt(
'add'),
'addDefaults');
3347 require_once
'Services/Form/classes/class.ilTextInputGUI.php';
3348 $ilToolbar->addInputItem(
new ilTextInputGUI($this->lng->txt(
'tst_defaults_defaults_of_test'),
'name'),
true);
3350 require_once
'Modules/Test/classes/tables/class.ilTestPersonalDefaultSettingsTableGUI.php';
3352 $defaults = $this->
object->getAvailableDefaults();
3353 $table->setData((array)$defaults);
3354 $tpl->setContent($table->getHTML());
3362 if(isset(
$_POST[
'chb_defaults']) && is_array(
$_POST[
'chb_defaults']) && count(
$_POST[
'chb_defaults']))
3364 foreach(
$_POST[
'chb_defaults'] as $test_default_id)
3366 $this->
object->deleteDefaults($test_default_id);
3373 $this->defaultsObject();
3390 if( count(
$_POST[
"chb_defaults"]) != 1 )
3393 $this->lng->txt(
"tst_defaults_apply_select_one")
3396 return $this->defaultsObject();
3400 if($this->object->evalTotalPersons() > 0)
3403 $this->lng->txt(
"tst_defaults_apply_not_possible")
3406 return $this->defaultsObject();
3409 $defaults =& $this->
object->getTestDefaults(
$_POST[
"chb_defaults"][0]);
3410 $defaultSettings = unserialize($defaults[
"defaults"]);
3412 if( isset($defaultSettings[
'isRandomTest']) )
3414 if( $defaultSettings[
'isRandomTest'] )
3425 elseif( isset($defaultSettings[
'questionSetType']) )
3427 $newQuestionSetType = $defaultSettings[
'questionSetType'];
3429 $oldQuestionSetType = $this->
object->getQuestionSetType();
3430 $questionSetTypeSettingSwitched = ( $oldQuestionSetType != $newQuestionSetType );
3432 $oldQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfigByType($oldQuestionSetType);
3436 case !$questionSetTypeSettingSwitched:
3437 case !$oldQuestionSetConfig->doesQuestionSetRelatedDataExist():
3444 require_once
'Modules/Test/classes/confirmations/class.ilTestSettingsChangeConfirmationGUI.php';
3447 $confirmation->setFormAction( $this->ctrl->getFormAction($this) );
3448 $confirmation->setCancel($this->lng->txt(
'cancel'),
'defaults');
3449 $confirmation->setConfirm($this->lng->txt(
'confirm'),
'confirmedApplyDefaults');
3451 $confirmation->setOldQuestionSetType($this->object->getQuestionSetType());
3452 $confirmation->setNewQuestionSetType($newQuestionSetType);
3453 $confirmation->setQuestionLossInfoEnabled(
false);
3454 $confirmation->build();
3456 $confirmation->populateParametersFromPost();
3458 $this->tpl->setContent( $this->ctrl->getHTML($confirmation) );
3463 if( $questionSetTypeSettingSwitched && $this->object->isOnline() )
3465 $this->
object->setOnline(
false);
3467 $info = $this->lng->txt(
"tst_set_offline_due_to_switched_question_set_type_setting");
3472 $this->
object->applyDefaults($defaults);
3476 if( $questionSetTypeSettingSwitched && $oldQuestionSetConfig->doesQuestionSetRelatedDataExist() )
3478 $oldQuestionSetConfig->removeQuestionSetRelatedData();
3481 $this->ctrl->redirect($this,
'defaults');
3489 if (strlen(
$_POST[
"name"]) > 0)
3491 $this->
object->addDefaults(
$_POST[
'name']);
3497 $this->defaultsObject();
3502 if( in_array($this->ctrl->getCmdClass(), self::$infoScreenChildClasses) )
3517 #if( !include 'competenzenRocker.php' ) exit;
3519 $this->ctrl->setCmd(
"showSummary");
3520 $this->ctrl->setCmdClass(
"ilinfoscreengui");
3521 $this->infoScreen();
3526 $this->ctrl->setCmd(
"showSummary");
3527 $this->ctrl->setCmdClass(
"ilinfoscreengui");
3528 $this->infoScreen(
$_GET[
'lock']);
3534 function infoScreen($session_lock =
"")
3541 global $ilAccess,
$ilUser, $ilToolbar;
3543 require_once
'Modules/Test/classes/class.ilTestDynamicQuestionSetFilterSelection.php';
3545 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
3546 require_once
'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
3548 $testQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
3549 $testSession = $this->testSessionFactory->getSession();
3550 $testSequence = $this->testSequenceFactory->getSequenceByTestSession($testSession);
3551 $testSequence->loadFromDb();
3553 $big_button = array();
3554 $testPlayerGUI = $this->testPlayerFactory->getPlayerGUI();
3556 if (
$_GET[
'createRandomSolutions'])
3560 $this->
object->createRandomSolutions(
$_GET[
'createRandomSolutions']);
3562 $ilCtrl->redirect($this);
3565 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id))
3567 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
3572 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
3577 return $this->ctrl->forwardCommand(
$info);
3580 $this->ctrl->setParameter($testPlayerGUI,
"sequence", $testSession->getLastSequence());
3582 $info->setFormAction($this->ctrl->getFormAction($testPlayerGUI));
3584 if (strlen($session_lock))
3586 $info->addHiddenElement(
"lock", $session_lock);
3590 $info->addHiddenElement(
"lock", md5(
$_COOKIE[
'PHPSESSID'] . time()));
3592 $online_access =
false;
3593 if ($this->object->getFixedParticipants())
3595 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
3597 if ($online_access_result ===
true)
3599 $online_access =
true;
3607 $enter_anonymous_code =
false;
3608 if( $this->object->isOnline() && $this->object->isComplete( $this->testQuestionSetConfigFactory->getQuestionSetConfig() ) )
3610 if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id))
3612 $executable = $this->
object->isExecutable($testSession,
$ilUser->getId(), $allowPassIncrease = TRUE
3614 if ($executable[
"executable"])
3616 if( $this->object->areObligationsEnabled() && $this->object->hasObligations($this->object->getTestId()) )
3621 if ($testSession->getActiveId() > 0)
3624 require_once
'Modules/Test/classes/class.ilTestPassesSelector.php';
3626 $testPassesSelector->setActiveId($testSession->getActiveId());
3627 $testPassesSelector->setLastFinishedPass($testSession->getLastFinishedPass());
3629 $closedPasses = $testPassesSelector->getClosedPasses();
3630 $existingPasses = $testPassesSelector->getExistingPasses();
3632 if ($existingPasses > $closedPasses)
3635 $btn->setCaption(
'tst_resume_test');
3636 $btn->setCommand(
'resumePlayer');
3637 $btn->setPrimary(
true);
3638 $big_button[] = $btn;
3643 $btn->setCaption($this->object->getStartTestLabel($testSession->getActiveId()),
false);
3644 $btn->setCommand(
'startPlayer');
3645 $btn->setPrimary(
true);
3646 $big_button[] = $btn;
3653 $btn->setCaption($this->object->getStartTestLabel($testSession->getActiveId()),
false);
3654 $btn->setCommand(
'startPlayer');
3655 $btn->setPrimary(
true);
3656 $big_button[] = $btn;
3663 if ($testSession->getActiveId() > 0)
3667 require_once
'Modules/Test/classes/class.ilTestPassesSelector.php';
3669 $testPassesSelector->setActiveId($testSession->getActiveId());
3670 $testPassesSelector->setLastFinishedPass($testSession->getLastFinishedPass());
3672 if ($this->object->canShowTestResults($testSession,
$ilUser->getId()) && count($testPassesSelector->getReportablePasses()))
3675 $btn->setCaption(
'tst_show_results');
3676 $btn->setUrl($this->ctrl->getLinkTargetByClass(
'ilTestEvaluationGUI',
'outUserResultsOverview'));
3677 $btn->setPrimary(
false);
3678 $big_button[] = $btn;
3680 if ($this->object->getHighscoreEnabled())
3684 $btn->setCaption(
'tst_show_toplist');
3685 $btn->setUrl($this->ctrl->getLinkTargetByClass(
'ilTestToplistGUI',
'outResultsToplist'));
3686 $btn->setPrimary(
false);
3687 $big_button[] = $btn;
3690 if( $this->object->isSkillServiceToBeConsidered() )
3692 require_once
'Modules/Test/classes/class.ilTestSkillEvaluationGUI.php';
3695 $btn->setCaption(
'tst_show_comp_results');
3697 $btn->setPrimary(
false);
3698 $big_button[] = $btn;
3704 if ($testSession->getActiveId() > 0)
3706 if ($this->object->canShowSolutionPrintview(
$ilUser->getId()))
3709 $btn->setCaption(
'tst_list_of_answers_show');
3710 $btn->setUrl($this->ctrl->getLinkTargetByClass(
'ilTestEvaluationGUI',
'outUserListOfAnswerPasses'));
3711 $btn->setPrimary(
false);
3712 $big_button[] = $btn;
3721 if(
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID)
3723 $enter_anonymous_code =
true;
3727 if( !$this->object->isOnline() && !$testQuestionSetConfig->areDepenciesBroken() )
3729 $message = $this->lng->txt(
"test_is_offline");
3731 if($ilAccess->checkAccess(
"write",
"", $this->ref_id))
3733 $message .=
"<br /><a href=\"".$this->ctrl->getLinkTargetByClass(
'ilobjtestsettingsgeneralgui').
"\">".
3734 $this->lng->txt(
"test_edit_settings").
"</a>";
3740 if( $this->object->isSkillServiceToBeConsidered() && $this->areSkillLevelThresholdsMissing() )
3745 if($ilAccess->checkAccess(
"write",
"", $this->ref_id))
3747 $testQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
3749 if( $testQuestionSetConfig->areDepenciesBroken() )
3753 $big_button = array();
3754 $enter_anonymous_code =
false;
3756 elseif( $testQuestionSetConfig->areDepenciesInVulnerableState() )
3758 ilUtil::sendInfo( $testQuestionSetConfig->getDepenciesInVulnerableStateMessage($this->lng) );
3762 if ($this->object->getShowInfo())
3764 $info->enablePrivateNotes();
3767 if($big_button || $enter_anonymous_code)
3769 $ilToolbar->setFormAction($this->ctrl->getFormAction($testPlayerGUI));
3771 foreach($big_button as $button)
3773 $ilToolbar->addButtonInstance($button);
3776 if($enter_anonymous_code)
3780 $ilToolbar->addSeparator();
3783 require_once
'Services/Form/classes/class.ilTextInputGUI.php';
3784 $anonymous_id =
new ilTextInputGUI($this->lng->txt(
'enter_anonymous_code'),
'anonymous_id');
3785 $anonymous_id->setSize(8);
3786 $ilToolbar->addInputItem($anonymous_id,
true);
3787 $ilToolbar->addFormButton($this->lng->txt(
'submit'),
'setAnonymousId');
3790 $ilToolbar->setCloseFormTag(
false);
3791 $info->setOpenFormTag(
false);
3794 if (strlen($this->object->getIntroduction()))
3796 $info->addSection($this->lng->txt(
"tst_introduction"));
3797 $info->addProperty(
"", $this->object->prepareTextareaOutput($this->object->getIntroduction(),
true).
3798 $info->getHiddenToggleButton());
3802 $info->addSection(
"");
3803 $info->addProperty(
"",
$info->getHiddenToggleButton());
3806 $info->addSection($this->lng->txt(
"tst_general_properties"));
3807 if ($this->object->getShowInfo())
3809 $info->addProperty($this->lng->txt(
"author"), $this->object->getAuthor());
3810 $info->addProperty($this->lng->txt(
"title"), $this->object->getTitle());
3812 if( $this->object->isOnline() && $this->object->isComplete( $this->testQuestionSetConfigFactory->getQuestionSetConfig() ) )
3814 if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id))
3816 if ($this->object->getShowInfo() || !$this->object->getForceJS())
3819 $checked_javascript =
false;
3820 if ($this->object->getJavaScriptOutput())
3822 $checked_javascript =
true;
3826 if(!$this->object->isRandomTest() && !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired())
3828 if ($this->object->getNrOfTries() != 1)
3830 if ($this->object->getUsePreviousAnswers() == 0)
3832 if ($this->object->getShowInfo())
3834 $info->addProperty($this->lng->txt(
"tst_use_previous_answers"), $this->lng->txt(
"tst_dont_use_previous_answers"));
3839 $use_previous_answers = FALSE;
3840 if (
$ilUser->prefs[
"tst_use_previous_answers"])
3842 $checked_previous_answers = TRUE;
3844 $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);
3851 $info->hideFurtherSections(
false);
3853 if ($this->object->getShowInfo())
3855 $info->addSection($this->lng->txt(
"tst_sequence_properties"));
3856 $info->addProperty($this->lng->txt(
"tst_sequence"), $this->lng->txt(($this->object->getSequenceSettings() ==
TEST_FIXED_SEQUENCE)?
"tst_sequence_fixed":
"tst_sequence_postpone"));
3858 $info->addSection($this->lng->txt(
"tst_heading_scoring"));
3859 $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"));
3860 $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"));
3861 if ($this->object->isRandomTest())
3863 $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"));
3866 $info->addSection($this->lng->txt(
"tst_score_reporting"));
3867 $score_reporting_text =
"";
3868 switch ($this->object->getScoreReporting())
3871 $score_reporting_text = $this->lng->txt(
"tst_report_after_test");
3874 $score_reporting_text = $this->lng->txt(
"tst_report_after_first_question");
3877 $score_reporting_text = $this->lng->txt(
"tst_report_after_date");
3880 $score_reporting_text = $this->lng->txt(
"tst_report_never");
3883 $info->addProperty($this->lng->txt(
"tst_score_reporting"), $score_reporting_text);
3884 $reporting_date = $this->
object->getReportingDate();
3885 if ($reporting_date)
3887 #preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches);
3888 #$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]));
3889 #$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date);
3890 $info->addProperty($this->lng->txt(
'tst_score_reporting_date'),
3894 $info->addSection($this->lng->txt(
"tst_session_settings"));
3895 $info->addProperty($this->lng->txt(
"tst_nr_of_tries"), ($this->object->getNrOfTries() == 0)?$this->lng->txt(
"unlimited"):$this->object->getNrOfTries());
3896 if ($this->object->getNrOfTries() != 1)
3898 $info->addProperty($this->lng->txt(
"tst_nr_of_tries_of_user"), ($testSession->getPass() ==
false)?$this->lng->txt(
"tst_no_tries"):$testSession->getPass());
3901 if ($this->object->getEnableProcessingTime())
3903 $info->addProperty($this->lng->txt(
"tst_processing_time"), $this->object->getProcessingTime());
3905 if (strlen($this->object->getAllowedUsers()) && ($this->object->getAllowedUsersTimeGap()))
3907 $info->addProperty($this->lng->txt(
"tst_allowed_users"), $this->object->getAllowedUsers());
3910 $starting_time = $this->
object->getStartingTime();
3911 if ($starting_time && $this->object->isStartingTimeEnabled())
3913 $info->addProperty($this->lng->txt(
"tst_starting_time"),
3916 $ending_time = $this->
object->getEndingTime();
3917 if ($ending_time && $this->object->isEndingTimeEnabled())
3919 $info->addProperty($this->lng->txt(
"tst_ending_time"),
3922 $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
3926 $this->ctrl->forwardCommand(
$info);
3932 switch ($this->ctrl->getCmd())
3936 case "redirectToInfoScreen":
3943 case "outCorrectSolution":
3945 case "showAnswersOfUser":
3946 case "outUserResultsOverview":
3947 case "backFromSummary":
3948 case "show_answers":
3951 case "outTestSummary":
3952 case "outQuestionSummary":
3953 case "gotoQuestion":
3954 case "selectImagemapRegion":
3955 case "confirmSubmitAnswers":
3956 case "finalSubmission":
3958 case "outUserPassDetails":
3959 case "checkPassword":
3960 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
"infoScreen"),
"",
$_GET[
"ref_id"]);
3963 case "evalAllUsers":
3964 case "evalUserDetail":
3965 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
"eval_stat"),
"",
$_GET[
"ref_id"]);
3972 case "importVerifiedFile":
3973 case "cancelImport":
3976 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$_GET[
"ref_id"]);
3984 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
3986 $this->ctrl->saveParameterByClass($this->ctrl->getCmdClass(),
'q_id');
3988 $tabs_gui->setBackTarget($this->lng->txt(
"backtocallingtest"), $this->ctrl->getLinkTargetByClass($this->ctrl->getCmdClass(),
"questions"));
3989 $tabs_gui->addTarget(
"tst_browse_for_questions",
3990 $this->ctrl->getLinkTarget($this,
"browseForQuestions"),
3991 array(
"browseForQuestions",
"filter",
"resetFilter",
"resetTextFilter",
"insertQuestions"),
4000 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
4003 $tabs_gui->setBackTarget($this->lng->txt(
"backtocallingtest"), $this->ctrl->getLinkTarget($this,
"questions"));
4004 $tabs_gui->addTarget(
"random_selection",
4005 $this->ctrl->getLinkTarget($this,
"randomQuestions"),
4006 array(
"randomQuestions"),
4021 include_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
4022 include_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
4024 $output_gui->certificateEditor();
4030 $ilTabs->activateTab(
'assQuestions');
4033 if (!$this->object->isRandomTest())
4035 #if (in_array($this->object->getEnabledViewMode(), array('both', 'express'))) {
4036 $questions_per_page = ($a_cmd ==
'questions_per_page' || ($a_cmd ==
'removeQuestions' &&
$_REQUEST[
'test_express_mode'])) ? true :
false;
4038 $this->tabs_gui->addSubTabTarget(
4039 "questions_per_page_view",
4040 $this->ctrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'showPage'),
4041 "",
"",
"", $questions_per_page);
4044 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
4047 if (!in_array(
'questions', $template->getHiddenTabs())) {
4049 $ilTabs->addSubTabTarget(
"edit_test_questions",
4050 $this->ctrl->getLinkTarget($this,
'questions'),
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"),
4060 if (in_array($a_cmd, array(
'questions',
'createQuestion')) || ($a_cmd ==
'removeQuestions' && !
$_REQUEST[
'test_express_mode']))
4061 $this->tabs_gui->activateSubTab(
'edit_test_questions');
4066 if (!$this->object->isRandomTest())
4068 $ilTabs->addSubTabTarget(
"print_view",
4069 $this->ctrl->getLinkTarget($this,
'print'),
4070 "print",
"",
"", $this->ctrl->getCmd() ==
'print');
4071 $ilTabs->addSubTabTarget(
'review_view',
4072 $this->ctrl->getLinkTarget($this,
'review'),
4073 'review',
'',
'', $this->ctrl->getCmd() ==
'review');
4084 $ilTabs->addSubTabTarget(
"eval_all_users",
4085 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"outEvaluation"),
4086 array(
"outEvaluation",
"detailedEvaluation",
"exportEvaluation",
"evalUserDetail",
"passDetails",
4087 "outStatisticsResultsOverview",
"statisticsPassDetails")
4091 $ilTabs->addSubTabTarget(
"tst_results_aggregated",
4092 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"eval_a"),
4097 $ilTabs->addSubTabTarget(
"tst_single_results",
4098 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"singleResults"),
4099 array(
"singleResults"),
4103 function getSettingsSubTabs($hiddenTabs = array())
4111 $ilTabs->addSubTabTarget(
'general', $this->ctrl->getLinkTargetByClass(
'ilObjTestSettingsGeneralGUI'),
4113 array(
'ilobjtestsettingsgeneralgui')
4116 if(!in_array(
'mark_schema', $hiddenTabs))
4118 $ilTabs->addSubTabTarget(
4120 $this->ctrl->getLinkTargetByClass(
'ilmarkschemagui',
'showMarkSchema'),
4122 array(
'ilmarkschemagui')
4127 $ilTabs->addSubTabTarget(
'scoring', $this->ctrl->getLinkTargetByClass(
'ilObjTestSettingsScoringResultsGUI'),
4129 array(
'ilobjtestsettingsscoringresultsgui')
4133 include_once
"Services/Certificate/classes/class.ilCertificate.php";
4136 $ilTabs->addSubTabTarget(
4138 $this->ctrl->getLinkTarget($this,
'certificate'),
4139 array(
"certificate",
"certificateEditor",
"certificateRemoveBackground",
"certificateSave",
4140 "certificatePreview",
"certificateDelete",
"certificateUpload",
"certificateImport"),
4141 array(
"",
"ilobjtestgui",
"ilcertificategui")
4145 if (!in_array(
'defaults', $hiddenTabs)) {
4147 $ilTabs->addSubTabTarget(
4148 "tst_default_settings",
4149 $this->ctrl->getLinkTarget($this,
"defaults"),
4150 array(
"defaults",
"deleteDefaults",
"addDefaults",
"applyDefaults"),
4151 array(
"",
"ilobjtestgui",
"ilcertificategui")
4161 $ilTabs->addSubTabTarget(
"participants",
4162 $this->ctrl->getLinkTarget($this,
'participants'),
4164 "participants",
"saveClientIP",
4165 "removeParticipant",
4166 "showParticipantAnswersForAuthor",
4167 "deleteAllUserResults",
4168 "cancelDeleteAllUserData",
"deleteSingleUserResults",
4169 "outParticipantsResultsOverview",
"outParticipantsPassDetails",
4170 "showPassOverview",
"showUserAnswers",
"participantsAction",
4171 "showDetailedResults",
4172 'npResetFilter',
'npSetFilter'
4177 if( !$this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken() )
4179 if($this->object->getProcessingTimeInSeconds() > 0 && $this->object->getNrOfTries() == 1)
4182 $ilTabs->addSubTabTarget(
"timing",
4183 $this->ctrl->getLinkTarget($this,
'timingOverview'),
4184 array(
"timing",
"timingOverview"),
"",
""
4197 global $ilAccess,
$ilUser, $ilHelp;
4199 if (preg_match(
'/^ass(.*?)gui$/i', $this->ctrl->getNextClass($this))) {
4202 else if ($this->ctrl->getNextClass($this) ==
'ilassquestionpagegui') {
4206 $ilHelp->setScreenIdComponent(
"tst");
4208 $hidden_tabs = array();
4210 $template = $this->
object->getTemplate();
4213 include_once
"Services/Administration/classes/class.ilSettingsTemplate.php";
4216 $hidden_tabs = $template->getHiddenTabs();
4220 $curUserHasWriteAccess = $ilAccess->checkAccess(
"write",
"", $this->ref_id);
4222 switch($this->ctrl->getCmdClass())
4225 case 'iltestoutputgui':
4228 case 'iltestevaluationgui':
4229 $nonSelfTabbingCommands = array(
4230 'outParticipantsResultsOverview',
'outEvaluation',
4231 'eval_a',
'singleResults',
'detailedEvaluation'
4233 if( in_array($this->ctrl->getCmd(), $nonSelfTabbingCommands) )
4237 case 'iltestevalobjectiveorientedgui':
4240 case 'ilmarkschemagui':
4241 case 'ilobjtestsettingsgeneralgui':
4242 case 'ilobjtestsettingsscoringresultsgui':
4244 if( $curUserHasWriteAccess )
4246 $this->getSettingsSubTabs($hidden_tabs);
4254 require_once
'Services/Link/classes/class.ilLink.php';
4256 $tabs_gui->setBack2Target($this->lng->txt(
'back_to_objective_container'), $courseLink);
4259 switch($this->ctrl->getCmd())
4265 case "directfeedback":
4267 case "outCorrectSolution":
4269 case "showAnswersOfUser":
4270 case "outUserResultsOverview":
4271 case "backFromSummary":
4272 case "show_answers":
4275 case "confirmFinish":
4276 case "outTestSummary":
4277 case "outQuestionSummary":
4278 case "gotoQuestion":
4279 case "selectImagemapRegion":
4280 case "confirmSubmitAnswers":
4281 case "finalSubmission":
4283 case "outUserPassDetails":
4284 case "checkPassword":
4285 case "exportCertificate":
4286 case "finishListOfAnswers":
4287 case "backConfirmFinish":
4288 case "showFinalStatement":
4291 case "browseForQuestions":
4294 case "resetTextFilter":
4295 case "insertQuestions":
4297 if($this->ctrl->getNextClass($this) !=
"illearningprogressgui")
4304 case "certificateservice":
4305 case "certificateImport":
4306 case "certificateUpload":
4307 case "certificateEditor":
4308 case "certificateDelete":
4309 case "certificateSave":
4311 case "deleteDefaults":
4313 case "applyDefaults":
4314 case "inviteParticipants":
4315 case "searchParticipants":
4316 if( $curUserHasWriteAccess && in_array($this->ctrl->getCmdClass(), array(
'ilobjtestgui',
'ilcertificategui')) )
4318 $this->getSettingsSubTabs($hidden_tabs);
4326 case "detailedEvaluation":
4327 case "outEvaluation":
4328 case "singleResults":
4329 case "exportEvaluation":
4330 case "evalUserDetail":
4331 case "outStatisticsResultsOverview":
4332 case "statisticsPassDetails":
4337 if (strcmp(strtolower(get_class($this->
object)),
"ilobjtest") == 0)
4340 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && !in_array(
'assQuestions', $hidden_tabs))
4342 $force_active = (
$_GET[
"up"] !=
"" ||
$_GET[
"down"] !=
"")
4347 if (
$_GET[
"browse"] == 1) $force_active =
true;
4350 switch( $this->object->getQuestionSetType() )
4353 $target = $this->ctrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'showPage');
4357 $target = $this->ctrl->getLinkTargetByClass(
'ilTestRandomQuestionSetConfigGUI');
4361 $target = $this->ctrl->getLinkTargetByClass(
'ilObjTestDynamicQuestionSetConfigGUI');
4365 $tabs_gui->addTarget(
"assQuestions",
4368 array(
"questions",
"browseForQuestions",
"questionBrowser",
"createQuestion",
4369 "randomselect",
"filter",
"resetFilter",
"insertQuestions",
4370 "back",
"createRandomSelection",
"cancelRandomSelect",
4371 "insertRandomSelection",
"removeQuestions",
"moveQuestions",
4372 "insertQuestionsBefore",
"insertQuestionsAfter",
"confirmRemoveQuestions",
4373 "cancelRemoveQuestions",
"executeCreateQuestion",
"cancelCreateQuestion",
4374 "addQuestionpool",
"saveRandomQuestions",
"saveQuestionSelectionMode",
"print",
4375 "addsource",
"removesource",
"randomQuestions"),
4376 "",
"", $force_active);
4380 if ($ilAccess->checkAccess(
"read",
"", $this->ref_id) && !in_array(
'info_short', $hidden_tabs))
4382 $tabs_gui->addTarget(
"info_short",
4383 $this->ctrl->getLinkTarget($this,
'infoScreen'),
4384 array(
"infoScreen",
"outIntroductionPage",
"showSummary",
4385 "setAnonymousId",
"outUserListOfAnswerPasses",
"redirectToInfoScreen"));
4389 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
4391 if (!in_array(
'settings', $hidden_tabs))
4393 $settingsCommands = array(
4394 "marks",
"showMarkSchema",
"addMarkStep",
"deleteMarkSteps",
"addSimpleMarkSchema",
"saveMarks",
4395 "certificate",
"certificateEditor",
"certificateRemoveBackground",
"certificateSave",
4396 "certificatePreview",
"certificateDelete",
"certificateUpload",
"certificateImport",
4397 "scoring",
"defaults",
"addDefaults",
"deleteDefaults",
"applyDefaults",
4398 "inviteParticipants",
"saveFixedParticipantsStatus",
"searchParticipants",
"addParticipants"
4401 require_once
'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php';
4402 $reflection =
new ReflectionClass(
'ilObjTestSettingsGeneralGUI');
4403 foreach($reflection->getConstants() as $name => $value)
4404 if(substr($name, 0, 4) ==
'CMD_') $settingsCommands[] = $value;
4406 require_once
'Modules/Test/classes/class.ilObjTestSettingsScoringResultsGUI.php';
4407 $reflection =
new ReflectionClass(
'ilObjTestSettingsScoringResultsGUI');
4408 foreach($reflection->getConstants() as $name => $value)
4409 if(substr($name, 0, 4) ==
'CMD_') $settingsCommands[] = $value;
4411 $settingsCommands[] =
"";
4413 $tabs_gui->addTarget(
"settings",
4414 $this->ctrl->getLinkTargetByClass(
'ilObjTestSettingsGeneralGUI'),
4416 array(
"ilmarkschemagui",
"ilobjtestsettingsgeneralgui",
"ilobjtestsettingsscoringresultsgui",
"ilobjtestgui",
"ilcertificategui")
4423 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentsGUI.php';
4425 $link = $this->ctrl->getLinkTargetByClass(
4426 array(
'ilTestSkillAdministrationGUI',
'ilAssQuestionSkillAssignmentsGUI'),
4430 $tabs_gui->addTarget(
'tst_tab_competences', $link, array(), array());
4433 if (!in_array(
'participants', $hidden_tabs))
4436 $tabs_gui->addTarget(
"participants",
4437 $this->ctrl->getLinkTarget($this,
'participants'),
4439 "participants",
"saveClientIP",
4440 "removeParticipant",
4441 "showParticipantAnswersForAuthor",
4442 "deleteAllUserResults",
4443 "cancelDeleteAllUserData",
"deleteSingleUserResults",
4444 "outParticipantsResultsOverview",
"outParticipantsPassDetails",
4445 "showPassOverview",
"showUserAnswers",
"participantsAction",
4446 "showDetailedResults",
4447 'timing',
'timingOverview',
'npResetFilter',
'npSetFilter',
'showTimingForm'
4454 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
4457 $tabs_gui->addTarget(
'learning_progress',
4458 $this->ctrl->getLinkTargetByClass(array(
'illearningprogressgui'),
''),
4460 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
4463 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && !in_array(
'manscoring', $hidden_tabs))
4465 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
4467 if (count($scoring))
4470 $tabs_gui->addTarget(
4471 "manscoring", $this->ctrl->getLinkTargetByClass(
'ilTestScoringGUI',
'showManScoringParticipantsTable'),
4473 'showManScoringParticipantsTable',
'applyManScoringParticipantsFilter',
'resetManScoringParticipantsFilter',
'showManScoringParticipantScreen',
4474 'showManScoringByQuestionParticipantsTable',
'applyManScoringByQuestionFilter',
'resetManScoringByQuestionFilter',
'saveManScoringByQuestion'
4483 $scoring_adjust_active = (bool) $setting->get(
'assessment_adjustments_enabled',
false);
4484 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && $scoring_adjust_active && !in_array(
'scoringadjust', $hidden_tabs))
4487 $tabs_gui->addTarget(
4488 "scoringadjust", $this->ctrl->getLinkTargetByClass(
'ilScoringAdjustmentGUI',
'showquestionlist'),
4491 'savescoringfortest',
4492 'adjustscoringfortest'
4497 if ((($ilAccess->checkAccess(
"tst_statistics",
"", $this->ref_id)) || ($ilAccess->checkAccess(
"write",
"", $this->ref_id))) && !in_array(
'statistics', $hidden_tabs))
4500 $tabs_gui->addTarget(
4502 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"outEvaluation"),
4504 "statistics",
"outEvaluation",
"exportEvaluation",
"detailedEvaluation",
"eval_a",
"evalUserDetail",
4505 "passDetails",
"outStatisticsResultsOverview",
"statisticsPassDetails",
"singleResults"
4511 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
4513 if (!in_array(
'history', $hidden_tabs)) {
4516 $tabs_gui->addTarget(
"history",
4517 $this->ctrl->getLinkTarget($this,
'history'),
4521 if (!in_array(
'meta_data', $hidden_tabs)) {
4523 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
4525 $mdtab = $mdgui->getTab();
4528 $tabs_gui->addTarget(
"meta_data",
4530 "",
"ilmdeditorgui");
4534 if(!in_array(
'export', $hidden_tabs))
4537 $tabs_gui->addTarget(
4539 $this->ctrl->getLinkTargetByClass(
'iltestexportgui' ,
''),
4541 array(
'iltestexportgui')
4546 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->ref_id)&& !in_array(
'permissions', $hidden_tabs))
4548 $tabs_gui->addTarget(
"perm_settings",
4549 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
4553 if( $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken() )
4555 $hideTabs = $this->testQuestionSetConfigFactory->getQuestionSetConfig()->getHiddenTabsOnBrokenDepencies();
4557 foreach($hideTabs as $tabId)
4559 $tabs_gui->removeTab($tabId);
4576 if ($ilAccess->checkAccess(
"read",
"", $a_target))
4579 $_GET[
"baseClass"] =
"ilObjTestGUI";
4580 $_GET[
"cmd"] =
"infoScreen";
4581 $_GET[
"ref_id"] = $a_target;
4582 include_once(
"ilias.php");
4586 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
4604 if($this->create_question_mode)
4609 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
4613 $ilCtrl->saveParameter($this,
'q_mode');
4615 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'test_express_mode', 1);
4616 $ilCtrl->setParameter($this,
'test_express_mode', 1);
4617 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'q_id',
$_REQUEST[
'q_id']);
4619 $ilToolbar->setFormAction(
$ilCtrl->getFormActionByClass(
'iltestexpresspageobjectgui',
'edit'));
4621 if($this->object->evalTotalPersons() == 0)
4643 $ilToolbar->addFormButton(
$lng->txt(
"ass_create_question"),
"addQuestion");
4645 $ilToolbar->addSeparator();
4647 if($this->object->getPoolUsage())
4649 require_once
'Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php';
4653 $show_separator =
true;
4657 $questions = $this->
object->getQuestionTitlesAndIndexes();
4661 foreach($questions as $id => $label)
4663 $options[$id] = $label .
' ['. $this->lng->txt(
'question_id_short') .
': ' . $id .
']';
4666 $optionKeys = array_keys(
$options);
4696 if(count($questions))
4698 if(isset($show_separator) && $show_separator)
4700 $ilToolbar->addSeparator();
4704 $btn->setCaption(
"test_prev_question");
4705 $btn->setUrl(
$ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'prevQuestion'));
4706 $ilToolbar->addButtonInstance($btn);
4708 if( count(
$options) <= 1 || $optionKeys[0] == $qid )
4710 $btn->setDisabled(
true);
4714 $btn->setCaption(
"test_next_question");
4715 $btn->setUrl(
$ilCtrl->getLinkTargetByClass(
'iltestexpresspageobjectgui',
'nextQuestion'));
4716 $ilToolbar->addButtonInstance($btn);
4718 if( count(
$options) <= 1 || $optionKeys[count($optionKeys) - 1] == $qid )
4720 $btn->setDisabled(
true);
4724 if(count($questions) > 1)
4727 $ilToolbar->addSeparator();
4729 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
4731 $si->addCustomAttribute(
"onChange=\"forms['ilToolbar'].submit();\"");
4736 $si->setValue($qid);
4739 $ilToolbar->addInputItem(
$si,
true);
4742 $total = $this->
object->evalTotalPersons();
4757 if(count($questions) && !
$total)
4760 $ilToolbar->addSeparator();
4761 $ilToolbar->addButton(
$lng->txt(
"test_delete_page"),
$ilCtrl->getLinkTarget($this,
"removeQuestions"));
4764 if(count($questions) > 1 && !
$total)
4766 $ilToolbar->addSeparator();
4767 $ilToolbar->addButton(
$lng->txt(
"test_move_page"),
$ilCtrl->getLinkTarget($this,
"movePageForm"));
4772 $online_access =
false;
4773 if($this->object->getFixedParticipants())
4775 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
4777 if($online_access_result ===
true)
4779 $online_access =
true;
4783 if($this->object->isOnline() && $this->object->isComplete( $this->testQuestionSetConfigFactory->getQuestionSetConfig() ))
4785 if((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id))
4787 $testSession = $this->testSessionFactory->getSession();
4789 $executable = $this->
object->isExecutable($testSession,
$ilUser->getId(), $allowPassIncrease = TRUE);
4791 if($executable[
"executable"])
4794 $player_instance = $player_factory->getPlayerGUI();
4796 if ($testSession->getActiveId() > 0)
4798 $ilToolbar->addSeparator();
4799 $ilToolbar->addButton(
$lng->txt(
'tst_resume_test'),
$ilCtrl->getLinkTarget($player_instance,
'resumePlayer'));
4803 $ilToolbar->addSeparator();
4804 $ilToolbar->addButton(
$lng->txt(
'tst_start_test'),
$ilCtrl->getLinkTarget($player_instance,
'startTest'));
4814 $this->ctrl->redirect($this,
'questions');
4820 foreach($questionIds as $q_id)
4823 $newIds[$q_id] = $newId;
4835 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
4838 $newtitle = $question_gui->object->getTitle();
4839 if ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle()))
4842 while ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle() .
" ($counter)"))
4846 $newtitle = $question_gui->object->getTitle() .
" ($counter)";
4849 return $question_gui->object->createNewOriginalFromThisDuplicate($targetParentId, $newtitle);
4857 global $ilObjDataCache;
4859 $qplId = $ilObjDataCache->lookupObjId(
$_REQUEST[
'sel_qpl']);
4862 foreach(
$result->ids as $oldId => $newId)
4869 $oldOriginal->delete($oldOriginal->getId());
4872 $questionInstance->setNewOriginalId($newId);
4875 $this->ctrl->redirect($this,
'questions');
4881 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
4885 $title->setRequired(
true);
4886 $form->addItem($title);
4889 $form->addItem($description);
4891 $form->addCommandButton(
'createQuestionPoolAndCopy',
$lng->txt(
'create'));
4898 $hidden->setValue($id);
4899 $form->addItem($hidden);
4915 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
4919 'copyAndLinkToQuestionpool' == $this->ctrl->getCmd() &&
4924 $this->ctrl->redirect($this,
'questions');
4941 $this->ctrl->redirect($this,
'questions');
4992 $ilTabs->activateSubTab(
'edit_test_questions');
4994 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_qpl_select_copy.html",
"Modules/Test");
4995 $questionpools =& $this->
object->getAvailableQuestionpools(FALSE, FALSE, FALSE, TRUE, FALSE,
"write");
4996 if(count($questionpools) == 0)
4998 $this->tpl->setCurrentBlock(
"option");
4999 $this->tpl->setVariable(
"VALUE_QPL",
"");
5000 $this->tpl->parseCurrentBlock();
5004 foreach($questionpools as $key => $value)
5006 $this->tpl->setCurrentBlock(
"option");
5007 $this->tpl->setVariable(
"VALUE_OPTION", $key);
5008 $this->tpl->setVariable(
"TEXT_OPTION", $value[
"title"]);
5009 $this->tpl->parseCurrentBlock();
5017 $this->tpl->setCurrentBlock(
"hidden");
5018 $this->tpl->setVariable(
"HIDDEN_NAME",
"q_id[]");
5019 $this->tpl->setVariable(
"HIDDEN_VALUE", $id);
5020 $this->tpl->parseCurrentBlock();
5021 $this->tpl->setCurrentBlock(
"adm_content");
5024 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
5026 if(count($questionpools) == 0)
5028 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_enter_questionpool"));
5029 $cmd =
'createQuestionPoolAndCopy';
5033 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_select_questionpool"));
5036 $this->tpl->setVariable(
"CMD_SUBMIT",
$cmd);
5037 $this->tpl->setVariable(
"BTN_SUBMIT", $this->lng->txt(
"submit"));
5038 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
5043 case 'copyAndLinkQuestionsToPool':
5045 $hidden->setValue(1);
5046 $createForm->addItem($hidden);
5048 case 'copyQuestionsToPool':
5051 $createForm->setFormAction($this->ctrl->getFormAction($this));
5053 $this->tpl->parseCurrentBlock();
5061 $simpleSetters = array(
5064 'use_pool' =>
'setPoolUsage',
5065 'question_set_type' =>
'setQuestionSetType',
5068 'intro_enabled' =>
'setIntroductionEnabled',
5069 'showinfo' =>
'setShowInfo',
5072 'chb_starting_time' =>
'setStartingTimeEnabled',
5073 'chb_ending_time' =>
'setEndingTimeEnabled',
5074 'password_enabled' =>
'setPasswordEnabled',
5075 'fixedparticipants' =>
'setFixedParticipants',
5076 'limitUsers' =>
'setLimitUsersEnabled',
5079 'nr_of_tries' =>
'setNrOfTries',
5080 'chb_processing_time' =>
'setEnableProcessingTime',
5081 'kiosk' =>
'setKiosk',
5082 'examid_in_test_pass' =>
'setShowExamIdInTestPassEnabled',
5085 'title_output' =>
'setTitleOutput',
5087 'chb_shuffle_questions' =>
'setShuffleQuestions',
5088 'offer_hints' =>
'setOfferingQuestionHintsEnabled',
5089 'instant_feedback' =>
'setScoringFeedbackOptionsByArray',
5090 'obligations_enabled' =>
'setObligationsEnabled',
5093 'chb_use_previous_answers' =>
'setUsePreviousAnswers',
5094 'chb_show_cancel' =>
'setShowCancel',
5095 'chb_postpone' =>
'setPostponingEnabled',
5096 'list_of_questions' =>
'setListOfQuestionsSettings',
5097 'chb_show_marker' =>
'setShowMarker',
5100 'enable_examview' =>
'setEnableExamview',
5101 'showfinalstatement' =>
'setShowFinalStatement',
5102 'redirection_enabled' =>
null,
5103 'sign_submission' =>
'setSignSubmission',
5104 'mailnotification' =>
'setMailNotification',
5107 'count_system' =>
'setCountSystem',
5108 'mc_scoring' =>
'setMCScoring',
5109 'score_cutting' =>
'setScoreCutting',
5110 'pass_scoring' =>
'setPassScoring',
5111 'pass_deletion_allowed' =>
'setPassDeletionAllowed',
5114 'results_access_enabled' =>
'setScoreReporting',
5115 'grading_status' =>
'setShowGradingStatusEnabled',
5116 'grading_mark' =>
'setShowGradingMarkEnabled',
5119 'solution_details' =>
'setShowSolutionDetails',
5120 'solution_feedback' =>
'setShowSolutionFeedback',
5121 'solution_suggested' =>
'setShowSolutionSuggested',
5122 'solution_printview' =>
'setShowSolutionPrintview',
5123 'highscore_enabled' =>
'setHighscoreEnabled',
5124 'solution_signature' =>
'setShowSolutionSignature',
5125 'examid_in_test_res' =>
'setShowExamIdInTestResultsEnabled',
5126 'exp_sc_short' =>
'setExportSettingsSingleChoiceShort',
5129 'anonymity' =>
'setAnonymity',
5130 'enable_archiving' =>
'setEnableArchiving'
5133 if (!$templateData[
'results_presentation'][
'value'])
5135 $templateData[
'results_presentation'][
'value'] = array();
5138 foreach($simpleSetters as $field => $setter)
5140 if($templateData[$field] && strlen($setter))
5142 $object->$setter($templateData[$field][
'value']);
5149 if( $templateData[$field][
'value'] > 0 )
5152 $object->setAutosaveIval($templateData[$field][
'value'] * 1000);
5160 case 'redirection_enabled':
5169 if( strlen($templateData[$field][
'value']) )
5172 $object->setRedirectionUrl($templateData[$field][
'value']);
5177 $object->setRedirectionUrl(
'');
5186 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
5190 $this->ctrl->redirect($this,
"infoScreen");
5195 $orders = $obligations = array();
5197 foreach(
$_REQUEST[
'order'] as $qId => $order)
5199 $id = (int)str_replace(
'q_',
'', $qId);
5201 $orders[$id] = $order;
5204 if( $this->object->areObligationsEnabled() && isset(
$_REQUEST[
'obligatory']) && is_array(
$_REQUEST[
'obligatory']) )
5206 foreach(
$_REQUEST[
'obligatory'] as $qId => $obligation)
5208 $id = (int)str_replace(
'q_',
'', $qId);
5212 $obligations[$id] = $obligation;
5217 $this->
object->setQuestionOrderAndObligations(
5218 $orders, $obligations
5222 $ilCtrl->redirect($this,
'questions');
5232 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
5234 $form->setFormAction(
$ilCtrl->getFormAction($this,
"movePage"));
5235 $form->setTitle(
$lng->txt(
"test_move_page"));
5239 $form->addItem($old_pos);
5241 $questions = $this->
object->getQuestionTitlesAndIndexes();
5242 if (!is_array($questions))
5243 $questions = array();
5245 foreach($questions as $k => $q) {
5247 unset($questions[$k]);
5250 $questions[$k] =
$lng->txt(
'behind') .
' '. $q;
5252 #$questions['0'] = $lng->txt('first');
5255 0 =>
$lng->txt(
'first')
5257 foreach($questions as $k => $q) {
5258 $options[$k] = $q .
' ['. $this->lng->txt(
'question_id_short') .
': ' . $k .
']';
5263 $form->addItem($pos);
5265 $form->addCommandButton(
"movePage",
$lng->txt(
"submit"));
5266 $form->addCommandButton(
"showPage",
$lng->txt(
"cancel"));
5268 return $tpl->setContent($form->getHTML());
5273 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
5277 $this->ctrl->redirect($this,
"infoScreen");
5287 $ilCtrl->setParameterByClass(
'iltestexpresspageobjectgui',
'q_id',
$_REQUEST[
'q_id']);
5288 $ilCtrl->redirectByClass(
'iltestexpresspageobjectgui',
'showPage');
5293 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
5297 $this->ctrl->redirect($this,
"infoScreen");
5307 $this->ctrl->redirect($this,
'questions');
5312 $questionTitles = $this->
object->getQuestionTitles();
5314 foreach($ids as $id)
5316 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
5320 $title = $question->object->getTitle();
5322 while( in_array( $title .
' (' . $i .
')', $questionTitles ))
5325 $title .=
' (' . $i .
')';
5327 $questionTitles[] = $title;
5329 $new_id = $question->object->duplicate(
false, $title);
5332 $clone->object->setObjId($this->object->getId());
5333 $clone->object->saveToDb();
5335 $this->
object->insertQuestion( $this->testQuestionSetConfigFactory->getQuestionSetConfig(), $new_id,
true );
5343 $this->ctrl->redirect($this,
'questions');
5353 if( !$testSession->getActiveId() )
5358 if( !$this->object->isDynamicTest() )
5363 if( !$this->object->isPassDeletionAllowed() )
5368 if( !$testSequence->hasStarted($testSession) )
5382 require_once
'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
5383 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
5385 $this->ctrl->setParameterByClass(
5386 'iltestevaluationgui',
'context',
5390 $this->ctrl->setParameterByClass(
'iltestevaluationgui',
'active_id', $testSession->getActiveId());
5391 $this->ctrl->setParameterByClass(
'iltestevaluationgui',
'pass', $testSession->getPass());
5394 $btn->setCaption(
'tst_delete_dyn_test_results_btn');
5395 $btn->setUrl($this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'confirmDeletePass'));
5396 $btn->setPrimary(
false);
5397 $big_button[] = $btn;
5405 if( !isset(
$_GET[
'pdf']) )
5410 if( !(
bool)
$_GET[
'pdf'] )
5420 require_once
'Modules/Course/classes/Objectives/class.ilLOSettings.php';
5425 $this->objectiveOrientedContainer->setObjId($containerObjId);
5426 $this->objectiveOrientedContainer->setRefId($containerRefId);
5436 if( !$this->object->isSkillServiceEnabled() )
5441 if( $this->object->isDynamicTest() )
5443 $questionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
5444 $questionContainerId = $questionSetConfig->getSourceQuestionPoolId();
5448 $questionContainerId = $this->
object->getId();
5453 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
5454 require_once
'Modules/Test/classes/class.ilTestSkillLevelThreshold.php';
5457 $assignmentList->setParentObjId($questionContainerId);
5458 $assignmentList->loadFromDb();
5460 foreach($assignmentList->getUniqueAssignedSkills() as
$data)
5462 foreach(
$data[
'skill']->getLevelData() as $level)
5465 $treshold->setTestId($this->object->getTestId());
5466 $treshold->setSkillBaseId(
$data[
'skill_base_id']);
5467 $treshold->setSkillTrefId(
$data[
'skill_tref_id']);
5468 $treshold->setSkillLevelId($level[
'id']);
5470 if( !$treshold->dbRecordExists() )
5482 require_once
'Modules/Test/classes/class.ilTestSkillLevelThresholdsGUI.php';
5484 $link = $this->ctrl->getLinkTargetByClass(
5485 array(
'ilTestSkillAdministrationGUI',
'ilTestSkillLevelThresholdsGUI'),
5489 $msg = $this->lng->txt(
'tst_skl_level_thresholds_missing');
5490 $msg .=
'<br /><a href="'.$link.
'">'.$this->lng->txt(
'tst_skl_level_thresholds_link').
'</a>';
const QT_MULTIPLE_CHOICE_MR
const QT_ORDERING_HORIZONTAL
const QT_MULTIPLE_CHOICE_SR
Basic GUI class for assessment questions.
& _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
static _getOriginalId($question_id)
Returns the original id of a question.
static instantiateQuestionGUI($a_question_id)
Creates an instance of a question gui with a given question id.
static originalQuestionExists($questionId)
const ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT
constant for additional content editing mode "default"
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
static & _instanciateQuestionGUI($question_id)
Creates an instance of a question gui with a given question id.
static lookupParentObjId($questionId)
@global ilDB $ilDB
_needsManualScoring($question_id)
const ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT
constant for additional content editing mode "pageobject"
static _instanciateQuestion($question_id)
Creates an instance of a question with a given question id.
getQuestionTypeFromDb($question_id)
get question type for question id
Generic feedback page GUI class.
const QUESTION_INSTANCE_TYPE_ORIGINALS
const QUESTION_INSTANCE_TYPE_DUPLICATES
const CMD_SHOW_SKILL_QUEST_ASSIGNS
Specific feedback page GUI class.
GUI class to create PDF certificates.
_recordReadEvent($a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
static _isActive()
Static getter.
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
static isObjectiveTest($a_trst_ref_id)
Check if test ref_id is used in an objective course.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
Class ilLocalUnitConfigurationGUI.
static getSettingsTemplateConfig()
static isAdditionalQuestionContentEditingModePageObjectEnabled()
returns the fact wether content editing with ilias page editor is enabled for questions or not
& _getLog($ts_from, $ts_to, $test_id, $test_only=FALSE)
Retrieve assessment log datasets from the database.
_getManualScoring()
Retrieve the manual scoring settings.
& _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 getQuestionTypeByTypeId($type_id)
getContentStylePath($a_style_id)
get content style path
getSyntaxStylePath()
get syntax style path
_lookupOnlineTestAccess($a_test_id, $a_user_id)
Checks if a user is allowd to run an online exam.
_getParticipantData($active_id)
Retrieves a participant name from active id.
applyFilterCriteria($in_rows)
trackTestObjectReadEvent()
cancelDeleteSelectedUserDataObject()
Cancels the deletion of all user data for the test object.
showDetailedResultsObject()
Shows the pass overview and the answers of one ore more users for the scored pass.
createQuestionObject()
Called when a new question should be created from a test.
createQuestionpoolTargetObject($cmd)
Called when a new question should be created from a test Important: $cmd may be overwritten if no que...
browseForQuestionsObject()
download_paragraphObject()
download source code paragraph
getRandomQuestionsTab(&$tabs_gui)
printobject()
Print tab to create a print of all questions with points and solutions.
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
userResultsGatewayObject()
backObject()
Called when the back button in the question browser was pressed.
removeQuestionsForm($checked_questions)
Displays a form to confirm the removal of questions from the test.
$objectiveOrientedContainer
insertQuestionsBeforeObject()
Insert checked questions before the actual selection.
cancelRemoveQuestionsObject()
Cancels the removal of questions from the test.
createQuestionPool($name="dummy", $description="")
Creates a new questionpool and returns the reference id.
forwardToEvalObjectiveOrientedGUI()
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
static $infoScreenChildClasses
importFileObject()
form for new test object import
showUserAnswersObject()
Shows the answers of one ore more users for the scored pass.
removeParticipantObject()
deleteSingleUserResultsObject()
Asks for a confirmation to delete selected user data of the test object.
copyAndLinkQuestionsToPoolObject()
@global ilObjectDataCache $ilObjDataCache
applyTemplate($templateData, $object)
addDidacticTemplateOptions(array &$a_options)
Add custom templates.
createQuestionPoolAndCopyObject()
afterSave(ilObject $a_new_object)
save object @access public
movePageFormObject()
Move current page.
createUserResults($show_pass_details, $show_answers, $show_reached_points, $show_user_results)
prepareSubGuiOutput()
prepares ilias to get output rendered by sub gui class
buildPageViewToolbar($qid=0)
Questions per page.
participantsActionObject()
Evaluates the actions on the participants page.
isCommandClassAnyInfoScreenChild()
executeCreateQuestionObject()
Called when a new question should be created from a test after confirmation.
confirmDeleteSelectedUserDataObject()
Deletes the selected user data for the test object.
areSkillLevelThresholdsMissing()
confirmDeleteAllUserResultsObject()
Deletes all user data for the test object.
getSkillLevelThresholdsMissingInfo()
getBrowseForQuestionsTab(&$tabs_gui)
executeCommand()
execute command
addParticipantsObject($a_user_ids=array())
insertQuestionsObject()
Insert questions from the questionbrowser into the test.
getObjectiveOrientedContainer()
determineObjectiveOrientedContainer()
static _goto($a_target)
Redirect script to call a test with the test reference id.
copyQuestionToPool($sourceQuestionId, $targetParentId)
$testQuestionSetConfigFactory
cancelRandomSelectObject()
Cancels the form for random selection of questions.
insertRandomSelectionObject()
Inserts a random selection into the test.
applyDefaultsObject($confirmed=false)
Applies the selected test defaults.
removeQuestionsObject()
Called when a selection of questions should be removed from the test.
createRandomSelectionObject()
Offers a random selection for insertion in the test.
populateDeleteDynamicTestResultsButton($testSession, &$big_button)
downloadFileObject()
download file
copyQuestionsToPoolObject()
importVerifiedFileObject()
imports question(s) into the questionpool (after verification)
copyToQuestionpoolObject()
uploadObject($redirect=true)
display status information or report errors messages in case of error
moveQuestionsObject()
Marks selected questions for moving.
copyAndLinkToQuestionpoolObject()
ilObjTestGUI()
Constructor @access public.
questionsTabGatewayObject()
fullscreenObject()
show fullscreen view
redirectTo_ilObjTestSettingsGeneralGUI_showForm_Object()
participantsObject()
Creates the output of the test participants.
confirmRemoveQuestionsObject()
Remove questions from the test after confirmation.
showPassOverviewObject()
Shows the pass overview of the scored pass for one ore more users.
deleteAllUserResultsObject()
Asks for a confirmation to delete all user data of the test object.
redirectToInfoScreenObject()
cancelCreateQuestionObject()
Called when the creation of a new question is cancelled.
populateQuestionBrowserToolbarButtons(ilToolbarGUI $toolbar, $context)
getTabs(&$tabs_gui)
adds tabs to tab gui object
initImportForm($a_new_type)
Init object import form.
exportObject()
Gateway for exports initiated from workspace, as there is a generic forward to {objTypeMainGUI}::expo...
deleteDefaultsObject()
Deletes selected test defaults.
historyObject()
Creates the change history for a test.
uploadTstObject()
imports test and question(s)
insertQuestionsAfterObject()
Insert checked questions after the actual selection.
getQuestionpoolCreationForm()
copyQuestionsToPool($questionIds, $qplId)
resetFilterObject()
Resets the filter for the question browser.
saveOrderAndObligationsObject()
randomselectObject()
Creates a form for random selection of questions.
confirmedApplyDefaultsObject()
addDefaultsObject()
Adds the defaults of this test to the defaults.
deleteAllUserDataObject()
Asks for a confirmation to delete all user data of the test object.
showUserResults($show_pass_details, $show_answers, $show_reached_points=FALSE)
Shows the pass overview of the scored pass for one ore more users.
isDeleteDynamicTestResultsButtonRequired($testSession, $testSequence)
filterObject()
Sets the filter for the question browser.
certificateObject()
Shows the certificate editor.
const CMD_SHOW_FORM
command constants
const QUESTION_SET_TYPE_DYNAMIC
type setting value for dynamic question set (continues testing mode)
static _getTestDefaults($test_defaults_id)
const QUESTION_SET_TYPE_RANDOM
type setting value for random question set
_getImportDirectory()
Get the import directory location of the test.
_setImportDirectory($a_import_dir=null)
set import directory
const QUESTION_SET_TYPE_FIXED
type setting value for fixed question set
static isSkillManagementGloballyActivated()
static isQuestionObligationPossible($questionId)
checks wether the obligation for question with given id is possible or not
_createImportDirectory()
creates data directory for import files (data_dir/tst_data/tst_<id>/import, depending on data directo...
static _lookupName($a_user_id)
lookup user name
GUI class for the workflow of copying objects.
Class ilObjectGUI Basic methods of all Output classes.
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
prepareOutput()
prepare output
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
addHeaderAction()
Add header action menu.
createObject()
create new object form
setTitleAndDescription()
called by prepare output
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
getRefId()
get reference id @access public
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
static _requiresPurchaseToAccess($a_ref_id, $a_purchasetype='')
this function should be used by all buyable repository objects !!
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
Class ilScoringAdjustmentGUI.
Settings template application class.
static getAllSettingsTemplates($a_type, $a_include_auto_generated=false)
Get all settings templates of type.
special template class to simplify handling of ITX/PEAR
Test certificate adapter.
Output class for assessment test evaluation.
Export User Interface Class.
@ilCtrl_Calls ilTestExpressPageObjectGUI: assMultipleChoiceGUI, assClozeTestGUI, assMatchingQuestionG...
const PDF_OUTPUT_DOWNLOAD
static generatePDF($pdf_output, $output_mode, $filename=null)
const CONTEXT_INFO_SCREEN
Class ilTestPersonalDefaultSettingsTableGUI.
const CMD_BROWSE_QUESTIONS
Test results import parser.
ilTestScoringByQuestionsGUI
Service GUI class for tests.
const CMD_SHOW_SKILL_THRESHOLDS
This class represents a text area property in a property form.
This class represents a text property in a property form.
Class ilTimingOverviewTableGUI.
Class ilUnitConfigurationRepository.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static infoPanel($a_keep=true)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
static setTokenMaxLifetimeInSeconds($token_max_lifetime_in_seconds)
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
const CLOZE_TEST_IDENTIFIER
Question identifier constants.
const REDIRECT_NONE
Redirect after finishing test constants.
const FLASHAPPLET_QUESTION_IDENTIFIER
const IMAGEMAP_QUESTION_IDENTIFIER
const SINGLE_CHOICE_QUESTION_IDENTIFIER
const FORMULA_QUESTION_IDENTIFIER
const ERROR_TEXT_IDENTIFIER
const SCORE_ZERO_POINTS_WHEN_UNANSWERED
const TEXTSUBSET_QUESTION_IDENTIFIER
const COUNT_PARTIAL_SOLUTIONS
const NUMERIC_QUESTION_IDENTIFIER
const JAVAAPPLET_QUESTION_IDENTIFIER
const TEST_FIXED_SEQUENCE
Test constants.
const FILE_UPLOAD_IDENTIFIER
const TEXT_QUESTION_IDENTIFIER
const LONG_MENU_QUESTION_IDENTIFIER
const KPRIM_CHOICE_QUESTION_IDENTIFIER
const ORDERING_HORIZONTAL_IDENTIFIER
const MATCHING_QUESTION_IDENTIFIER
const MULTIPLE_CHOICE_QUESTION_IDENTIFIER
const ORDERING_QUESTION_IDENTIFIER
redirection script todo: (a better solution should control the processing via a xml file)
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
if(!is_array($argv)) $options