23 include_once
"./classes/class.ilObjectGUI.php";
24 include_once
"./Modules/Test/classes/inc.AssessmentConstants.php";
35 $lng->loadLanguageModule(
"assessment");
38 $this->ctrl->saveParameter($this,
"ref_id");
41 if((
int)
$_GET[
'crs_show_result'])
43 $this->ctrl->saveParameter($this,
'crs_show_result',(
int) $_GET[
'crs_show_result']);
52 global $ilAccess, $ilNavigationHistory,
$ilCtrl;
54 if ((!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) && (!$ilAccess->checkAccess(
"visible",
"",
$_GET[
"ref_id"])))
57 $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
59 $cmd = $this->ctrl->getCmd(
"properties");
60 $next_class = $this->ctrl->getNextClass($this);
61 $this->ctrl->setReturn($this,
"properties");
62 if (method_exists($this->
object,
"getTestStyleLocation")) $this->tpl->addCss($this->object->getTestStyleLocation(
"output"),
"screen");
66 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
68 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
69 "ilias.php?baseClass=ilObjTestGUI&cmd=infoScreen&ref_id=".
$_GET[
"ref_id"],
"tst");
74 if(IS_PAYMENT_ENABLED)
76 include_once
'Services/Payment/classes/class.ilPaymentObject.php';
81 $this->tpl->getStandardTemplate();
83 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
85 $ret = $this->ctrl->forwardCommand($pp);
94 case "ilinfoscreengui":
99 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
102 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
103 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
105 $this->ctrl->forwardCommand($md_gui);
107 case "iltestoutputgui":
108 include_once
"./Modules/Test/classes/class.ilTestOutputGUI.php";
112 $this->ctrl->forwardCommand($output_gui);
115 case "iltestevaluationgui":
116 include_once
"./Modules/Test/classes/class.ilTestEvaluationGUI.php";
119 $this->ctrl->forwardCommand($evaluation_gui);
122 case "iltestservicegui":
123 include_once
"./Modules/Test/classes/class.ilTestServiceGUI.php";
126 $this->ctrl->forwardCommand($serviceGUI);
129 case 'ilpermissiongui':
130 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
133 $ret =& $this->ctrl->forwardCommand($perm_gui);
136 case "illearningprogressgui":
137 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
141 $this->ctrl->forwardCommand($new_gui);
145 case "ilcertificategui":
146 include_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
148 include_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
150 $this->ctrl->forwardCommand($output_gui);
153 case "iltestscoringgui":
154 include_once
"./Modules/Test/classes/class.ilTestScoringGUI.php";
157 $this->ctrl->forwardCommand($output_gui);
160 case 'ilobjectcopygui':
162 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
165 $this->ctrl->forwardCommand($cp);
168 case 'ilrepositorysearchgui':
170 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
172 $rep_search->setCallback($this,
173 'addParticipantsObject',
179 $this->ctrl->setReturn($this,
'participants');
180 $ret =& $this->ctrl->forwardCommand($rep_search);
181 $this->tabs_gui->setTabActive(
'participants');
186 if (preg_match(
"/deleteqpl_\d+/",
$cmd))
188 $cmd =
"randomQuestions";
190 if ((strcmp(
$cmd,
"properties") == 0) && (
$_GET[
"browse"]))
195 if ((strcmp(
$cmd,
"properties") == 0) && (
$_GET[
"up"] ||
$_GET[
"down"]))
204 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui" &&
213 $this->ctrl->redirect($this,
"infoScreen");
218 $this->ctrl->redirectByClass(
"iltestevaluationgui",
"outEvaluation");
226 if (strcmp($_FILES[
"xmldoc"][
"tmp_name"],
"") == 0)
232 $this->ctrl->setParameter($this,
"new_type", $this->type);
244 if (!strlen(
$_POST[
'Fobject'][
'title']))
247 $this->ctrl->setParameter($this,
'new_type',
$_GET[
'new_type']);
248 $this->ctrl->redirect($this,
'create');
252 if (
$_POST[
"defaults"] > 0)
254 $newObj->applyDefaults(
$_POST[
"defaults"]);
259 ilUtil::redirect(
"ilias.php?baseClass=ilObjTestGUI&ref_id=".$newObj->getRefId().
"&cmd=properties");
264 include_once
"./Services/Utilities/classes/class.ilUtil.php";
265 $path = $this->tree->getPathFull($this->object->getRefID());
271 include_once
"./Services/Utilities/classes/class.ilUtil.php";
282 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
286 $this->ctrl->redirect($this,
"infoScreen");
289 $export_dir = $this->
object->getExportDirectory();
290 $export_files = $this->
object->getExportFiles($export_dir);
292 if(count($export_files) > 0)
294 foreach($export_files as $exp_file)
296 $file_arr = explode(
"__", $exp_file);
298 array_push(
$data, array(
300 'size' => filesize($export_dir.
"/".$exp_file),
306 include_once
"./Modules/Test/classes/tables/class.ilTestExportTableGUI.php";
308 $table_gui->setData(
$data);
309 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
319 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
321 include_once(
"./Modules/Test/classes/class.ilTestExport.php");
323 $test_exp->buildExportFile();
329 $this->ctrl->redirect($this,
"export");
339 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
341 include_once(
"./Modules/Test/classes/class.ilTestExport.php");
343 $test_exp->buildExportFile();
349 $this->ctrl->redirect($this,
"export");
358 if(!isset(
$_POST[
"file"]))
361 $this->ctrl->redirect($this,
"export");
364 if (count(
$_POST[
"file"]) > 1)
367 $this->ctrl->redirect($this,
"export");
371 $export_dir = $this->
object->getExportDirectory();
381 if (!isset(
$_POST[
"file"]))
384 $this->ctrl->redirect($this,
"export");
389 $export_dir = $this->
object->getExportDirectory();
390 $export_files = $this->
object->getExportFiles($export_dir);
392 if (count(
$_POST[
"file"]) > 0)
394 foreach (
$_POST[
"file"] as $exp_file)
396 $file_arr = explode(
"__", $exp_file);
398 array_push(
$data, array(
400 'size' => filesize($export_dir.
"/".$exp_file),
406 include_once
"./Modules/Test/classes/tables/class.ilTestExportTableGUI.php";
408 $table_gui->setData(
$data);
409 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
428 $this->ctrl->redirect($this,
"export");
437 $export_dir = $this->
object->getExportDirectory();
440 $exp_file = $export_dir.
"/".
$file;
441 $exp_dir = $export_dir.
"/".substr($file, 0, strlen($file) - 4);
442 if (@is_file($exp_file))
446 if (@is_dir($exp_dir))
452 $this->ctrl->redirect($this,
"export");
460 if ($_FILES[
"xmldoc"][
"error"] > UPLOAD_ERR_OK)
466 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
471 $file = pathinfo($_FILES[
"xmldoc"][
"name"]);
479 $subdir = basename(
$file[
"basename"],
".".
$file[
"extension"]);
485 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
487 $result = $qtiParser->startParsing();
488 $founditems =& $qtiParser->getFoundItems();
490 if (count($founditems) == 0)
504 foreach ($founditems as $item)
506 if (strlen($item[
"type"]))
526 $_SESSION[
"tst_import_results_file"] = $results_file;
527 $_SESSION[
"tst_import_xml_file"] = $xml_file;
528 $_SESSION[
"tst_import_qti_file"] = $qti_file;
529 $_SESSION[
"tst_import_subdir"] = $subdir;
531 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.tst_import_verification.html");
532 $row_class = array(
"tblrow1",
"tblrow2");
534 foreach ($founditems as $item)
536 $this->tpl->setCurrentBlock(
"verification_row");
537 $this->tpl->setVariable(
"ROW_CLASS", $row_class[$counter++ % 2]);
538 $this->tpl->setVariable(
"QUESTION_TITLE", $item[
"title"]);
539 $this->tpl->setVariable(
"QUESTION_IDENT", $item[
"ident"]);
540 include_once
"./Services/QTI/classes/class.ilQTIItem.php";
541 switch ($item[
"type"])
543 case "MULTIPLE CHOICE QUESTION":
545 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"qt_multiple_choice"));
547 case "SINGLE CHOICE QUESTION":
549 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assSingleChoice"));
551 case "NUMERIC QUESTION":
553 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assNumeric"));
555 case "TEXTSUBSET QUESTION":
557 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextSubset"));
559 case "CLOZE QUESTION":
561 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assClozeTest"));
563 case "IMAGE MAP QUESTION":
565 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assImagemapQuestion"));
567 case "JAVA APPLET QUESTION":
569 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assJavaApplet"));
571 case "MATCHING QUESTION":
573 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assMatchingQuestion"));
575 case "ORDERING QUESTION":
577 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assOrderingQuestion"));
579 case "TEXT QUESTION":
581 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"assTextQuestion"));
584 $this->tpl->parseCurrentBlock();
586 $this->tpl->setCurrentBlock(
"adm_content");
587 $this->tpl->setVariable(
"TEXT_TYPE", $this->lng->txt(
"question_type"));
588 $this->tpl->setVariable(
"TEXT_TITLE", $this->lng->txt(
"question_title"));
589 $this->tpl->setVariable(
"FOUND_QUESTIONS_INTRODUCTION", $this->lng->txt(
"tst_import_verify_found_questions"));
590 $this->tpl->setVariable(
"VERIFICATION_HEADING", $this->lng->txt(
"import_tst"));
591 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
593 $this->tpl->setVariable(
"QUESTIONPOOL_ID",
$_POST[
"qpl"]);
594 $this->tpl->setVariable(
"VALUE_IMPORT", $this->lng->txt(
"import"));
595 $this->tpl->setVariable(
"VALUE_CANCEL", $this->lng->txt(
"cancel"));
596 $this->tpl->parseCurrentBlock();
604 include_once
"./Modules/Test/classes/class.ilObjTest.php";
608 $newObj->setType(
$_GET[
"new_type"]);
610 $newObj->setTitle(
"dummy");
612 $newObj->setDescription(
"test import");
614 $newObj->create(
true);
616 $newObj->createReference();
618 $newObj->putInTree(
$_GET[
"ref_id"]);
620 $newObj->setPermissions(
$_GET[
"ref_id"]);
622 $newObj->notify(
"new",
$_GET[
"ref_id"],
$_GET[
"parent_non_rbac_id"],
$_GET[
"ref_id"],$newObj->getRefId());
624 $newObj->mark_schema->flush();
627 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
630 if (
$_POST[
"qpl_id"] ==
"-1")
632 $qpl_id = $newObj->id;
636 $qpl_id =
$_POST[
"qpl_id"];
641 #$qtiParser = new ilQTIParser($_SESSION["tst_import_qti_file"], IL_MO_PARSE_QTI, $_POST['qpl_id'], $_POST["ident"]);
643 $qtiParser->setTestObject($newObj);
645 $result = $qtiParser->startParsing();
649 include_once (
"./Modules/LearningModule/classes/class.ilContObjParser.php");
651 $contParser->setQuestionMapping($qtiParser->getImportMapping());
652 $contParser->startParsing();
655 if (@file_exists(
$_SESSION[
"tst_import_results_file"]))
657 include_once (
"./Modules/Test/classes/class.ilTestResultsImportParser.php");
666 "&baseClass=ilObjTestGUI");
691 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_properties_save_confirmation.html",
"Modules/Test");
696 $information = $this->lng->txt(
"change_properties_from_random_to_standard");
699 $information = $this->lng->txt(
"change_properties_from_standard_to_random");
702 foreach (
$_POST as $key => $value)
704 if (strcmp($key,
"cmd") != 0)
706 if (is_array($value))
708 foreach ($value as $k => $v)
710 $this->tpl->setCurrentBlock(
"hidden_variable");
711 $this->tpl->setVariable(
"HIDDEN_KEY", $key .
"[" . $k .
"]");
712 $this->tpl->setVariable(
"HIDDEN_VALUE", $v);
713 $this->tpl->parseCurrentBlock();
718 $this->tpl->setCurrentBlock(
"hidden_variable");
719 $this->tpl->setVariable(
"HIDDEN_KEY", $key);
720 $this->tpl->setVariable(
"HIDDEN_VALUE", $value);
721 $this->tpl->parseCurrentBlock();
725 $this->tpl->setCurrentBlock(
"hidden_variable");
726 $this->tpl->setVariable(
"HIDDEN_KEY",
"tst_properties_confirmation");
727 $this->tpl->setVariable(
"HIDDEN_VALUE",
"1");
728 $this->tpl->parseCurrentBlock();
729 $this->tpl->setCurrentBlock(
"adm_content");
730 $this->tpl->setVariable(
"TXT_CONFIRMATION", $this->lng->txt(
"confirmation"));
731 $this->tpl->setVariable(
"TXT_INFORMATION", $information);
732 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
733 $this->tpl->setVariable(
"BTN_CONFIRM", $this->lng->txt(
"confirm"));
734 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
735 $this->tpl->parseCurrentBlock();
748 $total = $this->
object->evalTotalPersons();
752 $this->
object->setCountSystem(
$_POST[
"count_system"]);
753 $this->
object->setMCScoring(
$_POST[
"mc_scoring"]);
754 $this->
object->setScoreCutting(
$_POST[
"score_cutting"]);
755 $this->
object->setPassScoring(
$_POST[
"pass_scoring"]);
758 $this->
object->setAnswerFeedback((is_array(
$_POST[
'instant_feedback']) && in_array(
'instant_feedback_answer',
$_POST[
'instant_feedback'])) ? 1 : 0);
759 $this->
object->setAnswerFeedbackPoints((is_array(
$_POST[
'instant_feedback']) && in_array(
'instant_feedback_points',
$_POST[
'instant_feedback'])) ? 1 : 0);
760 $this->
object->setInstantFeedbackSolution((is_array(
$_POST[
'instant_feedback']) && in_array(
'instant_feedback_solution',
$_POST[
'instant_feedback'])) ? 1 : 0);
762 $this->
object->setScoreReporting(
$_POST[
"results_access"]);
765 $this->
object->setReportingDate(sprintf(
"%04d%02d%02d%02d%02d%02d",
766 $_POST[
"reporting_date"][
'date'][
"y"],
767 $_POST[
"reporting_date"][
'date'][
"m"],
768 $_POST[
"reporting_date"][
'date'][
"d"],
769 $_POST[
"reporting_date"][
'time'][
"h"],
770 $_POST[
"reporting_date"][
'time'][
"m"],
771 $_POST[
"reporting_date"][
'time'][
"s"]
776 $this->
object->setReportingDate(
'');
779 $this->
object->setShowPassDetails((is_array(
$_POST[
'results_presentation']) && in_array(
'pass_details',
$_POST[
'results_presentation'])) ? 1 : 0);
780 $this->
object->setShowSolutionDetails((is_array(
$_POST[
'results_presentation']) && in_array(
'solution_details',
$_POST[
'results_presentation'])) ? 1 : 0);
781 $this->
object->setShowSolutionPrintview((is_array(
$_POST[
'results_presentation']) && in_array(
'solution_printview',
$_POST[
'results_presentation'])) ? 1 : 0);
782 $this->
object->setShowSolutionFeedback((is_array(
$_POST[
'results_presentation']) && in_array(
'solution_feedback',
$_POST[
'results_presentation'])) ? 1 : 0);
783 $this->
object->setShowSolutionAnswersOnly((is_array(
$_POST[
'results_presentation']) && in_array(
'solution_answers_only',
$_POST[
'results_presentation'])) ? 1 : 0);
784 $this->
object->setShowSolutionSignature((is_array(
$_POST[
'results_presentation']) && in_array(
'solution_signature',
$_POST[
'results_presentation'])) ? 1 : 0);
785 $this->
object->setShowSolutionSuggested((is_array(
$_POST[
'results_presentation']) && in_array(
'solution_suggested',
$_POST[
'results_presentation'])) ? 1 : 0);
787 $this->
object->setExportSettingsSingleChoiceShort((is_array(
$_POST[
'export_settings']) && in_array(
'exp_sc_short',
$_POST[
'export_settings'])) ? 1 : 0);
789 $this->
object->saveToDb(
true);
791 $this->ctrl->redirect($this,
"scoring");
803 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
807 $this->ctrl->redirect($this,
"infoScreen");
810 $save = (strcmp($this->ctrl->getCmd(),
"saveScoring") == 0) ? TRUE : FALSE;
811 $total = $this->
object->evalTotalPersons();
812 $this->tpl->addJavascript(
"./Services/JavaScript/js/Basic.js");
814 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
816 $form->setFormAction($this->ctrl->getFormAction($this));
817 $form->setTableWidth(
"100%");
818 $form->setId(
"test_properties_scoring");
822 $header->setTitle($this->lng->txt(
"scoring"));
823 $form->addItem($header);
826 $count_system =
new ilRadioGroupInputGUI($this->lng->txt(
"tst_text_count_system"),
"count_system");
828 $count_system->addOption(
new ilRadioOption($this->lng->txt(
"tst_count_correct_solutions"), 1,
''));
829 $count_system->setValue($this->object->getCountSystem());
830 $count_system->setInfo($this->lng->txt(
"tst_count_system_description"));
833 $count_system->setDisabled(
true);
835 $form->addItem($count_system);
838 $mc_scoring =
new ilRadioGroupInputGUI($this->lng->txt(
"tst_score_mcmr_questions"),
"mc_scoring");
839 $mc_scoring->
addOption(
new ilRadioOption($this->lng->txt(
"tst_score_mcmr_zero_points_when_unanswered"), 0,
''));
840 $mc_scoring->addOption(
new ilRadioOption($this->lng->txt(
"tst_score_mcmr_use_scoring_system"), 1,
''));
841 $mc_scoring->setValue($this->object->getMCScoring());
842 $mc_scoring->setInfo($this->lng->txt(
"tst_score_mcmr_questions_description"));
845 $mc_scoring->setDisabled(
true);
847 $form->addItem($mc_scoring);
850 $score_cutting =
new ilRadioGroupInputGUI($this->lng->txt(
"tst_score_cutting"),
"score_cutting");
852 $score_cutting->addOption(
new ilRadioOption($this->lng->txt(
"tst_score_cut_test"), 1,
''));
853 $score_cutting->setValue($this->object->getScoreCutting());
854 $score_cutting->setInfo($this->lng->txt(
"tst_score_cutting_description"));
857 $score_cutting->setDisabled(
true);
859 $form->addItem($score_cutting);
864 $pass_scoring->addOption(
new ilRadioOption($this->lng->txt(
"tst_pass_best_pass"), 1,
''));
865 $pass_scoring->setValue($this->object->getPassScoring());
866 $pass_scoring->setInfo($this->lng->txt(
"tst_pass_scoring_description"));
869 $pass_scoring->setDisabled(
true);
871 $form->addItem($pass_scoring);
875 $instant_feedback->
addOption(
new ilCheckboxOption($this->lng->txt(
"tst_instant_feedback_answer_specific"),
'instant_feedback_answer',
''));
876 $instant_feedback->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_instant_feedback_results"),
'instant_feedback_points',
''));
877 $instant_feedback->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_instant_feedback_solution"),
'instant_feedback_solution',
''));
879 if ($this->object->getAnswerFeedback()) array_push($values,
'instant_feedback_answer');
880 if ($this->object->getAnswerFeedbackPoints()) array_push($values,
'instant_feedback_points');
881 if ($this->object->getInstantFeedbackSolution()) array_push($values,
'instant_feedback_solution');
882 $instant_feedback->setValue($values);
883 $instant_feedback->setInfo($this->lng->txt(
"tst_instant_feedback_description"));
884 $form->addItem($instant_feedback);
887 $results_access =
new ilRadioGroupInputGUI($this->lng->txt(
"tst_results_access"),
"results_access");
889 $results_access->addOption(
new ilRadioOption($this->lng->txt(
"tst_results_access_always"), 2,
''));
890 $results_access->addOption(
new ilRadioOption($this->lng->txt(
"tst_results_access_never"), 4,
''));
891 $results_access->addOption(
new ilRadioOption($this->lng->txt(
"tst_results_access_date"), 3,
''));
892 $results_access->setValue($this->object->getScoreReporting());
893 $results_access->setInfo($this->lng->txt(
"tst_results_access_description"));
897 $reporting_date->setShowDate(
true);
898 $reporting_date->setShowTime(
true);
899 if (strlen($this->object->getReportingDate()))
907 $results_access->addSubItem($reporting_date);
908 $form->addItem($results_access);
911 $results_presentation =
new ilCheckboxGroupInputGUI($this->lng->txt(
"tst_results_presentation"),
"results_presentation");
913 $results_presentation->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_show_solution_details"),
'solution_details',
''));
914 $results_presentation->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_show_solution_printview"),
'solution_printview',
''));
915 $results_presentation->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_show_solution_feedback"),
'solution_feedback',
''));
916 $results_presentation->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_show_solution_answers_only"),
'solution_answers_only',
''));
917 $signatureOption =
new ilCheckboxOption($this->lng->txt(
"tst_show_solution_signature"),
'solution_signature',
'');
918 $results_presentation->addOption($signatureOption);
919 $results_presentation->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_show_solution_suggested"),
'solution_suggested',
''));
921 if ($this->object->getShowPassDetails()) array_push($values,
'pass_details');
922 if ($this->object->getShowSolutionDetails()) array_push($values,
'solution_details');
923 if ($this->object->getShowSolutionPrintview()) array_push($values,
'solution_printview');
924 if ($this->object->getShowSolutionFeedback()) array_push($values,
'solution_feedback');
925 if ($this->object->getShowSolutionAnswersOnly()) array_push($values,
'solution_answers_only');
926 if ($this->object->getShowSolutionSignature()) array_push($values,
'solution_signature');
927 if ($this->object->getShowSolutionSuggested()) array_push($values,
'solution_suggested');
928 $results_presentation->setValue($values);
929 $results_presentation->setInfo($this->lng->txt(
"tst_results_presentation_description"));
930 if ($this->object->getAnonymity())
932 $signatureOption->setDisabled(
true);
934 $form->addItem($results_presentation);
940 if ($this->object->getExportSettingsSingleChoiceShort()) array_push($values,
'exp_sc_short');
941 $export_settings->setValue($values);
942 $form->addItem($export_settings);
944 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) $form->addCommandButton(
"saveScoring", $this->lng->txt(
"save"));
949 $errors = !$form->checkInput();
950 $form->setValuesByPost();
951 if (
$errors) $checkonly =
false;
953 if (!$checkonly) $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
965 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
969 $this->ctrl->redirect($this,
"infoScreen");
972 $save = (strcmp($this->ctrl->getCmd(),
"saveProperties") == 0) ? TRUE : FALSE;
973 $total = $this->
object->evalTotalPersons();
974 $this->tpl->addJavascript(
"./Services/JavaScript/js/Basic.js");
976 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
978 $form->setFormAction($this->ctrl->getFormAction($this));
979 $form->setTableWidth(
"100%");
980 $form->setId(
"test_properties");
984 $header->setTitle($this->lng->txt(
"tst_general_properties"));
985 $form->addItem($header);
990 if (
$total) $anonymity->setDisabled(
true);
991 $anonymity->setChecked($this->object->getAnonymity());
992 $anonymity->setInfo($this->lng->txt(
"tst_anonymity_description"));
993 $form->addItem($anonymity);
996 $random =
new ilCheckboxInputGUI($this->lng->txt(
"tst_random_selection"),
"random_test");
998 if (
$total) $random->setDisabled(
true);
999 $random->setChecked($this->object->isRandomTest());
1000 $random->setInfo($this->lng->txt(
"tst_random_test_description"));
1001 $form->addItem($random);
1004 $intro =
new ilTextAreaInputGUI($this->lng->txt(
"tst_introduction"),
"introduction");
1005 $intro->
setValue($this->object->prepareTextareaOutput($this->object->getIntroduction()));
1006 $intro->setRows(10);
1007 $intro->setCols(80);
1008 $intro->setUseRte(TRUE);
1009 $intro->addPlugin(
"latex");
1010 $intro->addButton(
"latex");
1011 $intro->setRTESupport($this->object->getId(),
"tst",
"assessment");
1012 $intro->setRteTagSet(
'full');
1015 $showinfo->setValue(1);
1016 $showinfo->setChecked($this->object->getShowInfo());
1017 $showinfo->setOptionTitle($this->lng->txt(
"showinfo"));
1018 $showinfo->setInfo($this->lng->txt(
"showinfo_desc"));
1019 $intro->addSubItem($showinfo);
1020 $form->addItem($intro);
1023 $finalstatement =
new ilTextAreaInputGUI($this->lng->txt(
"final_statement"),
"finalstatement");
1024 $finalstatement->
setValue($this->object->prepareTextareaOutput($this->object->getFinalStatement()));
1025 $finalstatement->setRows(10);
1026 $finalstatement->setCols(80);
1027 $finalstatement->setUseRte(TRUE);
1028 $finalstatement->addPlugin(
"latex");
1029 $finalstatement->addButton(
"latex");
1030 $finalstatement->setRTESupport($this->object->getId(),
"tst",
"assessment");
1031 $finalstatement->setRteTagSet(
'full');
1034 $showfinal->setValue(1);
1035 $showfinal->setChecked($this->object->getShowFinalStatement());
1036 $showfinal->setOptionTitle($this->lng->txt(
"final_statement_show"));
1037 $showfinal->setInfo($this->lng->txt(
"final_statement_show_desc"));
1038 $finalstatement->addSubItem($showfinal);
1039 $form->addItem($finalstatement);
1043 $seqheader->setTitle($this->lng->txt(
"tst_sequence_properties"));
1044 $form->addItem($seqheader);
1049 $postpone->setChecked($this->object->getSequenceSettings());
1050 $postpone->setInfo($this->lng->txt(
"tst_postpone_description"));
1051 $form->addItem($postpone);
1054 $shuffle =
new ilCheckboxInputGUI($this->lng->txt(
"tst_shuffle_questions"),
"chb_shuffle_questions");
1056 $shuffle->setChecked($this->object->getShuffleQuestions());
1057 $shuffle->setInfo($this->lng->txt(
"tst_shuffle_questions_description"));
1058 $form->addItem($shuffle);
1061 $list_of_questions =
new ilCheckboxInputGUI($this->lng->txt(
"tst_show_summary"),
"list_of_questions");
1062 $list_of_questions->
setOptionTitle($this->lng->txt(
"tst_show_summary"));
1063 $list_of_questions->setValue(1);
1064 $list_of_questions->setChecked($this->object->getListOfQuestions());
1065 $list_of_questions->setInfo($this->lng->txt(
"tst_show_summary_description"));
1068 $list_of_questions_options->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_list_of_questions_start"),
'chb_list_of_questions_start',
''));
1069 $list_of_questions_options->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_list_of_questions_end"),
'chb_list_of_questions_end',
''));
1070 $list_of_questions_options->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_list_of_questions_with_description"),
'chb_list_of_questions_with_description',
''));
1072 if ($this->object->getListOfQuestionsStart()) array_push($values,
'chb_list_of_questions_start');
1073 if ($this->object->getListOfQuestionsEnd()) array_push($values,
'chb_list_of_questions_end');
1074 if ($this->object->getListOfQuestionsDescription()) array_push($values,
'chb_list_of_questions_with_description');
1075 $list_of_questions_options->setValue($values);
1077 $list_of_questions->addSubItem($list_of_questions_options);
1078 $form->addItem($list_of_questions);
1081 $marking =
new ilCheckboxInputGUI($this->lng->txt(
"question_marking"),
"chb_show_marker");
1083 $marking->setChecked($this->object->getShowMarker());
1084 $marking->setInfo($this->lng->txt(
"question_marking_description"));
1085 $form->addItem($marking);
1088 $cancel =
new ilCheckboxInputGUI($this->lng->txt(
"tst_show_cancel"),
"chb_show_cancel");
1090 $cancel->setChecked($this->object->getShowCancel());
1091 $cancel->setInfo($this->lng->txt(
"tst_show_cancel_description"));
1092 $form->addItem($cancel);
1096 $kioskheader->setTitle($this->lng->txt(
"kiosk"));
1097 $form->addItem($kioskheader);
1102 $kiosk->setChecked($this->object->getKioskMode());
1103 $kiosk->setInfo($this->lng->txt(
"kiosk_description"));
1108 $kiosktitle->addOption(
new ilCheckboxOption($this->lng->txt(
"kiosk_show_participant"),
'kiosk_participant',
''));
1110 if ($this->object->getShowKioskModeTitle()) array_push($values,
'kiosk_title');
1111 if ($this->object->getShowKioskModeParticipant()) array_push($values,
'kiosk_participant');
1112 $kiosktitle->setValue($values);
1113 $kiosktitle->setInfo($this->lng->txt(
"kiosk_options_desc"));
1114 $kiosk->addSubItem($kiosktitle);
1116 $form->addItem($kiosk);
1120 $sessionheader->setTitle($this->lng->txt(
"tst_session_settings"));
1121 $form->addItem($sessionheader);
1124 $nr_of_tries =
new ilTextInputGUI($this->lng->txt(
"tst_nr_of_tries"),
"nr_of_tries");
1126 $nr_of_tries->setValue($this->object->getNrOfTries());
1127 $nr_of_tries->setRequired(
true);
1128 $nr_of_tries->setSuffix($this->lng->txt(
"0_unlimited"));
1129 if (
$total) $nr_of_tries->setDisabled(
true);
1130 $form->addItem($nr_of_tries);
1133 $processing =
new ilCheckboxInputGUI($this->lng->txt(
"tst_processing_time"),
"chb_processing_time");
1135 $processing->setOptionTitle($this->lng->txt(
"enabled"));
1136 $processing->setChecked($this->object->getEnableProcessingTime());
1140 $ptime = $this->
object->getProcessingTimeAsArray();
1141 $processingtime->setHours($ptime[
'hh']);
1142 $processingtime->setMinutes($ptime[
'mm']);
1143 $processingtime->setSeconds($ptime[
'ss']);
1144 $processingtime->setShowMonths(
false);
1145 $processingtime->setShowDays(
false);
1146 $processingtime->setShowHours(
true);
1147 $processingtime->setShowMinutes(
true);
1148 $processingtime->setShowSeconds(
true);
1149 $processingtime->setInfo($this->lng->txt(
"tst_processing_time_desc"));
1150 $processing->addSubItem($processingtime);
1154 $resetprocessing->setValue(1);
1155 $resetprocessing->setOptionTitle($this->lng->txt(
"tst_reset_processing_time"));
1156 $resetprocessing->setChecked($this->object->getResetProcessingTime());
1157 $resetprocessing->setInfo($this->lng->txt(
"tst_reset_processing_time_desc"));
1158 $processing->addSubItem($resetprocessing);
1159 $form->addItem($processing);
1162 $enablestartingtime =
new ilCheckboxInputGUI($this->lng->txt(
"tst_starting_time"),
"chb_starting_time");
1164 $enablestartingtime->setOptionTitle($this->lng->txt(
"enabled"));
1165 $enablestartingtime->setChecked(strlen($this->object->getStartingTime()));
1168 $startingtime->setShowDate(
true);
1169 $startingtime->setShowTime(
true);
1170 if (strlen($this->object->getStartingTime()))
1178 $enablestartingtime->addSubItem($startingtime);
1179 if (
$total) $enablestartingtime->setDisabled(
true);
1180 if (
$total) $startingtime->setDisabled(
true);
1181 $form->addItem($enablestartingtime);
1184 $enableendingtime =
new ilCheckboxInputGUI($this->lng->txt(
"tst_ending_time"),
"chb_ending_time");
1186 $enableendingtime->setOptionTitle($this->lng->txt(
"enabled"));
1187 $enableendingtime->setChecked(strlen($this->object->getEndingTime()));
1190 $endingtime->setShowDate(
true);
1191 $endingtime->setShowTime(
true);
1192 if (strlen($this->object->getEndingTime()))
1200 $enableendingtime->addSubItem($endingtime);
1201 $form->addItem($enableendingtime);
1204 $prevanswers =
new ilCheckboxInputGUI($this->lng->txt(
"tst_use_previous_answers"),
"chb_use_previous_answers");
1206 $prevanswers->setChecked($this->object->getUsePreviousAnswers());
1207 $prevanswers->setInfo($this->lng->txt(
"tst_use_previous_answers_description"));
1208 $form->addItem($prevanswers);
1213 $forcejs->setChecked($this->object->getForceJS());
1214 $forcejs->setOptionTitle($this->lng->txt(
"forcejs"));
1215 $forcejs->setInfo($this->lng->txt(
"forcejs_desc"));
1216 $form->addItem($forcejs);
1221 $title_output->addOption(
new ilRadioOption($this->lng->txt(
"tst_title_output_hide_points"), 1,
''));
1222 $title_output->addOption(
new ilRadioOption($this->lng->txt(
"tst_title_output_no_title"), 2,
''));
1223 $title_output->setValue($this->object->getTitleOutput());
1224 $title_output->setInfo($this->lng->txt(
"tst_title_output_description"));
1225 $form->addItem($title_output);
1228 $password =
new ilTextInputGUI($this->lng->txt(
"tst_password"),
"password");
1230 $password->setValue($this->object->getPassword());
1231 $password->setInfo($this->lng->txt(
"tst_password_details"));
1232 $form->addItem($password);
1236 $restrictions->setTitle($this->lng->txt(
"tst_max_allowed_users"));
1237 $form->addItem($restrictions);
1239 $fixedparticipants =
new ilCheckboxInputGUI($this->lng->txt(
'participants_invitation'),
"fixedparticipants");
1241 $fixedparticipants->setChecked($this->object->getFixedParticipants());
1242 $fixedparticipants->setOptionTitle($this->lng->txt(
"tst_allow_fixed_participants"));
1243 $fixedparticipants->setInfo($this->lng->txt(
"participants_invitation_description"));
1244 $invited_users = $this->
object->getInvitedUsers();
1245 if (
$total && (count($invited_users) == 0))
1247 $fixedparticipants->setDisabled(
true);
1249 $form->addItem($fixedparticipants);
1253 $simul =
new ilTextInputGUI($this->lng->txt(
"tst_allowed_users"),
"allowedUsers");
1255 $simul->setValue(($this->object->getAllowedUsers()) ? $this->object->getAllowedUsers() :
'');
1256 $form->addItem($simul);
1259 $idle =
new ilTextInputGUI($this->lng->txt(
"tst_allowed_users_time_gap"),
"allowedUsersTimeGap");
1261 $idle->setSuffix($this->lng->txt(
"seconds"));
1262 $idle->setValue(($this->object->getAllowedUsersTimeGap()) ? $this->object->getAllowedUsersTimeGap() :
'');
1263 $form->addItem($idle);
1267 $notifications->setTitle($this->lng->txt(
"notifications"));
1268 $form->addItem($notifications);
1271 $mailnotification =
new ilRadioGroupInputGUI($this->lng->txt(
"tst_finish_notification"),
"mailnotification");
1273 $mailnotification->addOption(
new ilRadioOption($this->lng->txt(
"tst_finish_notification_simple"), 1,
''));
1274 $mailnotification->addOption(
new ilRadioOption($this->lng->txt(
"tst_finish_notification_advanced"), 2,
''));
1275 $mailnotification->setValue($this->object->getMailNotification());
1276 $form->addItem($mailnotification);
1279 $mailnottype->setValue(1);
1280 $mailnottype->setOptionTitle($this->lng->txt(
"mailnottype"));
1281 $mailnottype->setChecked($this->object->getMailNotificationType());
1282 $form->addItem($mailnottype);
1284 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) $form->addCommandButton(
"saveProperties", $this->lng->txt(
"save"));
1289 $errors = !$form->checkInput();
1290 $form->setValuesByPost();
1291 if (
$errors) $checkonly =
false;
1293 if (!$checkonly) $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
1304 if (!array_key_exists(
"tst_properties_confirmation",
$_POST))
1314 $total = $this->
object->evalTotalPersons();
1315 $randomtest_switch =
false;
1319 if (!array_key_exists(
"tst_properties_confirmation",
$_POST))
1321 if (($this->object->isRandomTest()) && (count($this->object->getRandomQuestionpools()) > 0))
1323 if (!
$_POST[
"random_test"])
1330 if ((!$this->object->isRandomTest()) && (count($this->object->questions) > 0))
1332 if (
$_POST[
"random_test"])
1341 if (!strlen(
$_POST[
"random_test"]))
1347 $random_test =
$_POST[
"random_test"];
1352 $random_test = $this->
object->isRandomTest();
1354 if ($random_test != $this->object->isRandomTest())
1356 $randomtest_switch =
true;
1361 $this->
object->setAnonymity(
$_POST[
"anonymity"]);
1362 $this->
object->setRandomTest($random_test);
1363 $this->
object->setNrOfTries(
$_POST[
"nr_of_tries"]);
1364 if (
$_POST[
'chb_starting_time'])
1370 $this->
object->setStartingTime(
'');
1373 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
1375 $this->
object->setShowInfo((
$_POST[
"showinfo"]) ? 1 : 0);
1377 $this->
object->setShowFinalStatement((
$_POST[
"showfinalstatement"]) ? 1 : 0);
1378 $this->
object->setSequenceSettings((
$_POST[
"chb_postpone"]) ? 1 : 0);
1379 $this->
object->setShuffleQuestions((
$_POST[
"chb_shuffle_questions"]) ? 1 : 0);
1380 $this->
object->setListOfQuestions(
$_POST[
"list_of_questions"]);
1381 if (is_array(
$_POST[
"list_of_questions_options"]))
1383 $this->
object->setListOfQuestionsStart((in_array(
'chb_list_of_questions_start',
$_POST[
"list_of_questions_options"])) ? 1 : 0);
1384 $this->
object->setListOfQuestionsEnd((in_array(
'chb_list_of_questions_end',
$_POST[
"list_of_questions_options"])) ? 1 : 0);
1385 $this->
object->setListOfQuestionsDescription((in_array(
'chb_list_of_questions_with_description',
$_POST[
"list_of_questions_options"])) ? 1 : 0);
1389 $this->
object->setListOfQuestionsStart(0);
1390 $this->
object->setListOfQuestionsEnd(0);
1391 $this->
object->setListOfQuestionsDescription(0);
1393 $this->
object->setMailNotification(
$_POST[
"mailnotification"]);
1394 $this->
object->setMailNotificationType(
$_POST[
"mailnottype"]);
1395 $this->
object->setShowMarker((
$_POST[
"chb_show_marker"]) ? 1 : 0);
1396 $this->
object->setShowCancel((
$_POST[
"chb_show_cancel"]) ? 1 : 0);
1397 $this->
object->setKioskMode((
$_POST[
"kiosk"]) ? 1 : 0);
1398 $this->
object->setShowKioskModeTitle((is_array(
$_POST[
"kiosk_options"]) && in_array(
'kiosk_title',
$_POST[
"kiosk_options"])) ? 1 : 0);
1399 $this->
object->setShowKioskModeParticipant((is_array(
$_POST[
"kiosk_options"]) && in_array(
'kiosk_participant',
$_POST[
"kiosk_options"])) ? 1 : 0);
1400 $this->
object->setEnableProcessingTime((
$_POST[
"chb_processing_time"]) ? 1 : 0);
1401 if ($this->object->getEnableProcessingTime())
1403 $this->
object->setProcessingTime(sprintf(
"%02d:%02d:%02d",
1404 $_POST[
"processing_time"][
"hh"],
1405 $_POST[
"processing_time"][
"mm"],
1406 $_POST[
"processing_time"][
"ss"]
1411 $this->
object->setProcessingTime(
'');
1413 $this->
object->setResetProcessingTime((
$_POST[
"chb_reset_processing_time"]) ? 1 : 0);
1414 if (
$_POST[
'chb_ending_time'])
1420 $this->
object->setEndingTime(
'');
1422 $this->
object->setUsePreviousAnswers((
$_POST[
"chb_use_previous_answers"]) ? 1 : 0);
1423 $this->
object->setForceJS((
$_POST[
"forcejs"]) ? 1 : 0);
1424 $this->
object->setTitleOutput(
$_POST[
"title_output"]);
1425 $this->
object->setPassword(
$_POST[
"password"]);
1426 $this->
object->setAllowedUsers(
$_POST[
"allowedUsers"]);
1427 $this->
object->setAllowedUsersTimeGap(
$_POST[
"allowedUsersTimeGap"]);
1429 if ($this->object->isRandomTest())
1431 $this->
object->setUsePreviousAnswers(0);
1434 $invited_users = $this->
object->getInvitedUsers();
1435 if (!(
$total && (count($invited_users) == 0)))
1437 $fixed_participants = 0;
1438 if (array_key_exists(
"fixedparticipants",
$_POST))
1440 if (
$_POST[
"fixedparticipants"])
1442 $fixed_participants = 1;
1445 $this->
object->setFixedParticipants($fixed_participants);
1446 if (!$fixed_participants)
1448 $invited_users = $this->
object->getInvitedUsers();
1449 foreach ($invited_users as $user_object)
1451 $this->
object->disinviteUser($user_object[
"usr_id"]);
1456 $this->
object->saveToDb(
true);
1459 if ($randomtest_switch)
1461 if ($this->object->isRandomTest())
1463 $this->
object->removeNonRandomTestData();
1467 $this->
object->removeRandomTestData();
1471 $this->ctrl->redirect($this,
'properties');
1481 include_once(
"./Modules/File/classes/class.ilObjFile.php");
1483 $fileObj->sendFile();
1492 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
1495 $page_gui->showMediaFullscreen();
1504 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
1506 $pg_obj->send_paragraph (
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
1543 $this->ctrl->redirect($this,
"questions");
1557 $parent_ref = $tree->getParentId($this->object->getRefId());
1558 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
1560 $qpl->setType(
"qpl");
1561 $qpl->setTitle($name);
1562 $qpl->setDescription(
"");
1564 $qpl->createReference();
1565 $qpl->putInTree($parent_ref);
1566 $qpl->setPermissions($parent_ref);
1569 return $qpl->getRefId();
1579 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_random_select.html",
"Modules/Test");
1580 $questionpools =& $this->
object->getAvailableQuestionpools(FALSE, FALSE, FALSE, TRUE);
1581 $this->tpl->setCurrentBlock(
"option");
1582 $this->tpl->setVariable(
"VALUE_OPTION",
"0");
1583 $this->tpl->setVariable(
"TEXT_OPTION", $this->lng->txt(
"all_available_question_pools"));
1584 $this->tpl->parseCurrentBlock();
1585 foreach ($questionpools as $key => $value)
1587 $this->tpl->setCurrentBlock(
"option");
1588 $this->tpl->setVariable(
"VALUE_OPTION", $key);
1589 $this->tpl->setVariable(
"TEXT_OPTION", $value[
"title"]);
1590 $this->tpl->parseCurrentBlock();
1592 $this->tpl->setCurrentBlock(
"hidden");
1593 $this->tpl->setVariable(
"HIDDEN_NAME",
"sel_question_types");
1594 $this->tpl->setVariable(
"HIDDEN_VALUE",
$_POST[
"sel_question_types"]);
1595 $this->tpl->parseCurrentBlock();
1596 $this->tpl->setCurrentBlock(
"adm_content");
1597 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
1598 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_random_select_questionpool"));
1599 $this->tpl->setVariable(
"TXT_NR_OF_QUESTIONS", $this->lng->txt(
"tst_random_nr_of_questions"));
1600 $this->tpl->setVariable(
"BTN_SUBMIT", $this->lng->txt(
"submit"));
1601 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1602 $this->tpl->parseCurrentBlock();
1614 $this->ctrl->redirect($this,
"questions");
1627 $question_array = $this->
object->randomSelectQuestions(
$_POST[
"nr_of_questions"],
$_POST[
"sel_qpl"]);
1628 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_random_question_offer.html",
"Modules/Test");
1629 $color_class = array(
"tblrow1",
"tblrow2");
1631 $questionpools =& $this->
object->getAvailableQuestionpools(
true);
1632 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
1633 foreach ($question_array as $question_id)
1635 $dataset = $this->
object->getQuestionDataset($question_id);
1636 $this->tpl->setCurrentBlock(
"QTab");
1637 $this->tpl->setVariable(
"COLOR_CLASS", $color_class[$counter % 2]);
1638 $this->tpl->setVariable(
"QUESTION_TITLE", $dataset->title);
1639 $this->tpl->setVariable(
"QUESTION_COMMENT", $dataset->description);
1641 $this->tpl->setVariable(
"QUESTION_AUTHOR", $dataset->author);
1642 $this->tpl->setVariable(
"QUESTION_POOL", $questionpools[$dataset->obj_fi][
"title"]);
1643 $this->tpl->parseCurrentBlock();
1646 if (count($question_array) == 0)
1648 $this->tpl->setCurrentBlock(
"Emptytable");
1649 $this->tpl->setVariable(
"TEXT_NO_QUESTIONS_AVAILABLE", $this->lng->txt(
"no_questions_available"));
1650 $this->tpl->parseCurrentBlock();
1654 $this->tpl->setCurrentBlock(
"Selectionbuttons");
1655 $this->tpl->setVariable(
"BTN_YES", $this->lng->txt(
"random_accept_sample"));
1656 $this->tpl->setVariable(
"BTN_NO", $this->lng->txt(
"random_another_sample"));
1657 $this->tpl->parseCurrentBlock();
1659 $chosen_questions = join($question_array,
",");
1660 $this->tpl->setCurrentBlock(
"adm_content");
1661 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
1662 $this->tpl->setVariable(
"QUESTION_TITLE", $this->lng->txt(
"tst_question_title"));
1663 $this->tpl->setVariable(
"QUESTION_COMMENT", $this->lng->txt(
"description"));
1664 $this->tpl->setVariable(
"QUESTION_TYPE", $this->lng->txt(
"tst_question_type"));
1665 $this->tpl->setVariable(
"QUESTION_AUTHOR", $this->lng->txt(
"author"));
1666 $this->tpl->setVariable(
"QUESTION_POOL", $this->lng->txt(
"qpl"));
1667 $this->tpl->setVariable(
"VALUE_CHOSEN_QUESTIONS", $chosen_questions);
1668 $this->tpl->setVariable(
"VALUE_QUESTIONPOOL_SELECTION",
$_POST[
"sel_qpl"]);
1669 $this->tpl->setVariable(
"VALUE_NR_OF_QUESTIONS",
$_POST[
"nr_of_questions"]);
1670 $this->tpl->setVariable(
"TEXT_QUESTION_OFFER", $this->lng->txt(
"tst_question_offer"));
1671 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1672 $this->tpl->parseCurrentBlock();
1684 $selected_array = split(
",",
$_POST[
"chosen_questions"]);
1685 if (!count($selected_array))
1691 $total = $this->
object->evalTotalPersons();
1701 foreach ($selected_array as $key => $value)
1703 $this->
object->insertQuestion($value);
1705 $this->
object->saveCompleteStatus();
1707 $this->ctrl->redirect($this,
"questions");
1729 $ilUser->setPref(
"tst_question_selection_mode_equal", (
$_POST[
'chbQuestionSelectionMode']) ? 1 : 0);
1730 $ilUser->writePref(
"tst_question_selection_mode_equal", (
$_POST[
'chbQuestionSelectionMode']) ? 1 : 0);
1731 $this->
object->setRandomQuestionCount(
$_POST[
'total_questions']);
1732 if (is_array(
$_POST[
'source'][
'qpl']) && count(array_unique(
$_POST[
'source'][
'qpl'])) == count(
$_POST[
'source'][
'qpl']))
1735 include_once
"./Modules/Test/classes/class.ilRandomTestData.php";
1736 foreach (
$_POST[
'source'][
'qpl'] as $idx => $qpl)
1740 $this->
object->setRandomQuestionpoolData(
$data);
1751 $this->
object->saveRandomQuestionCount($this->object->getRandomQuestionCount());
1752 $this->
object->saveRandomQuestionpools();
1753 $this->
object->saveCompleteStatus();
1755 $this->ctrl->redirect($this,
'randomQuestions');
1762 $position = key(
$_POST[
'cmd'][
'addsource']);
1763 $this->
object->addRandomQuestionpoolData(0, 0, $position+1);
1770 $position = key(
$_POST[
'cmd'][
'removesource']);
1771 $this->
object->removeRandomQuestionpoolData($position);
1779 $total = $this->
object->evalTotalPersons();
1780 $save = (strcmp($this->ctrl->getCmd(),
"saveRandomQuestions") == 0) ? TRUE : FALSE;
1782 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1784 $form->setFormAction($this->ctrl->getFormAction($this,
'randomQuestions'));
1785 $form->setTitle($this->lng->txt(
'random_selection'));
1786 $form->setDescription($this->lng->txt(
'tst_select_random_questions'));
1787 $form->setMultipart(FALSE);
1788 $form->setTableWidth(
"100%");
1789 $form->setId(
"randomSelectionForm");
1792 $selection_mode = ($save) ?
$_POST[
'chbQuestionSelectionMode'] : $ilUser->getPref(
"tst_question_selection_mode_equal");
1793 $question_selection =
new ilCheckboxInputGUI($this->lng->txt(
"tst_question_selection"),
"chbQuestionSelectionMode");
1795 $question_selection->setChecked($selection_mode);
1796 $question_selection->setOptionTitle($this->lng->txt(
'tst_question_selection_equal'));
1797 $question_selection->setInfo($this->lng->txt(
'tst_question_selection_description'));
1798 $question_selection->setRequired(
false);
1799 $form->addItem($question_selection);
1802 $total_questions =
new ilNumberInputGUI($this->lng->txt(
'tst_total_questions'),
'total_questions');
1803 $total_questions->
setValue($this->object->getRandomQuestionCount());
1804 $total_questions->setSize(3);
1805 $total_questions->setInfo($this->lng->txt(
'tst_total_questions_description'));
1806 $total_questions->setRequired(
false);
1807 $form->addItem($total_questions);
1811 $found_qpls = $this->
object->getRandomQuestionpoolData();
1812 include_once
"./Modules/Test/classes/class.ilRandomTestData.php";
1813 if (count($found_qpls) == 0)
1817 $available_qpl =& $this->
object->getAvailableQuestionpools(TRUE, $selection_mode, FALSE, TRUE, TRUE);
1818 include_once
'./Modules/Test/classes/class.ilRandomTestInputGUI.php';
1821 $source->setRandomQuestionPools($available_qpl);
1822 $source->setUseQuestionCount((array_key_exists(
'total_questions',
$_POST)) ? (
$_POST[
'total_questions'] < 1) : ($this->object->getRandomQuestionCount() < 1));
1823 $source->setValues($found_qpls);
1824 $form->addItem($source);
1828 $qpls = $this->
object->getUsedRandomQuestionpools();
1829 include_once
'./Modules/Test/classes/class.ilRandomTestROInputGUI.php';
1832 $form->addItem($source);
1835 if (
$total == 0) $form->addCommandButton(
"saveRandomQuestions", $this->lng->txt(
"save"));
1841 $form->setValuesByPost();
1842 $errors = !$form->checkInput();
1846 if (
$_POST[
'total_questions'] > 0)
1849 foreach (
$_POST[
'source'][
'qpl'] as $idx => $qpl)
1851 $totalcount += $available_qpl[$qpl][
'count'];
1853 if (
$_POST[
'total_questions'] > $totalcount)
1855 $total_questions->setAlert($this->lng->txt(
'msg_total_questions_too_high'));
1860 if (
$errors) $checkonly =
false;
1863 if (!$checkonly) $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
1870 if (
$_POST[
"chbQuestionSelectionMode"])
1872 $ilUser->setPref(
"tst_question_selection_mode_equal", 1);
1873 $ilUser->writePref(
"tst_question_selection_mode_equal", 1);
1877 $ilUser->setPref(
"tst_question_selection_mode_equal", 0);
1878 $ilUser->writePref(
"tst_question_selection_mode_equal", 0);
1897 $qpl_ref_id =
$_POST[
"sel_qpl"];
1898 if ((strcmp(
$_POST[
"txt_qpl"],
"") == 0) && (strcmp($qpl_ref_id,
"") == 0))
1906 $_SESSION[
"test_id"] = $this->
object->getRefId();
1907 if (strcmp(
$_POST[
"txt_qpl"],
"") != 0)
1912 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php";
1913 ilUtil::redirect(
"ilias.php?baseClass=ilObjQuestionPoolGUI&ref_id=" . $qpl_ref_id .
"&cmd=createQuestionForTest&test_ref_id=".
$_GET[
"ref_id"].
"&sel_question_types=" .
$_POST[
"sel_question_types"]);
1927 $this->ctrl->redirect($this,
"questions");
1941 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_qpl_select.html",
"Modules/Test");
1942 $questionpools =& $this->
object->getAvailableQuestionpools(FALSE, FALSE, FALSE, TRUE, FALSE,
"write");
1943 if (count($questionpools) == 0)
1945 $this->tpl->setCurrentBlock(
"option");
1946 $this->tpl->setVariable(
"VALUE_QPL",
"");
1947 $this->tpl->parseCurrentBlock();
1951 foreach ($questionpools as $key => $value)
1953 $this->tpl->setCurrentBlock(
"option");
1954 $this->tpl->setVariable(
"VALUE_OPTION", $key);
1955 $this->tpl->setVariable(
"TEXT_OPTION", $value[
"title"]);
1956 $this->tpl->parseCurrentBlock();
1959 $this->tpl->setCurrentBlock(
"hidden");
1960 $this->tpl->setVariable(
"HIDDEN_NAME",
"sel_question_types");
1961 $this->tpl->setVariable(
"HIDDEN_VALUE",
$_POST[
"sel_question_types"]);
1962 $this->tpl->parseCurrentBlock();
1963 $this->tpl->setCurrentBlock(
"adm_content");
1964 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
1966 if (count($questionpools) == 0)
1968 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_enter_questionpool"));
1972 $this->tpl->setVariable(
"TXT_QPL_SELECT", $this->lng->txt(
"tst_select_questionpool"));
1974 $this->tpl->setVariable(
"BTN_SUBMIT", $this->lng->txt(
"submit"));
1975 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
1976 $this->tpl->parseCurrentBlock();
1989 $checked_questions = array();
1990 foreach (
$_POST as $key => $value) {
1991 if (preg_match(
"/id_(\d+)/", $key, $matches)) {
1992 array_push($checked_questions, $matches[1]);
1995 foreach ($checked_questions as $key => $value) {
1996 $this->
object->removeQuestion($value);
1998 $this->
object->saveCompleteStatus();
1999 $this->ctrl->redirect($this,
"questions");
2011 $this->ctrl->redirect($this,
"questions");
2024 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_remove_questions.html",
"Modules/Test");
2025 $removablequestions =& $this->
object->getTestQuestions();
2026 $colors = array(
"tblrow1",
"tblrow2");
2028 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
2029 if (count($removablequestions))
2031 foreach ($removablequestions as
$data)
2033 if (in_array($data[
"question_id"], $checked_questions))
2035 $this->tpl->setCurrentBlock(
"row");
2036 $this->tpl->setVariable(
"COLOR_CLASS", $colors[$counter % 2]);
2037 $this->tpl->setVariable(
"TXT_TITLE", $data[
"title"]);
2038 $this->tpl->setVariable(
"TXT_DESCRIPTION", $data[
"description"]);
2040 $this->tpl->parseCurrentBlock();
2045 foreach ($checked_questions as $id)
2047 $this->tpl->setCurrentBlock(
"hidden");
2048 $this->tpl->setVariable(
"HIDDEN_NAME",
"id_$id");
2049 $this->tpl->setVariable(
"HIDDEN_VALUE",
"1");
2050 $this->tpl->parseCurrentBlock();
2053 $this->tpl->setCurrentBlock(
"adm_content");
2054 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"tst_question_title"));
2055 $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"description"));
2056 $this->tpl->setVariable(
"TXT_TYPE", $this->lng->txt(
"tst_question_type"));
2057 $this->tpl->setVariable(
"BTN_CONFIRM", $this->lng->txt(
"confirm"));
2058 $this->tpl->setVariable(
"BTN_CANCEL", $this->lng->txt(
"cancel"));
2059 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
2060 $this->tpl->parseCurrentBlock();
2073 $checked_questions =
$_POST[
"q_id"];
2074 if (count($checked_questions) > 0)
2076 $total = $this->
object->evalTotalPersons();
2089 elseif (count($checked_questions) == 0)
2091 ilUtil::sendInfo($this->lng->txt(
"tst_no_question_selected_for_removal"),
true);
2092 $this->ctrl->redirect($this,
"questions");
2101 $_SESSION[
'tst_qst_move_' . $this->
object->getTestId()] =
$_POST[
'q_id'];
2103 $this->ctrl->redirect($this,
'questions');
2112 $move_questions =
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
2114 if (count(
$_POST[
'q_id']) == 0)
2117 $this->ctrl->redirect($this,
'questions');
2119 if (count(
$_POST[
'q_id']) > 1)
2122 $this->ctrl->redirect($this,
'questions');
2125 $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()],
$_POST[
'q_id'][0], $insert_mode);
2127 unset(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]);
2128 $this->ctrl->redirect($this,
"questions");
2137 $move_questions =
$_SESSION[
'tst_qst_move_' . $this->
object->getTestId()];
2138 if (count(
$_POST[
'q_id']) == 0)
2141 $this->ctrl->redirect($this,
'questions');
2143 if (count(
$_POST[
'q_id']) > 1)
2146 $this->ctrl->redirect($this,
'questions');
2149 $this->
object->moveQuestions(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()],
$_POST[
'q_id'][0], $insert_mode);
2151 unset(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]);
2152 $this->ctrl->redirect($this,
"questions");
2162 $selected_array = (is_array(
$_POST[
'q_id'])) ?
$_POST[
'q_id'] : array();
2163 if (!count($selected_array))
2166 $this->ctrl->redirect($this,
"browseForQuestions");
2170 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
2171 $manscoring = FALSE;
2172 foreach ($selected_array as $key => $value)
2174 $this->
object->insertQuestion($value);
2180 $this->
object->saveCompleteStatus();
2189 $this->ctrl->redirect($this,
"questions");
2196 include_once
"./Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php";
2198 $table_gui->writeFilterToSession();
2199 $this->ctrl->redirect($this,
"browseForQuestions");
2204 include_once
"./Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php";
2206 $table_gui->resetFilter();
2207 $this->ctrl->redirect($this,
"browseForQuestions");
2219 $this->ctrl->setParameterByClass(get_class($this),
"browse",
"1");
2221 include_once
"./Modules/Test/classes/tables/class.ilTestQuestionBrowserTableGUI.php";
2222 $table_gui =
new ilTestQuestionBrowserTableGUI($this,
'browseForQuestions', (($ilAccess->checkAccess(
"write",
"", $this->ref_id) ?
true :
false)));
2223 $arrFilter = array();
2224 foreach ($table_gui->getFilterItems() as $item)
2226 if ($item->getValue() !==
false)
2228 $arrFilter[$item->getPostVar()] = $item->getValue();
2231 $data = $this->
object->getAvailableQuestions($arrFilter, 1);
2232 $table_gui->setData(
$data);
2233 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2239 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
2243 $this->ctrl->redirect($this,
"infoScreen");
2245 if (
$_GET[
'browse'])
2247 return $this->questionbrowser();
2251 if ($this->object->isRandomTest())
2259 ilUtil::redirect(
"ilias.php?baseClass=ilObjQuestionPoolGUI&ref_id=" .
$_GET[
"eqpl"] .
"&cmd=editQuestionForTest&calling_test=".
$_GET[
"ref_id"].
"&q_id=" .
$_GET[
"eqid"]);
2262 if (
$_GET[
"up"] > 0)
2264 $this->
object->questionMoveUp(
$_GET[
"up"]);
2266 if (
$_GET[
"down"] > 0)
2268 $this->
object->questionMoveDown(
$_GET[
"down"]);
2273 $selected_array = array();
2274 array_push($selected_array,
$_GET[
"add"]);
2275 $total = $this->
object->evalTotalPersons();
2285 $this->insertQuestions($selected_array);
2289 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_questions.html",
"Modules/Test");
2291 $total = $this->
object->evalTotalPersons();
2292 if (($ilAccess->checkAccess(
"write",
"", $this->ref_id) and (
$total == 0)))
2295 $lastquestiontype = $ilUser->getPref(
"tst_lastquestiontype");
2296 $this->tpl->setCurrentBlock(
"QTypes");
2297 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
2299 foreach ($question_types as $trans =>
$data)
2301 if (
$data[
"type_tag"] == $lastquestiontype)
2303 $this->tpl->setVariable(
"QUESTION_TYPE_SELECTED",
" selected=\"selected\"");
2305 $this->tpl->setVariable(
"QUESTION_TYPE_ID",
$data[
"type_tag"]);
2306 $this->tpl->setVariable(
"QUESTION_TYPE", $trans);
2307 $this->tpl->parseCurrentBlock();
2309 $this->tpl->parseCurrentBlock();
2312 if (($ilAccess->checkAccess(
"write",
"", $this->ref_id) and (
$total == 0)))
2314 $this->tpl->setVariable(
"BUTTON_INSERT_QUESTION", $this->lng->txt(
"tst_browse_for_questions"));
2315 $this->tpl->setVariable(
"TEXT_CREATE_NEW",
" " . strtolower($this->lng->txt(
"or")) .
" " . $this->lng->txt(
"create_new"));
2316 $this->tpl->setVariable(
"BUTTON_CREATE_QUESTION", $this->lng->txt(
"create"));
2317 $this->tpl->setVariable(
"TXT_OR", $this->lng->txt(
"or"));
2318 $this->tpl->setVariable(
"TEXT_RANDOM_SELECT", $this->lng->txt(
"random_selection"));
2321 $this->tpl->setCurrentBlock(
"adm_content");
2322 include_once
"./Modules/Test/classes/tables/class.ilTestQuestionsTableGUI.php";
2323 $checked_move = is_array(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]) && (count(
$_SESSION[
'tst_qst_move_' . $this->object->getTestId()]));
2324 $table_gui =
new ilTestQuestionsTableGUI($this,
'questions', (($ilAccess->checkAccess(
"write",
"", $this->ref_id) ?
true :
false)), $checked_move,
$total);
2325 $data = $this->
object->getTestQuestions();
2326 $table_gui->setData($data);
2327 $this->tpl->setVariable(
'QUESTIONBROWSER', $table_gui->getHTML());
2328 $this->tpl->setVariable(
"ACTION_QUESTION_FORM", $this->ctrl->getFormAction($this));
2329 $this->tpl->parseCurrentBlock();
2345 $this->
object->mark_schema->addMarkStep();
2358 $this->
object->mark_schema->flush();
2359 foreach (
$_POST as $key => $value) {
2360 if (preg_match(
"/mark_short_(\d+)/", $key, $matches))
2365 $this->
object->ects_grades[
"A"] =
$_POST[
"ects_grade_a"];
2366 $this->
object->ects_grades[
"B"] =
$_POST[
"ects_grade_b"];
2367 $this->
object->ects_grades[
"C"] =
$_POST[
"ects_grade_c"];
2368 $this->
object->ects_grades[
"D"] =
$_POST[
"ects_grade_d"];
2369 $this->
object->ects_grades[
"E"] =
$_POST[
"ects_grade_e"];
2372 $this->
object->ects_fx =
$_POST[
"percentFX"];
2376 $this->
object->ects_fx =
"";
2378 $this->
object->ects_output =
$_POST[
"chbECTS"];
2390 $this->
object->mark_schema->createSimpleSchema($this->lng->txt(
"failed_short"), $this->lng->txt(
"failed_official"), 0, 0, $this->lng->txt(
"passed_short"), $this->lng->txt(
"passed_official"), 50, 1);
2404 $delete_mark_steps = array();
2405 foreach (
$_POST as $key => $value) {
2406 if (preg_match(
"/cb_(\d+)/", $key, $matches)) {
2407 array_push($delete_mark_steps, $matches[1]);
2410 if (count($delete_mark_steps)) {
2411 $this->
object->mark_schema->deleteMarkSteps($delete_mark_steps);
2427 $this->ctrl->redirect($this,
"marks");
2442 $mark_check = $this->
object->checkMarks();
2446 $mark_check = $this->lng->txt(
'mark_schema_invalid');
2449 if ($mark_check !==
true)
2453 elseif (
$_POST[
"chbECTS"] && ((strcmp(
$_POST[
"ects_grade_a"],
"") == 0) or (strcmp(
$_POST[
"ects_grade_b"],
"") == 0) or (strcmp(
$_POST[
"ects_grade_c"],
"") == 0) or (strcmp(
$_POST[
"ects_grade_d"],
"") == 0) or (strcmp(
$_POST[
"ects_grade_e"],
"") == 0)))
2457 elseif ((
$_POST[
"ects_grade_a"] > 100) or (
$_POST[
"ects_grade_a"] < 0))
2461 elseif ((
$_POST[
"ects_grade_b"] > 100) or (
$_POST[
"ects_grade_b"] < 0))
2465 elseif ((
$_POST[
"ects_grade_c"] > 100) or (
$_POST[
"ects_grade_c"] < 0))
2469 elseif ((
$_POST[
"ects_grade_d"] > 100) or (
$_POST[
"ects_grade_d"] < 0))
2473 elseif ((
$_POST[
"ects_grade_e"] > 100) or (
$_POST[
"ects_grade_e"] < 0))
2479 $this->
object->mark_schema->saveToDb($this->object->getTestId());
2480 $this->
object->saveCompleteStatus();
2481 if ($this->object->getReportingDate())
2498 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
2502 $this->ctrl->redirect($this,
"infoScreen");
2505 if (!$this->object->canEditMarks())
2510 $this->
object->mark_schema->sort();
2512 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_marks.html",
"Modules/Test");
2513 $marks = $this->
object->mark_schema->mark_steps;
2514 $rows = array(
"tblrow1",
"tblrow2");
2516 foreach ($marks as $key => $value) {
2517 $this->tpl->setCurrentBlock(
"markrow");
2518 $this->tpl->setVariable(
"MARK_SHORT", $value->getShortName());
2519 $this->tpl->setVariable(
"MARK_OFFICIAL", $value->getOfficialName());
2520 $this->tpl->setVariable(
"MARK_PERCENTAGE", sprintf(
"%.2f", $value->getMinimumLevel()));
2521 $this->tpl->setVariable(
"MARK_PASSED", strtolower($this->lng->txt(
"tst_mark_passed")));
2522 $this->tpl->setVariable(
"MARK_ID",
"$key");
2523 $this->tpl->setVariable(
"ROW_CLASS", $rows[$counter % 2]);
2524 if ($value->getPassed()) {
2525 $this->tpl->setVariable(
"MARK_PASSED_CHECKED",
" checked=\"checked\"");
2527 $this->tpl->parseCurrentBlock();
2530 if (count($marks) == 0)
2532 $this->tpl->setCurrentBlock(
"Emptyrow");
2533 $this->tpl->setVariable(
"EMPTY_ROW", $this->lng->txt(
"tst_no_marks_defined"));
2534 $this->tpl->setVariable(
"ROW_CLASS", $rows[$counter % 2]);
2535 $this->tpl->parseCurrentBlock();
2539 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && $this->
object->canEditMarks())
2541 $this->tpl->setCurrentBlock(
"selectall");
2543 $this->tpl->setVariable(
"ROW_CLASS", $rows[$counter % 2]);
2544 $this->tpl->setVariable(
"SELECT_ALL", $this->lng->txt(
"select_all"));
2545 $this->tpl->parseCurrentBlock();
2546 $this->tpl->setCurrentBlock(
"Footer");
2547 $this->tpl->setVariable(
"ARROW",
"<img src=\"" .
ilUtil::getImagePath(
"arrow_downright.gif") .
"\" alt=\"".$this->lng->txt(
"arrow_downright").
"\"/>");
2548 $this->tpl->setVariable(
"BUTTON_EDIT", $this->lng->txt(
"edit"));
2549 $this->tpl->setVariable(
"BUTTON_DELETE", $this->lng->txt(
"delete"));
2550 $this->tpl->parseCurrentBlock();
2554 if ($this->object->getReportingDate())
2556 $this->tpl->setCurrentBlock(
"ects");
2557 if ($this->object->ects_output)
2559 $this->tpl->setVariable(
"CHECKED_ECTS",
" checked=\"checked\"");
2561 $this->tpl->setVariable(
"TEXT_OUTPUT_ECTS_GRADES", $this->lng->txt(
"ects_output_of_ects_grades"));
2562 $this->tpl->setVariable(
"TEXT_ALLOW_ECTS_GRADES", $this->lng->txt(
"ects_allow_ects_grades"));
2563 $this->tpl->setVariable(
"TEXT_USE_FX", $this->lng->txt(
"ects_use_fx_grade"));
2564 if (preg_match(
"/\d+/", $this->object->ects_fx))
2566 $this->tpl->setVariable(
"CHECKED_FX",
" checked=\"checked\"");
2567 $this->tpl->setVariable(
"VALUE_PERCENT_FX", sprintf(
"value=\"%s\" ", $this->object->ects_fx));
2569 $this->tpl->setVariable(
"TEXT_PERCENT", $this->lng->txt(
"ects_use_fx_grade_part2"));
2570 $this->tpl->setVariable(
"ECTS_GRADE", $this->lng->txt(
"ects_grade"));
2571 $this->tpl->setVariable(
"PERCENTILE", $this->lng->txt(
"percentile"));
2572 $this->tpl->setVariable(
"ECTS_GRADE_A",
"A - " . $this->lng->txt(
"ects_grade_a_short"));
2573 $this->tpl->setVariable(
"VALUE_GRADE_A", $this->object->ects_grades[
"A"]);
2574 $this->tpl->setVariable(
"ECTS_GRADE_B",
"B - " . $this->lng->txt(
"ects_grade_b_short"));
2575 $this->tpl->setVariable(
"VALUE_GRADE_B", $this->object->ects_grades[
"B"]);
2576 $this->tpl->setVariable(
"ECTS_GRADE_C",
"C - " . $this->lng->txt(
"ects_grade_c_short"));
2577 $this->tpl->setVariable(
"VALUE_GRADE_C", $this->object->ects_grades[
"C"]);
2578 $this->tpl->setVariable(
"ECTS_GRADE_D",
"D - " . $this->lng->txt(
"ects_grade_d_short"));
2579 $this->tpl->setVariable(
"VALUE_GRADE_D", $this->object->ects_grades[
"D"]);
2580 $this->tpl->setVariable(
"ECTS_GRADE_E",
"E - " . $this->lng->txt(
"ects_grade_e_short"));
2581 $this->tpl->setVariable(
"VALUE_GRADE_E", $this->object->ects_grades[
"E"]);
2583 $this->tpl->parseCurrentBlock();
2586 $this->tpl->setCurrentBlock(
"adm_content");
2587 $this->tpl->setVariable(
"ACTION_MARKS", $this->ctrl->getFormAction($this));
2588 $this->tpl->setVariable(
"HEADER_SHORT", $this->lng->txt(
"tst_mark_short_form"));
2589 $this->tpl->setVariable(
"HEADER_OFFICIAL", $this->lng->txt(
"tst_mark_official_form"));
2590 $this->tpl->setVariable(
"HEADER_PERCENTAGE", $this->lng->txt(
"tst_mark_minimum_level"));
2591 $this->tpl->setVariable(
"HEADER_PASSED", $this->lng->txt(
"tst_mark_passed"));
2592 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) && $this->
object->canEditMarks())
2594 $this->tpl->setVariable(
"BUTTON_NEW", $this->lng->txt(
"tst_mark_create_new_mark_step"));
2595 $this->tpl->setVariable(
"BUTTON_NEW_SIMPLE", $this->lng->txt(
"tst_mark_create_simple_mark_schema"));
2596 $this->tpl->setVariable(
"SAVE", $this->lng->txt(
"save"));
2597 $this->tpl->setVariable(
"CANCEL", $this->lng->txt(
"cancel"));
2599 $this->tpl->parseCurrentBlock();
2611 $this->
object->removeAllTestEditings();
2613 $this->ctrl->redirect($this,
"participants");
2625 $active_ids = array();
2626 foreach (
$_POST[
"chbUser"] as $active_id)
2628 if ($this->object->getFixedParticipants())
2630 array_push($active_ids, $this->object->getActiveIdOfUser($active_id));
2634 array_push($active_ids, $active_id);
2637 $this->
object->removeSelectedTestResults($active_ids);
2639 $this->ctrl->redirect($this,
"participants");
2651 $this->ctrl->redirect($this,
"participants");
2664 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_maintenance.html",
"Modules/Test");
2666 $this->tpl->setCurrentBlock(
"confirm_delete");
2667 $this->tpl->setVariable(
"BTN_CONFIRM_DELETE_ALL", $this->lng->txt(
"confirm"));
2668 $this->tpl->setVariable(
"BTN_CANCEL_DELETE_ALL", $this->lng->txt(
"cancel"));
2669 $this->tpl->parseCurrentBlock();
2671 $this->tpl->setCurrentBlock(
"adm_content");
2672 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
2673 $this->tpl->parseCurrentBlock();
2682 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.confirm_deletion.html",
"Modules/Test");
2683 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"participants"));
2686 $buttons = array(
"confirmDeleteAllUserResults" => $this->lng->txt(
"proceed"),
2687 "participants" => $this->lng->txt(
"cancel"));
2688 foreach ($buttons as $name => $value)
2690 $this->tpl->setCurrentBlock(
"operation_btn");
2691 $this->tpl->setVariable(
"BTN_NAME",$name);
2692 $this->tpl->setVariable(
"BTN_VALUE",$value);
2693 $this->tpl->parseCurrentBlock();
2706 if (count(
$_POST[
"chbUser"]) == 0)
2709 $this->ctrl->redirect($this,
"participants");
2712 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_maintenance.html",
"Modules/Test");
2714 foreach (
$_POST[
"chbUser"] as $key => $value)
2716 $this->tpl->setCurrentBlock(
"hidden");
2717 $this->tpl->setVariable(
"USER_ID", $value);
2718 $this->tpl->parseCurrentBlock();
2721 include_once
'./Services/User/classes/class.ilObjUser.php';
2722 $color_class = array(
"tblrow1",
"tblrow2");
2724 foreach (
$_POST[
"chbUser"] as $key => $active_id)
2726 if ($this->object->getFixedParticipants())
2728 $user_id = $active_id;
2732 $user_id = $this->
object->_getUserIdFromActiveId($active_id);
2735 $this->tpl->setCurrentBlock(
"row");
2737 $this->tpl->setVariable(
"USER_ALT", $this->lng->txt(
"usr"));
2738 $this->tpl->setVariable(
"USER_TITLE", $this->lng->txt(
"usr"));
2739 if ($this->object->getAnonymity())
2741 $name = $this->lng->txt(
"anonymous");
2745 $this->tpl->setVariable(
"TXT_FIRSTNAME",
$user[
"firstname"]);
2746 if (strlen(
$user[
"lastname"]))
2748 $this->tpl->setVariable(
"TXT_LASTNAME",
$user[
"lastname"]);
2752 $this->tpl->setVariable(
"TXT_LASTNAME", $this->lng->txt(
"deleted_user"));
2756 $this->tpl->setVariable(
"ROW_CLASS", $color_class[$counter % 2]);
2757 $this->tpl->parseCurrentBlock();
2760 $this->tpl->setCurrentBlock(
"selectedusers");
2761 $this->tpl->setVariable(
"HEADER_TXT_FIRSTNAME", $this->lng->txt(
"firstname"));
2762 $this->tpl->setVariable(
"HEADER_TXT_LASTNAME", $this->lng->txt(
"lastname"));
2763 $this->tpl->setVariable(
"HEADER_TXT_LOGIN", $this->lng->txt(
"login"));
2764 $this->tpl->setVariable(
"BTN_CONFIRM_DELETE_SELECTED", $this->lng->txt(
"confirm"));
2765 $this->tpl->setVariable(
"BTN_CANCEL_DELETE_SELECTED", $this->lng->txt(
"cancel"));
2766 $this->tpl->parseCurrentBlock();
2768 $this->tpl->setCurrentBlock(
"adm_content");
2769 $this->tpl->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
2770 $this->tpl->parseCurrentBlock();
2782 include_once
"./Modules/Test/classes/tables/class.ilTestHistoryTableGUI.php";
2784 $table_gui->setTestObject($this->
object);
2785 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
2787 $table_gui->setData(
$log);
2788 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2798 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"], $new_type))
2800 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
2806 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
2808 $questionpools =& $tst->getAvailableQuestionpools(TRUE, FALSE, TRUE, TRUE);
2809 if (count($questionpools) == 0)
2814 foreach ($questionpools as $key => $value)
2816 $this->tpl->setCurrentBlock(
"option_qpl");
2817 $this->tpl->setVariable(
"OPTION_VALUE", $key);
2818 $this->tpl->setVariable(
"TXT_OPTION", $value[
"title"]);
2819 if (
$_POST[
"qpl"] == $key)
2821 $this->tpl->setVariable(
"OPTION_SELECTED",
" selected=\"selected\"");
2823 $this->tpl->parseCurrentBlock();
2827 $defaults =& $tst->getAvailableDefaults();
2828 if (count($defaults))
2830 foreach ($defaults as
$row)
2832 $this->tpl->setCurrentBlock(
"defaults_row");
2833 $this->tpl->setVariable(
"DEFAULTS_VALUE", $row[
"test_defaults_id"]);
2835 $this->tpl->parseCurrentBlock();
2837 $this->tpl->setCurrentBlock(
"defaults");
2838 $this->tpl->setVariable(
"TXT_DEFAULTS", $this->lng->txt(
"defaults"));
2839 $this->tpl->setVariable(
"TEXT_NO_DEFAULTS", $this->lng->txt(
"tst_defaults_dont_use"));
2840 $this->tpl->parseCurrentBlock();
2845 $this->tpl->setCurrentBlock(
"adm_content");
2849 $data[
"fields"] = array();
2851 $data[
"fields"][
"desc"] =
$_SESSION[
"error_post_vars"][
"Fobject"][
"desc"];
2852 foreach (
$data[
"fields"] as $key => $val)
2854 $this->tpl->setVariable(
"TXT_".strtoupper($key), $this->lng->txt($key));
2855 $this->tpl->setVariable(strtoupper($key), $val);
2857 if ($this->prepare_output)
2859 $this->tpl->parseCurrentBlock();
2862 $this->ctrl->setParameter($this,
"new_type", $new_type);
2863 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
'save'));
2864 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($new_type.
"_new"));
2865 $this->tpl->setVariable(
"TXT_SELECT_QUESTIONPOOL", $this->lng->txt(
"select_questionpool"));
2866 $this->tpl->setVariable(
"OPTION_SELECT_QUESTIONPOOL", $this->lng->txt(
"dont_use_questionpool"));
2867 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
2868 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt($new_type.
"_add"));
2869 $this->tpl->setVariable(
"CMD_SUBMIT",
"save");
2871 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
2873 $this->tpl->setVariable(
"TXT_IMPORT_TST", $this->lng->txt(
"import_tst"));
2874 $this->tpl->setVariable(
"TXT_TST_FILE", $this->lng->txt(
"tst_upload_file"));
2875 $this->tpl->setVariable(
"TXT_IMPORT", $this->lng->txt(
"import"));
2878 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
"obj_tst"));
2880 $this->tpl->setVariable(
"ALT_IMG2",$this->lng->txt(
"obj_tst"));
2881 $this->tpl->setVariable(
"NEW_TYPE", $new_type);
2882 $this->tpl->parseCurrentBlock();
2898 if (method_exists($this, $method))
2904 $this->ctrl->redirect($this,
"participants");
2914 global $ilAccess, $ilToolbar,
$lng;
2916 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
2920 $this->ctrl->redirect($this,
"infoScreen");
2923 if ($this->object->getFixedParticipants())
2926 $ilToolbar->addButton($this->lng->txt(
"tst_search_users"),
2927 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
2930 $participants =& $this->
object->getInvitedUsers();
2932 foreach ($participants as
$data)
2934 $maxpass = $this->
object->_getMaxPass($data[
"active_id"]);
2935 if (!is_null($maxpass))
2940 if (strlen($data[
"active_id"]))
2942 $last_access = $this->
object->_getLastAccess($data[
"active_id"]);
2945 $this->ctrl->setParameterByClass(
'iltestevaluationgui',
'active_id', $data[
'active_id']);
2947 if ($data[
'active_id'] == null)
2949 if ( strlen($data[
"firstname"].$data[
"lastname"]) == 0 )
2951 $fullname = $lng->txt(
"deleted_user");
2955 $fullname = trim($data[
"lastname"] .
", " . $data[
"firstname"] .
" " . $data[
"title"]);
2958 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
2962 array_push($rows, array(
2963 'usr_id' => $data[
"usr_id"],
2964 'active_id' => $data[
'active_id'],
2965 'login' => $data[
"login"],
2966 'clientip' => $data[
"clientip"],
2967 'firstname' => $data[
"firstname"],
2968 'lastname' => $data[
"lastname"],
2969 'name' => $fullname,
2970 'started' => ($data[
"active_id"] > 0) ? 1 : 0,
2971 'finished' => ($data[
"test_finished"] == 1) ? 1 : 0,
2972 'access' => $access,
2973 'maxpass' => $maxpass,
2974 'result' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'outParticipantsResultsOverview')
2977 include_once
"./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php";
2980 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
2984 $participants =& $this->
object->getTestParticipants();
2986 foreach ($participants as
$data)
2988 $maxpass = $this->
object->_getMaxPass($data[
"active_id"]);
2989 if (!is_null($maxpass))
2994 if (strlen($data[
"active_id"]))
2996 $last_access = $this->
object->_getLastAccess($data[
"active_id"]);
2999 $this->ctrl->setParameterByClass(
'iltestevaluationgui',
'active_id', $data[
'active_id']);
3000 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
3002 array_push($rows, array(
3003 'usr_id' => $data[
"active_id"],
3004 'active_id' => $data[
'active_id'],
3005 'login' => $data[
"login"],
3006 'name' => $fullname,
3007 'firstname' => $data[
"firstname"],
3008 'lastname' => $data[
"lastname"],
3009 'started' => ($data[
"active_id"] > 0) ? 1 : 0,
3010 'finished' => ($data[
"test_finished"] == 1) ? 1 : 0,
3011 'access' => $access,
3012 'maxpass' => $maxpass,
3013 'result' => $this->ctrl->getLinkTargetByClass(
'iltestevaluationgui',
'outParticipantsResultsOverview')
3016 include_once
"./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php";
3019 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
3034 $this->
showUserResults($show_pass_details = TRUE, $show_answers = TRUE, $show_reached_points = TRUE);
3048 $this->
showUserResults($show_pass_details = FALSE, $show_answers = TRUE);
3062 $this->
showUserResults($show_pass_details = TRUE, $show_answers = FALSE);
3072 $template =
new ilTemplate(
"tpl.il_as_tst_participants_result_output.html", TRUE, TRUE,
"Modules/Test");
3074 if (count(
$_SESSION[
"show_user_results"]) == 0)
3077 $this->ctrl->redirect($this,
"participants");
3080 include_once
"./Modules/Test/classes/class.ilTestServiceGUI.php";
3083 foreach (
$_SESSION[
"show_user_results"] as $key => $active_id)
3087 if ($this->object->getFixedParticipants())
3089 $active_id = $this->
object->getActiveIdOfUser($active_id);
3093 $results = $serviceGUI->getResultsOfUserOutput($active_id, $this->object->_getResultPass($active_id), $show_pass_details, $show_answers, FALSE, $show_reached_points);
3095 if ($count < count(
$_SESSION[
"show_user_results"]))
3097 $template->touchBlock(
"break");
3099 $template->setCurrentBlock(
"user_result");
3100 $template->setVariable(
"USER_RESULT",
$results);
3101 $template->parseCurrentBlock();
3103 $template->setVariable(
"BACK_TEXT", $this->lng->txt(
"back"));
3104 $template->setVariable(
"BACK_URL", $this->ctrl->getLinkTargetByClass(
"ilobjtestgui",
"participants"));
3105 $template->setVariable(
"PRINT_TEXT", $this->lng->txt(
"print"));
3106 $template->setVariable(
"PRINT_URL",
"javascript:window.print();");
3108 $this->tpl->setVariable(
"ADM_CONTENT", $template->get());
3110 if ($this->object->getShowSolutionAnswersOnly())
3118 if (is_array(
$_POST[
"chbUser"]))
3120 foreach (
$_POST[
"chbUser"] as $user_id)
3122 $this->
object->disinviteUser($user_id);
3129 $this->ctrl->redirect($this,
"participants");
3134 if (is_array(
$_POST[
"chbUser"]))
3136 foreach (
$_POST[
"chbUser"] as $user_id)
3138 $this->
object->setClientIP($user_id,
$_POST[
"clientip_".$user_id]);
3145 $this->ctrl->redirect($this,
"participants");
3157 global $ilAccess,
$ilias;
3158 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
3162 $this->ctrl->redirect($this,
"infoScreen");
3165 $template =
new ilTemplate(
"tpl.il_as_tst_print_test_confirm.html", TRUE, TRUE,
"Modules/Test");
3167 include_once
'./Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
3170 $this->ctrl->setParameter($this,
"pdf",
"1");
3171 $template->setCurrentBlock(
"pdf_export");
3172 $template->setVariable(
"PDF_URL", $this->ctrl->getLinkTarget($this,
"print"));
3173 $this->ctrl->setParameter($this,
"pdf",
"");
3174 $template->setVariable(
"PDF_TEXT", $this->lng->txt(
"pdf_export"));
3175 $template->setVariable(
"PDF_IMG_ALT", $this->lng->txt(
"pdf_export"));
3177 $template->parseCurrentBlock();
3183 $print_date = mktime(date(
"H"), date(
"i"), date(
"s"), date(
"m") , date(
"d"), date(
"Y"));
3187 foreach ($this->object->questions as $question)
3189 $template->setCurrentBlock(
"question");
3190 $question_gui = $this->
object->createQuestionGUI(
"", $question);
3191 $template->setVariable(
"COUNTER_QUESTION", $counter.
".");
3193 if ($question_gui->object->getMaximumPoints() == 1)
3195 $template->setVariable(
"QUESTION_POINTS", $question_gui->object->getMaximumPoints() .
" " . $this->lng->txt(
"point"));
3199 $template->setVariable(
"QUESTION_POINTS", $question_gui->object->getMaximumPoints() .
" " . $this->lng->txt(
"points"));
3201 $result_output = $question_gui->getSolutionOutput(
"", NULL, FALSE, TRUE, FALSE, $this->object->getShowSolutionFeedback());
3202 if (strlen($result_output) == 0) $result_output = $question_gui->getPreview(FALSE);
3203 $template->setVariable(
"SOLUTION_OUTPUT", $result_output);
3204 $template->parseCurrentBlock(
"question");
3206 $max_points += $question_gui->object->getMaximumPoints();
3209 $template->setCurrentBlock(
"navigation_buttons");
3210 $template->setVariable(
"BUTTON_PRINT", $this->lng->txt(
"print"));
3211 $template->parseCurrentBlock();
3220 if (array_key_exists(
"pdf",
$_GET) && (
$_GET[
"pdf"] == 1))
3222 $this->
object->deliverPDFfromHTML($template->get(), $this->
object->getTitle());
3226 $this->tpl->setVariable(
"PRINT_CONTENT", $template->get());
3234 if (is_array(
$_POST[
"user"]))
3237 foreach (
$_POST[
"user"] as $user_id)
3239 $client_ip =
$_POST[
"client_ip"][$i];
3240 $this->
object->inviteUser($user_id, $client_ip);
3248 $message = $this->lng->txt(
"tst_invited_selected_users");
3250 if (strlen($message))
3259 $this->ctrl->redirect($this,
"participants");
3272 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
3276 $this->ctrl->redirect($this,
"infoScreen");
3279 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_tst_defaults.html",
"Modules/Test");
3281 $maxentries = $ilUser->getPref(
"hits_per_page");
3282 if ($maxentries < 1)
3287 $offset =
$_GET[
"offset"] ?
$_GET[
"offset"] : 0;
3288 $sortby =
$_GET[
"sort_by"] ?
$_GET[
"sort_by"] :
"name";
3289 $sortorder =
$_GET[
"sort_order"] ?
$_GET[
"sort_order"] :
"asc";
3291 $defaults =& $this->
object->getAvailableDefaults($sortby, $sortorder);
3292 if (count($defaults) > 0)
3294 $tablerows = array();
3295 foreach ($defaults as
$row)
3297 array_push($tablerows, array(
"checkbox" =>
"<input type=\"checkbox\" name=\"chb_defaults[]\" value=\"" . $row[
"test_defaults_id"] .
"\"/>",
"name" => $row[
"name"]));
3299 $headervars = array(
"",
"name");
3301 include_once
"./Services/Table/classes/class.ilTableGUI.php";
3303 $tbl->setTitle($this->lng->txt(
"tst_defaults_available"));
3304 $header_names = array(
3306 $this->lng->txt(
"title")
3308 $tbl->setHeaderNames($header_names);
3310 $tbl->disable(
"sort");
3311 $tbl->disable(
"auto_sort");
3312 $tbl->enable(
"title");
3313 $tbl->enable(
"action");
3314 $tbl->enable(
"select_all");
3315 $tbl->setLimit($maxentries);
3316 $tbl->setOffset($offset);
3317 $tbl->setData($tablerows);
3318 $tbl->setMaxCount(count($tablerows));
3319 $tbl->setOrderDirection($sortorder);
3320 $tbl->setSelectAllCheckbox(
"chb_defaults");
3321 $tbl->setFormName(
"formDefaults");
3322 $tbl->addActionButton(
"deleteDefaults", $this->lng->txt(
"delete"));
3323 $tbl->addActionButton(
"applyDefaults", $this->lng->txt(
"apply"));
3325 $header_params = $this->ctrl->getParameterArray($this,
"defaults");
3326 $tbl->setHeaderVars($headervars, $header_params);
3329 $tbl->setFooter(
"tblfooter", $this->lng->txt(
"previous"), $this->lng->txt(
"next"));
3331 $tableoutput = $tbl->render();
3332 $this->tpl->setVariable(
"TEST_DEFAULTS_TABLE", $tableoutput);
3336 $this->tpl->setVariable(
"TEST_DEFAULTS_TABLE", $this->lng->txt(
"tst_defaults_not_defined"));
3338 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"addDefaults"));
3339 $this->tpl->setVariable(
"BUTTON_ADD", $this->lng->txt(
"add"));
3340 $this->tpl->setVariable(
"TEXT_DEFAULTS_OF_TEST", $this->lng->txt(
"tst_defaults_defaults_of_test"));
3348 if (count(
$_POST[
"chb_defaults"]))
3350 foreach (
$_POST[
"chb_defaults"] as $test_default_id)
3352 $this->
object->deleteDefaults($test_default_id);
3363 if (count(
$_POST[
"chb_defaults"]) == 1)
3365 foreach (
$_POST[
"chb_defaults"] as $test_default_id)
3367 $result = $this->
object->applyDefaults($test_default_id);
3390 if (strlen(
$_POST[
"name"]) > 0)
3392 $this->
object->addDefaults(
$_POST[
'name']);
3408 $this->ctrl->setCmd(
"showSummary");
3409 $this->ctrl->setCmdClass(
"ilinfoscreengui");
3415 $this->ctrl->setCmd(
"showSummary");
3416 $this->ctrl->setCmdClass(
"ilinfoscreengui");
3437 if ($this->object->getTestSequence()->hasHiddenQuestions())
3439 $this->
object->getTestSequence()->clearHiddenQuestions();
3440 $this->
object->getTestSequence()->saveToDb();
3444 if (
$_GET[
'createRandomSolutions'])
3446 $this->
object->createRandomSolutions(
$_GET[
'createRandomSolutions']);
3449 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
3451 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
3454 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
3457 $seq = $this->
object->getTestSession()->getLastSequence();
3459 include_once
"./Modules/Test/classes/class.ilTestOutputGUI.php";
3461 $this->ctrl->setParameter($output_gui,
"sequence", $seq);
3462 $info->setFormAction($this->ctrl->getFormAction($output_gui));
3463 if (strlen($session_lock))
3465 $info->addHiddenElement(
"lock", $session_lock);
3469 $info->addHiddenElement(
"lock", md5(
$_COOKIE[
'PHPSESSID'] . time()));
3471 $online_access =
false;
3472 if ($this->object->getFixedParticipants())
3474 include_once
"./Modules/Test/classes/class.ilObjTestAccess.php";
3476 if ($online_access_result ===
true)
3478 $online_access =
true;
3485 if ($this->object->isComplete())
3487 if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id))
3489 $executable = $this->
object->isExecutable($ilUser->getId(), $allowPassIncrease = TRUE);
3490 if ($executable[
"executable"])
3492 if ($this->object->getTestSession()->getActiveId() > 0)
3495 $resume_text = $this->lng->txt(
"tst_resume_test");
3496 if (($seq < 1) || ($seq == $this->object->getTestSequence()->getFirstSequence()))
3498 $resume_text = $this->
object->getStartTestLabel($this->object->getTestSession()->getActiveId());
3501 #if(!$_GET['crs_show_result'] or $this->object->getTestSequence()->getFirstSequence())
3503 $info->addFormButton(
"resume", $resume_text);
3509 $info->addFormButton(
"start", $this->object->getStartTestLabel($this->object->getTestSession()->getActiveId()));
3516 if ($this->object->getTestSession()->getActiveId() > 0)
3519 if ($this->object->canShowTestResults($ilUser->getId()))
3521 $info->addFormButton(
"outUserResultsOverview", $this->lng->txt(
"tst_show_results"));
3525 if ($this->object->getTestSession()->getActiveId() > 0)
3527 if ($this->object->canShowSolutionPrintview($ilUser->getId()))
3529 $info->addFormButton(
"outUserListOfAnswerPasses", $this->lng->txt(
"tst_list_of_answers_show"));
3534 if ($this->object->getShowInfo())
3536 $info->enablePrivateNotes();
3539 if (strlen($this->object->getIntroduction()))
3541 $info->addSection($this->lng->txt(
"tst_introduction"));
3542 $info->addProperty(
"", $this->object->prepareTextareaOutput($this->object->getIntroduction()));
3545 $info->addSection($this->lng->txt(
"tst_general_properties"));
3546 if ($this->object->getShowInfo())
3548 $info->addProperty($this->lng->txt(
"author"), $this->
object->getAuthor());
3549 $info->addProperty($this->lng->txt(
"title"), $this->
object->getTitle());
3551 if ($this->object->isComplete())
3553 if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess(
"read",
"", $this->ref_id))
3555 if ($this->object->getShowInfo() || !$this->
object->getForceJS())
3558 $checked_javascript =
false;
3559 if ($this->object->getJavaScriptOutput())
3561 $checked_javascript =
true;
3563 if ($this->object->getForceJS())
3565 $info->addProperty($this->lng->txt(
"tst_test_output"), $this->lng->txt(
"tst_use_javascript"));
3569 $info->addPropertyCheckbox($this->lng->txt(
"tst_test_output"),
"chb_javascript", 1, $this->lng->txt(
"tst_use_javascript"), $checked_javascript);
3573 if (!$this->object->isRandomTest())
3575 if ($this->object->getNrOfTries() != 1)
3577 if ($this->object->getUsePreviousAnswers() == 0)
3579 if ($this->object->getShowInfo())
3581 $info->addProperty($this->lng->txt(
"tst_use_previous_answers"), $this->lng->txt(
"tst_dont_use_previous_answers"));
3586 $use_previous_answers = FALSE;
3587 if ($ilUser->prefs[
"tst_use_previous_answers"])
3589 $checked_previous_answers = TRUE;
3591 $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);
3595 if (
$_SESSION[
"AccountId"] == ANONYMOUS_USER_ID)
3597 $info->addPropertyTextinput($this->lng->txt(
"enter_anonymous_code"),
"anonymous_id",
"", 8,
"setAnonymousId", $this->lng->txt(
"submit"));
3602 if ($this->object->getShowInfo())
3604 $info->addSection($this->lng->txt(
"tst_sequence_properties"));
3605 $info->addProperty($this->lng->txt(
"tst_sequence"), $this->lng->txt(($this->object->getSequenceSettings() ==
TEST_FIXED_SEQUENCE)?
"tst_sequence_fixed":
"tst_sequence_postpone"));
3607 $info->addSection($this->lng->txt(
"tst_heading_scoring"));
3608 $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"));
3609 $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"));
3610 if ($this->object->isRandomTest())
3612 $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"));
3615 $info->addSection($this->lng->txt(
"tst_score_reporting"));
3616 $score_reporting_text =
"";
3617 switch ($this->object->getScoreReporting())
3620 $score_reporting_text = $this->lng->txt(
"tst_report_after_test");
3623 $score_reporting_text = $this->lng->txt(
"tst_report_after_first_question");
3626 $score_reporting_text = $this->lng->txt(
"tst_report_after_date");
3629 $score_reporting_text = $this->lng->txt(
"tst_report_after_never");
3632 $info->addProperty($this->lng->txt(
"tst_score_reporting"), $score_reporting_text);
3633 $reporting_date = $this->
object->getReportingDate();
3634 if ($reporting_date)
3636 #preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches);
3637 #$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]));
3638 #$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date);
3639 $info->addProperty($this->lng->txt(
'tst_score_reporting_date'),
3643 $info->addSection($this->lng->txt(
"tst_session_settings"));
3644 $info->addProperty($this->lng->txt(
"tst_nr_of_tries"), ($this->
object->getNrOfTries() == 0)?$this->lng->txt(
"unlimited"):$this->
object->getNrOfTries());
3645 if ($this->object->getNrOfTries() != 1)
3647 $info->addProperty($this->lng->txt(
"tst_nr_of_tries_of_user"), ($this->
object->getTestSession()->getPass() ==
false)?$this->lng->txt(
"tst_no_tries"):$this->
object->getTestSession()->getPass());
3650 if ($this->object->getEnableProcessingTime())
3652 $info->addProperty($this->lng->txt(
"tst_processing_time"), $this->
object->getProcessingTime());
3654 if (strlen($this->object->getAllowedUsers()) && ($this->object->getAllowedUsersTimeGap()))
3656 $info->addProperty($this->lng->txt(
"tst_allowed_users"), $this->
object->getAllowedUsers());
3659 $starting_time = $this->
object->getStartingTime();
3662 $info->addProperty($this->lng->txt(
"tst_starting_time"),
3665 $ending_time = $this->
object->getEndingTime();
3668 $info->addProperty($this->lng->txt(
"tst_ending_time"),
3671 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
3674 if(
$_GET[
'crs_show_result'] and !$this->object->getTestSequence()->getFirstSequence())
3676 #ilUtil::sendInfo($this->lng->txt('crs_all_questions_answered_successfully'));
3680 $this->ctrl->forwardCommand($info);
3686 switch ($this->ctrl->getCmd())
3690 case "redirectToInfoScreen":
3697 case "outCorrectSolution":
3699 case "showAnswersOfUser":
3700 case "outUserResultsOverview":
3701 case "backFromSummary":
3702 case "show_answers":
3705 case "outTestSummary":
3706 case "outQuestionSummary":
3707 case "gotoQuestion":
3708 case "selectImagemapRegion":
3709 case "confirmSubmitAnswers":
3710 case "finalSubmission":
3712 case "redirectQuestion":
3713 case "outUserPassDetails":
3714 case "checkPassword":
3715 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
"infoScreen"),
"",
$_GET[
"ref_id"]);
3718 case "evalAllUsers":
3719 case "evalUserDetail":
3720 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
"eval_stat"),
"",
$_GET[
"ref_id"]);
3727 case "importVerifiedFile":
3728 case "cancelImport":
3731 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$_GET[
"ref_id"]);
3739 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
3742 $tabs_gui->setBackTarget($this->lng->txt(
"backtocallingtest"), $this->ctrl->getLinkTarget($this,
"questions"));
3743 $tabs_gui->addTarget(
"tst_browse_for_questions",
3744 $this->ctrl->getLinkTarget($this,
"browseForQuestions"),
3745 array(
"browseForQuestions",
"filter",
"resetFilter",
"resetTextFilter",
"insertQuestions"),
3754 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
3757 $tabs_gui->setBackTarget($this->lng->txt(
"backtocallingtest"), $this->ctrl->getLinkTarget($this,
"questions"));
3758 $tabs_gui->addTarget(
"random_selection",
3759 $this->ctrl->getLinkTarget($this,
"randomQuestions"),
3760 array(
"randomQuestions"),
3775 include_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
3776 include_once
"./Modules/Test/classes/class.ilTestCertificateAdapter.php";
3778 $output_gui->certificateEditor();
3786 $ilTabs->addSubTabTarget(
"edit_test_questions",
3787 $this->ctrl->getLinkTarget($this,
'questions'),
3788 array(
"questions",
"browseForQuestions",
"questionBrowser",
"createQuestion",
3789 "randomselect",
"filter",
"resetFilter",
"insertQuestions",
3790 "back",
"createRandomSelection",
"cancelRandomSelect",
3791 "insertRandomSelection",
"removeQuestions",
"moveQuestions",
3792 "insertQuestionsBefore",
"insertQuestionsAfter",
"confirmRemoveQuestions",
3793 "cancelRemoveQuestions",
"executeCreateQuestion",
"cancelCreateQuestion",
3794 "addQuestionpool",
"saveRandomQuestions",
"saveQuestionSelectionMode"),
3798 if (!$this->object->isRandomTest())
3800 $ilTabs->addSubTabTarget(
"print_view",
3801 $this->ctrl->getLinkTarget($this,
'print'),
3812 $ilTabs->addSubTabTarget(
"eval_all_users",
3813 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"outEvaluation"),
3814 array(
"outEvaluation",
"detailedEvaluation",
"exportEvaluation",
"evalUserDetail",
"passDetails",
3815 "outStatisticsResultsOverview",
"statisticsPassDetails")
3819 $ilTabs->addSubTabTarget(
"tst_results_aggregated",
3820 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"eval_a"),
3825 $ilTabs->addSubTabTarget(
"tst_single_results",
3826 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"singleResults"),
3827 array(
"singleResults"),
3836 $force_active = ($this->ctrl->getCmd() ==
"")
3839 $ilTabs->addSubTabTarget(
"general",
3840 $this->ctrl->getLinkTarget($this,
'properties'),
3841 array(
"properties",
"saveProperties",
"cancelProperties"),
3842 array(
"",
"ilobjtestgui",
"ilcertificategui"),
3846 $ilTabs->addSubTabTarget(
3848 $this->ctrl->getLinkTarget($this,
'scoring'),
3850 array(
"",
"ilobjtestgui",
"ilcertificategui")
3854 $ilTabs->addSubTabTarget(
3856 $this->ctrl->getLinkTarget($this,
'marks'),
3857 array(
"marks",
"addMarkStep",
"deleteMarkSteps",
"addSimpleMarkSchema",
3858 "saveMarks",
"cancelMarks"),
3859 array(
"",
"ilobjtestgui",
"ilcertificategui")
3862 include_once
'./Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
3866 $ilTabs->addSubTabTarget(
3868 $this->ctrl->getLinkTarget($this,
'certificate'),
3869 array(
"certificate",
"certificateEditor",
"certificateRemoveBackground",
"certificateSave",
3870 "certificatePreview",
"certificateDelete",
"certificateUpload",
"certificateImport"),
3871 array(
"",
"ilobjtestgui",
"ilcertificategui")
3876 $ilTabs->addSubTabTarget(
3878 $this->ctrl->getLinkTarget($this,
"defaults"),
3879 array(
"defaults",
"deleteDefaults",
"addDefaults",
"applyDefaults"),
3880 array(
"",
"ilobjtestgui",
"ilcertificategui")
3891 global $ilAccess,$ilUser;
3893 switch ($this->ctrl->getCmd())
3899 case "directfeedback":
3901 case "outCorrectSolution":
3903 case "showAnswersOfUser":
3904 case "outUserResultsOverview":
3905 case "backFromSummary":
3906 case "show_answers":
3909 case "confirmFinish":
3910 case "outTestSummary":
3911 case "outQuestionSummary":
3912 case "gotoQuestion":
3913 case "selectImagemapRegion":
3914 case "confirmSubmitAnswers":
3915 case "finalSubmission":
3917 case "redirectQuestion":
3918 case "outUserPassDetails":
3919 case "checkPassword":
3920 case "exportCertificate":
3921 case "finishListOfAnswers":
3922 case "backConfirmFinish":
3923 case "showFinalStatement":
3926 case "browseForQuestions":
3929 case "resetTextFilter":
3930 case "insertQuestions":
3939 case "deleteMarkSteps":
3940 case "addSimpleMarkSchema":
3942 case "certificateservice":
3943 case "certificateImport":
3944 case "certificateUpload":
3945 case "certificateEditor":
3946 case "certificateDelete":
3947 case "certificateSave":
3949 case "deleteDefaults":
3951 case "applyDefaults":
3952 case "inviteParticipants":
3953 case "searchParticipants":
3955 if (($ilAccess->checkAccess(
"write",
"", $this->ref_id)) && ((strcmp($this->ctrl->getCmdClass(),
"ilobjtestgui") == 0) || (strcmp($this->ctrl->getCmdClass(),
"ilcertificategui") == 0) || (strlen($this->ctrl->getCmdClass()) == 0)))
3965 case "detailedEvaluation":
3966 case "outEvaluation":
3967 case "singleResults":
3968 case "exportEvaluation":
3969 case "evalUserDetail":
3971 case "outStatisticsResultsOverview":
3972 case "statisticsPassDetails":
3977 if (strcmp(strtolower(get_class($this->
object)),
"ilobjtest") == 0)
3980 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
3982 $force_active = (
$_GET[
"up"] !=
"" ||
$_GET[
"down"] !=
"")
3987 if (
$_GET[
"browse"] == 1) $force_active =
true;
3988 if (preg_match(
"/deleteqpl_\d+/", $this->ctrl->getCmd()))
3990 $force_active =
true;
3993 $tabs_gui->addTarget(
"assQuestions",
3994 $this->ctrl->getLinkTarget($this,
'questions'),
3995 array(
"questions",
"browseForQuestions",
"questionBrowser",
"createQuestion",
3996 "randomselect",
"filter",
"resetFilter",
"insertQuestions",
3997 "back",
"createRandomSelection",
"cancelRandomSelect",
3998 "insertRandomSelection",
"removeQuestions",
"moveQuestions",
3999 "insertQuestionsBefore",
"insertQuestionsAfter",
"confirmRemoveQuestions",
4000 "cancelRemoveQuestions",
"executeCreateQuestion",
"cancelCreateQuestion",
4001 "addQuestionpool",
"saveRandomQuestions",
"saveQuestionSelectionMode",
"print",
4002 "addsource",
"removesource",
"randomQuestions"),
4003 "",
"", $force_active);
4007 if ($ilAccess->checkAccess(
"visible",
"", $this->ref_id))
4009 $tabs_gui->addTarget(
"info_short",
4010 $this->ctrl->getLinkTarget($this,
'infoScreen'),
4011 array(
"infoScreen",
"outIntroductionPage",
"showSummary",
4012 "setAnonymousId",
"outUserListOfAnswerPasses",
"redirectToInfoScreen"));
4016 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
4018 $tabs_gui->addTarget(
"settings",
4019 $this->ctrl->getLinkTarget($this,
'properties'),
4020 array(
"properties",
"saveProperties",
"cancelProperties",
4021 "marks",
"addMarkStep",
"deleteMarkSteps",
"addSimpleMarkSchema",
4022 "saveMarks",
"cancelMarks",
4023 "certificate",
"certificateEditor",
"certificateRemoveBackground",
4024 "certificateSave",
"certificatePreview",
"certificateDelete",
"certificateUpload",
4025 "certificateImport",
"scoring",
"defaults",
"addDefaults",
"deleteDefaults",
"applyDefaults",
4026 "inviteParticipants",
"saveFixedParticipantsStatus",
"searchParticipants",
"addParticipants",
4029 array(
"",
"ilobjtestgui",
"ilcertificategui")
4033 $tabs_gui->addTarget(
"participants",
4034 $this->ctrl->getLinkTarget($this,
'participants'),
4035 array(
"participants",
"saveClientIP",
4036 "removeParticipant",
4037 "showParticipantAnswersForAuthor",
4038 "deleteAllUserResults",
4039 "cancelDeleteAllUserData",
"deleteSingleUserResults",
4040 "outParticipantsResultsOverview",
"outParticipantsPassDetails",
4041 "showPassOverview",
"showUserAnswers",
"participantsAction",
4042 "showDetailedResults"),
4046 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
4049 $tabs_gui->addTarget(
'learning_progress',
4050 $this->ctrl->getLinkTargetByClass(array(
'illearningprogressgui'),
''),
4052 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
4055 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
4057 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
4059 if (count($scoring))
4062 $tabs_gui->addTarget(
"manscoring",
4063 $this->ctrl->getLinkTargetByClass(
"iltestscoringgui",
"manscoring"),
4064 array(
"manscoring",
"scoringfilter",
"scoringfilterreset",
"setPointsManual",
"setFeedbackManual",
"setManscoringDone"),
4069 if (($ilAccess->checkAccess(
"tst_statistics",
"", $this->ref_id)) || ($ilAccess->checkAccess(
"write",
"", $this->ref_id)))
4072 $tabs_gui->addTarget(
"statistics",
4073 $this->ctrl->getLinkTargetByClass(
"iltestevaluationgui",
"outEvaluation"),
4074 array(
"statistics",
"outEvaluation",
"exportEvaluation",
"detailedEvaluation",
"eval_a",
"evalUserDetail",
4075 "passDetails",
"outStatisticsResultsOverview",
"statisticsPassDetails",
"singleResults")
4079 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id))
4082 $tabs_gui->addTarget(
"history",
4083 $this->ctrl->getLinkTarget($this,
'history'),
4087 $tabs_gui->addTarget(
"meta_data",
4088 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
'listSection'),
4089 "",
"ilmdeditorgui");
4092 $tabs_gui->addTarget(
"export",
4093 $this->ctrl->getLinkTarget($this,
'export'),
4094 array(
"export",
"createExportFile",
"confirmDeleteExportFile",
4095 "downloadExportFile",
"deleteExportFile",
"cancelDeleteExportFile"),
4099 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->ref_id))
4101 $tabs_gui->addTarget(
"perm_settings",
4102 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
4119 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
4122 $_GET[
"baseClass"] =
"ilObjTestGUI";
4123 $_GET[
"cmd"] =
"infoScreen";
4124 $_GET[
"ref_id"] = $a_target;
4125 include_once(
"ilias.php");
4129 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
4131 $_GET[
"cmd"] =
"frameset";
4132 $_GET[
"target"] =
"";
4133 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
4136 include(
"repository.php");
4140 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);