4 require_once
'./Services/Object/classes/class.ilObjectGUI.php';
5 require_once
'./Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
6 require_once
'./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php';
7 require_once
'./Modules/TestQuestionPool/exceptions/class.ilTestQuestionPoolException.php';
8 require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
9 require_once
'./Modules/Test/classes/class.ilObjAssessmentFolder.php';
10 require_once
'./Modules/Test/classes/class.ilObjTest.php';
51 $rbacsystem = $DIC[
'rbacsystem'];
52 $lng->loadLanguageModule(
"assessment");
56 $this->ctrl->saveParameter($this, array(
57 "ref_id",
"test_ref_id",
"calling_test",
"test_express_mode",
"q_id",
'tax_node',
'calling_consumer',
'consumer_context' 59 $this->ctrl->saveParameter($this,
"calling_consumer");
60 $this->ctrl->saveParameterByClass(
'ilAssQuestionPageGUI',
'calling_consumer');
61 $this->ctrl->saveParameterByClass(
'ilAssQuestionPageGUI',
'consumer_context');
62 $this->ctrl->saveParameterByClass(
'ilobjquestionpoolgui',
'calling_consumer');
63 $this->ctrl->saveParameterByClass(
'ilobjquestionpoolgui',
'consumer_context');
65 parent::__construct(
"",
$_GET[
"ref_id"],
true,
false);
84 $ilLocator = $DIC[
'ilLocator'];
85 $ilAccess = $DIC[
'ilAccess'];
86 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
90 $ilTabs = $DIC[
'ilTabs'];
93 $ilPluginAdmin = $DIC[
'ilPluginAdmin'];
94 $ilias = $DIC[
'ilias'];
96 $writeAccess = $ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]);
98 if ((!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) && (!$ilAccess->checkAccess(
"visible",
"",
$_GET[
"ref_id"]))) {
100 $ilias = $DIC[
'ilias'];
101 $ilias->raiseError($this->lng->txt(
"permission_denied"), $ilias->error_obj->MESSAGE);
106 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
107 if (
'qpl' == $this->object->getType()) {
108 $ilNavigationHistory->addItem(
110 "ilias.php?baseClass=ilObjQuestionPoolGUI&cmd=questions&ref_id=" .
$_GET[
"ref_id"],
116 $cmd = $this->ctrl->getCmd(
"questions");
117 $next_class = $this->ctrl->getNextClass($this);
119 if (in_array($next_class, array(
'',
'ilobjquestionpoolgui')) && $cmd ==
'questions') {
125 $this->ctrl->setReturn($this,
"questions");
130 if (
$_GET[
"q_id"] < 1) {
131 $q_type = (
$_POST[
"sel_question_types"] !=
"")
132 ?
$_POST[
"sel_question_types"]
133 :
$_GET[
"sel_question_types"];
135 if ($cmd !=
"createQuestion" && $cmd !=
"createQuestionForTest" 136 && $next_class !=
"ilassquestionpagegui") {
137 if ((
$_GET[
"test_ref_id"] !=
"")
or (
$_GET[
"calling_test"])) {
144 switch ($next_class) {
145 case "ilcommonactiondispatchergui":
146 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
148 $this->ctrl->forwardCommand($gui);
151 case 'ilobjectmetadatagui':
152 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
153 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
155 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
157 $this->ctrl->forwardCommand($md_gui);
160 case 'ilassquestionpreviewgui':
162 $this->ctrl->saveParameter($this,
"q_id");
164 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
167 $gui->initQuestion((
int)
$_GET[
'q_id'], $this->object->getId());
168 $gui->initPreviewSettings($this->object->getRefId());
170 $gui->initHintTracking();
171 $gui->initStyleSheets();
174 $ilHelp = $DIC[
'ilHelp'];
175 $ilHelp->setScreenIdComponent(
"qpl");
177 $this->ctrl->forwardCommand($gui);
180 case "ilassquestionpagegui":
181 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
182 $this->tpl->setCurrentBlock(
"ContentStyle");
184 $this->tpl->parseCurrentBlock();
187 $this->tpl->setCurrentBlock(
"SyntaxStyle");
189 $this->tpl->parseCurrentBlock();
191 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
194 $q_gui->setQuestionTabs();
195 $q_gui->outAdditionalOutput();
196 $q_gui->object->setObjId($this->object->getId());
198 $q_gui->setTargetGuiClass(null);
199 $q_gui->setQuestionActionCmd(null);
201 if ($this->object->getType() ==
'qpl') {
202 $q_gui->addHeaderAction();
205 $question = $q_gui->object;
206 $this->ctrl->saveParameter($this,
"q_id");
207 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
208 $this->lng->loadLanguageModule(
"content");
209 $this->ctrl->setReturnByClass(
"ilAssQuestionPageGUI",
"view");
210 $this->ctrl->setReturn($this,
"questions");
212 $page_gui->obj->addUpdateListener(
216 $page_gui->setEditPreview(
true);
217 $page_gui->setEnabledTabs(
false);
218 if (strlen($this->ctrl->getCmd()) == 0 && !isset(
$_POST[
"editImagemapForward_x"])) {
219 $this->ctrl->setCmdClass(get_class($page_gui));
220 $this->ctrl->setCmd(
"preview");
222 $page_gui->setQuestionHTML(array($q_gui->object->getId() => $q_gui->getPreview(
true)));
223 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
224 $page_gui->setOutputMode(
"edit");
225 $page_gui->setHeader($question->getTitle());
226 $page_gui->setPresentationTitle($question->getTitle());
227 $ret = $this->ctrl->forwardCommand($page_gui);
231 case 'ilpermissiongui':
232 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
234 $ret = $this->ctrl->forwardCommand($perm_gui);
237 case 'ilobjectcopygui':
238 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
241 $this->ctrl->forwardCommand($cp);
244 case "ilquestionpoolexportgui":
245 require_once
'Modules/TestQuestionPool/classes/class.ilQuestionPoolExportGUI.php';
247 $exp_gui->addFormat(
'xml', $this->lng->txt(
'qpl_export_xml'));
248 $exp_gui->addFormat(
'xls', $this->lng->txt(
'qpl_export_excel'), $this,
'createExportExcel');
249 $ret = $this->ctrl->forwardCommand($exp_gui);
252 case "ilinfoscreengui":
256 case 'ilassquestionhintsgui':
259 $this->ctrl->setReturn($this,
"questions");
262 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
264 $questionGUI->object->setObjId($this->object->getId());
265 $questionGUI->setQuestionTabs();
267 $ilHelp = $DIC[
'ilHelp'];
268 $ilHelp->setScreenIdComponent(
"qpl");
270 if ($this->object->getType() ==
'qpl' && $writeAccess) {
271 $questionGUI->addHeaderAction();
275 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
278 $gui->setEditingEnabled(
279 $DIC->access()->checkAccess(
'write',
'', $this->object->getRefId())
286 case 'illocalunitconfigurationgui':
287 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
288 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
291 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
293 $questionGUI->object->setObjId($this->object->getId());
294 $questionGUI->setQuestionTabs();
296 $this->ctrl->setReturn($this,
'questions');
298 require_once
'Modules/TestQuestionPool/classes/class.ilLocalUnitConfigurationGUI.php';
299 require_once
'Modules/TestQuestionPool/classes/class.ilUnitConfigurationRepository.php';
306 case 'ilassquestionfeedbackeditinggui':
309 $this->ctrl->setReturn($this,
"questions");
312 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
314 $questionGUI->object->setObjId($this->object->getId());
315 $questionGUI->setQuestionTabs();
317 $ilHelp = $DIC[
'ilHelp'];
318 $ilHelp->setScreenIdComponent(
"qpl");
320 if ($this->object->getType() ==
'qpl' && $writeAccess) {
321 $questionGUI->addHeaderAction();
325 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
331 case 'ilobjquestionpoolsettingsgeneralgui':
332 require_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPoolSettingsGeneralGUI.php';
334 $this->ctrl->forwardCommand($gui);
337 case "ilobjtaxonomygui":
339 require_once
'Modules/TestQuestionPool/classes/class.ilObjQuestionPoolTaxonomyEditingCommandForwarder.php';
349 $forwarder->forward();
353 case 'ilquestionpoolskilladministrationgui':
355 require_once
'Modules/TestQuestionPool/classes/class.ilQuestionPoolSkillAdministrationGUI.php';
369 $this->ctrl->forwardCommand($gui);
373 case 'ilquestionbrowsertablegui':
377 case "ilobjquestionpoolgui":
380 if ($cmd ==
'questions') {
381 $this->ctrl->setParameter($this,
'q_id',
'');
385 $ret = $this->$cmd();
389 $this->ctrl->setReturn($this,
"questions");
390 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
393 $q_gui->object->setObjId($this->object->getId());
394 if ($this->object->getType() ==
'qpl') {
395 $q_gui->setTaxonomyIds($this->object->getTaxonomyIds());
396 $this->
object->addQuestionChangeListeners($q_gui->object);
398 $q_gui->addHeaderAction();
401 $q_gui->setQuestionTabs();
403 $ilHelp = $DIC[
'ilHelp'];
404 $ilHelp->setScreenIdComponent(
"qpl");
405 $ret = $this->ctrl->forwardCommand($q_gui);
409 if (!(strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" 410 || strtolower(
$_GET[
'baseClass']) ==
'ilrepositorygui')
423 $DIC->ctrl()->redirectByClass(
'ilQuestionPoolExportGUI');
431 $file = explode(
"_",
$_GET[
"file_id"]);
432 include_once(
"./Modules/File/classes/class.ilObjFile.php");
433 $fileObj =
new ilObjFile($file[count($file) - 1],
false);
434 $fileObj->sendFile();
443 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
445 $page_gui->showMediaFullscreen();
462 $_POST[
"filter_text"] =
"";
463 $_POST[
"sel_filter_type"] =
"";
472 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPage.php");
474 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
483 $this->ctrl->setParameter($this,
'new_type', $_REQUEST[
'new_type']);
484 if ($_FILES[
"xmldoc"][
"error"] > UPLOAD_ERR_OK) {
486 if (!$questions_only) {
487 $this->ctrl->redirect($this,
'create');
492 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
497 $file = pathinfo($_FILES[
"xmldoc"][
"name"]);
498 $full_path = $basedir .
"/" . $_FILES[
"xmldoc"][
"name"];
499 $DIC[
'ilLog']->write(__METHOD__ .
": full path " . $full_path);
500 include_once
"./Services/Utilities/classes/class.ilUtil.php";
501 ilUtil::moveUploadedFile($_FILES[
"xmldoc"][
"tmp_name"], $_FILES[
"xmldoc"][
"name"], $full_path);
502 $DIC[
'ilLog']->write(__METHOD__ .
": full path " . $full_path);
503 if (strcmp($_FILES[
"xmldoc"][
"type"],
"text/xml") == 0) {
504 $qti_file = $full_path;
511 $subdir = basename($file[
"basename"],
"." . $file[
"extension"]);
518 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
520 $result = $qtiParser->startParsing();
521 $founditems = &$qtiParser->getFoundItems();
522 if (count($founditems) == 0) {
529 if (!$questions_only) {
530 $this->ctrl->redirect($this,
'create');
537 foreach ($founditems as $item) {
538 if (strlen($item[
"type"])) {
545 if ($complete == 0) {
550 if (!$questions_only) {
551 $this->ctrl->redirect($this,
'create');
556 $_SESSION[
"qpl_import_xml_file"] = $xml_file;
557 $_SESSION[
"qpl_import_qti_file"] = $qti_file;
558 $_SESSION[
"qpl_import_subdir"] = $subdir;
560 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.qpl_import_verification.html",
"Modules/TestQuestionPool");
562 require_once
'Modules/TestQuestionPool/classes/tables/class.ilQuestionPoolImportVerificationTableGUI.php';
566 foreach ($founditems as $item) {
568 'title' => $item[
'title'],
569 'ident' => $item[
'ident'],
572 include_once
"./Services/QTI/classes/class.ilQTIItem.php";
573 switch ($item[
"type"]) {
575 $type = $this->lng->txt(
"assClozeTest");
578 $type = $this->lng->txt(
"assImagemapQuestion");
581 $type = $this->lng->txt(
"assJavaApplet");
584 $type = $this->lng->txt(
"assMatchingQuestion");
587 $type = $this->lng->txt(
"assMultipleChoice");
590 $type = $this->lng->txt(
"assKprimChoice");
593 $type = $this->lng->txt(
"assLongMenu");
596 $type = $this->lng->txt(
"assSingleChoice");
599 $type = $this->lng->txt(
"assOrderingQuestion");
602 $type = $this->lng->txt(
"assTextQuestion");
605 $type = $this->lng->txt(
"assNumeric");
608 $type = $this->lng->txt(
"assTextSubset");
611 $type = $this->lng->txt($item[
"type"]);
615 if (strcmp(
$type,
"-" . $item[
"type"] .
"-") == 0) {
617 $ilPluginAdmin = $DIC[
'ilPluginAdmin'];
618 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_MODULE,
"TestQuestionPool",
"qst");
619 foreach ($pl_names as $pl_name) {
621 if (strcmp($pl->getQuestionType(), $item[
"type"]) == 0) {
622 $type = $pl->getQuestionTypeTranslation();
633 $this->tpl->setCurrentBlock(
"import_qpl");
634 if (is_file($xml_file)) {
636 $fh = @
fopen($xml_file,
"r")
or die(
"");
637 $xml = @fread($fh, filesize($xml_file));
639 if (preg_match(
"/<ContentObject.*?MetaData.*?General.*?Title[^>]*?>([^<]*?)</",
$xml, $matches)) {
640 $this->tpl->setVariable(
"VALUE_NEW_QUESTIONPOOL", $matches[1]);
643 $this->tpl->setVariable(
"TEXT_CREATE_NEW_QUESTIONPOOL", $this->lng->txt(
"qpl_import_create_new_qpl"));
644 $this->tpl->parseCurrentBlock();
646 $this->tpl->setCurrentBlock(
"adm_content");
647 $this->tpl->setVariable(
"FOUND_QUESTIONS_INTRODUCTION", $this->lng->txt(
"qpl_import_verify_found_questions"));
648 if ($questions_only) {
649 $this->tpl->setVariable(
"VERIFICATION_HEADING", $this->lng->txt(
"import_questions_into_qpl"));
650 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
652 $this->tpl->setVariable(
"VERIFICATION_HEADING", $this->lng->txt(
"import_qpl"));
654 $this->ctrl->setParameter($this,
"new_type", $this->type);
655 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
658 $value_questions_only = 0;
659 if ($questions_only) {
660 $value_questions_only = 1;
662 $this->tpl->setVariable(
"VALUE_QUESTIONS_ONLY", $value_questions_only);
663 $this->tpl->setVariable(
"VERIFICATION_TABLE",
$table->getHtml());
664 $this->tpl->setVariable(
"VERIFICATION_FORM_NAME",
$table->getFormName());
666 $this->tpl->parseCurrentBlock();
676 if (
$_POST[
"questions_only"] == 1) {
679 include_once(
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
683 $newObj->setType(
$_GET[
"new_type"]);
685 $newObj->setTitle(
"dummy");
687 $newObj->setDescription(
"questionpool import");
689 $newObj->create(
true);
691 $newObj->createReference();
693 $newObj->putInTree(
$_GET[
"ref_id"]);
695 $newObj->setPermissions(
$_GET[
"ref_id"]);
698 if (is_file(
$_SESSION[
"qpl_import_dir"] .
'/' .
$_SESSION[
"qpl_import_subdir"] .
"/manifest.xml")) {
699 $_SESSION[
"qpl_import_idents"] =
$_POST[
"ident"];
701 $fileName = $_SESSION[
"qpl_import_subdir"] .
'.zip';
702 $fullPath = $_SESSION[
"qpl_import_dir"] .
'/' . $fileName;
704 include_once(
"./Services/Export/classes/class.ilImport.php");
706 $map = $imp->getMapping();
707 $map->addMapping(
"Modules/TestQuestionPool",
"qpl",
"new_id", $newObj->getId());
708 $imp->importObject($newObj, $fullPath, $fileName,
"qpl",
"Modules/TestQuestionPool",
true);
711 include_once
"./Services/QTI/classes/class.ilQTIParser.php";
713 $result = $qtiParser->startParsing();
716 if (strlen($_SESSION[
"qpl_import_xml_file"])) {
717 include_once(
"./Modules/LearningModule/classes/class.ilContObjParser.php");
718 $contParser =
new ilContObjParser($newObj, $_SESSION[
"qpl_import_xml_file"], $_SESSION[
"qpl_import_subdir"]);
719 $contParser->setQuestionMapping($qtiParser->getImportMapping());
720 $contParser->startParsing();
723 $newObj->fromXML($_SESSION[
"qpl_import_xml_file"]);
727 if (isset(
$_POST[
"qpl_new"]) && strlen(
$_POST[
"qpl_new"])) {
728 $newObj->setTitle(
$_POST[
"qpl_new"]);
736 include_once
"./Services/Utilities/classes/class.ilUtil.php";
739 if (
$_POST[
"questions_only"] == 1) {
740 $this->ctrl->redirect($this,
"questions");
742 ilUtil::sendSuccess($this->lng->txt(
"object_imported"),
true);
744 "&baseClass=ilObjQuestionPoolGUI");
750 if (
$_POST[
"questions_only"] == 1) {
751 $this->ctrl->redirect($this,
"questions");
753 $this->ctrl->redirect($this,
"cancel");
762 $upload_valid =
true;
764 if (
$form->checkInput()) {
766 $form->setValuesByPost();
770 $form->setValuesByPost();
784 $this->tpl->setContent(
$form->getHtml());
792 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
794 $form->setTitle($this->lng->txt(
'import_question'));
795 $form->setFormAction($this->ctrl->getFormAction($this,
'upload'));
797 $file =
new ilFileInputGUI($this->lng->txt(
'select_file'),
'xmldoc');
799 $form->addItem($file);
801 $form->addCommandButton(
'upload', $this->lng->txt(
'upload'));
802 $form->addCommandButton(
'questions', $this->lng->txt(
'cancel'));
813 $addContEditMode =
$_POST[
'add_quest_cont_edit_mode'];
818 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
820 $this->
object->addQuestionChangeListeners($q_gui->object);
821 $q_gui->object->setObjId($this->object->getId());
822 $q_gui->object->setAdditionalContentEditingMode($addContEditMode);
823 $q_gui->object->createNewQuestion();
824 $this->ctrl->setParameterByClass(get_class($q_gui),
"q_id", $q_gui->object->getId());
825 $this->ctrl->setParameterByClass(get_class($q_gui),
"sel_question_types",
$_POST[
"sel_question_types"]);
826 $this->ctrl->redirectByClass(get_class($q_gui),
"editQuestion");
834 if (!$_REQUEST[
'q_id']) {
835 require_once
'Modules/Test/classes/class.ilObjAssessmentFolder.php';
837 $addContEditMode = $_REQUEST[
'add_quest_cont_edit_mode'];
842 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
844 $q_gui->object->setObjId($this->object->getId());
845 $q_gui->object->setAdditionalContentEditingMode($addContEditMode);
846 $q_gui->object->createNewQuestion();
848 $class = get_class($q_gui);
849 $qId = $q_gui->object->getId();
851 $class =
$_GET[
"sel_question_types"] .
'gui';
852 $qId = $_REQUEST[
'q_id'];
855 $this->ctrl->setParameterByClass($class,
"q_id", $qId);
856 $this->ctrl->setParameterByClass($class,
"sel_question_types", $_REQUEST[
"sel_question_types"]);
857 $this->ctrl->setParameterByClass($class,
"prev_qid", $_REQUEST[
"prev_qid"]);
859 $this->ctrl->redirectByClass($class,
"editQuestion");
869 ilUtil::sendSuccess($this->lng->txt(
"object_added"),
true);
872 "&baseClass=ilObjQuestionPoolGUI");
879 $this->editQuestionForm(
$type);
888 $rbacsystem = $DIC[
'rbacsystem'];
890 $questionIdsToDelete = isset(
$_POST[
'q_id']) ? (array)
$_POST[
'q_id'] : array();
891 if (0 === count($questionIdsToDelete) && isset(
$_GET[
'q_id'])) {
892 $questionIdsToDelete = array(
$_GET[
'q_id']);
895 $questionIdsToDelete = array_filter(array_map(
'intval', $questionIdsToDelete));
896 if (0 === count($questionIdsToDelete)) {
898 $this->ctrl->redirect($this,
"questions");
902 $deleteable_questions = &$this->
object->getDeleteableQuestionDetails($questionIdsToDelete);
903 include_once
"./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
904 $table_gui =
new ilQuestionBrowserTableGUI($this,
'questions', (($rbacsystem->checkAccess(
'write', (
int)
$_GET[
'ref_id']) ? true :
false)),
true);
906 $table_gui->setLimit(PHP_INT_MAX);
907 $table_gui->setEditable($rbacsystem->checkAccess(
'write', (
int) $_GET[
'ref_id']));
908 $table_gui->setData($deleteable_questions);
909 $this->tpl->setVariable(
'ADM_CONTENT', $table_gui->getHTML());
920 $this->
object->deleteQuestion($value);
921 $this->
object->cleanupClipboard($value);
923 if (count(
$_POST[
"q_id"])) {
924 ilUtil::sendSuccess($this->lng->txt(
"qpl_questions_deleted"),
true);
927 $this->ctrl->setParameter($this,
'q_id',
'');
929 $this->ctrl->redirect($this,
"questions");
937 $this->ctrl->redirect($this,
"questions");
946 if (count(
$_POST[
"q_id"]) > 0) {
947 include_once(
"./Modules/TestQuestionPool/classes/class.ilQuestionpoolExport.php");
949 $export_file = $qpl_exp->buildExportFile();
952 include_once
"./Services/Utilities/classes/class.ilUtil.php";
958 $this->ctrl->redirect($this,
"questions");
964 $enableComments = $DIC->rbac()->system()->checkAccess(
'write',
$_GET[
'ref_id']);
966 require_once
'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
969 include_once
"./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
971 $table_gui->resetOffset();
972 $table_gui->writeFilterToSession();
978 require_once
'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
981 include_once
"./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
983 $table_gui->resetOffset();
984 $table_gui->resetFilter();
990 require_once
'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
994 $this->ctrl->redirect($this,
'infoScreen');
1003 $rbacsystem = $DIC[
'rbacsystem'];
1006 $ilDB = $DIC[
'ilDB'];
1008 $ilPluginAdmin = $DIC[
'ilPluginAdmin'];
1010 if (get_class($this->
object) ==
"ilObjTest") {
1011 if (
$_GET[
"calling_test"] > 0) {
1013 $q_id =
$_GET[
"q_id"];
1015 if ($_REQUEST[
'test_express_mode']) {
1017 ilUtil::redirect(
"ilias.php?ref_id=" .
$ref_id .
"&q_id=" . $q_id .
"&test_express_mode=1&cmd=showPage&cmdClass=iltestexpresspageobjectgui&baseClass=ilObjTestGUI");
1019 ilUtil::redirect(
"ilias.php?ref_id=" .
$ref_id .
"&test_express_mode=1&cmd=showPage&cmdClass=iltestexpresspageobjectgui&baseClass=ilObjTestGUI");
1025 } elseif (isset(
$_GET[
'calling_consumer']) && (
int)
$_GET[
'calling_consumer']) {
1026 $ref_id = (int) $_GET[
'calling_consumer'];
1029 ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET[
'consumer_context']));
1031 require_once
'Services/Link/classes/class.ilLink.php';
1035 $this->
object->purgeQuestions();
1039 require_once
'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
1041 if ($qsaImportFails->failedImportsRegistered()) {
1042 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
1044 $button->setUrl($this->ctrl->getLinkTarget($this,
'renoveImportFails'));
1045 $button->setCaption(
'ass_skl_import_fails_remove_btn');
1047 ilUtil::sendFailure($qsaImportFails->getFailedImportsMessage($this->lng) .
'<br />' . $button->render());
1050 require_once
'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
1054 $table_gui->setPreventDoubleSubmission(
false);
1056 if ($rbacsystem->checkAccess(
'write', $_GET[
'ref_id'])) {
1059 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
1061 $btn->setCaption(
'ass_create_question');
1062 $btn->setUrl($this->ctrl->getLinkTarget($this,
'createQuestionForm'));
1063 $btn->setPrimary(
true);
1068 $btnImport->setCaption(
'import');
1069 $btnImport->setUrl($this->ctrl->getLinkTarget($this,
'importQuestions'));
1070 $toolbar->addButtonInstance($btnImport);
1072 if (array_key_exists(
"qpl_clipboard",
$_SESSION) && count(
$_SESSION[
'qpl_clipboard'])) {
1074 $btnPaste->setCaption(
'paste');
1075 $btnPaste->setUrl($this->ctrl->getLinkTarget($this,
'paste'));
1076 $toolbar->addButtonInstance($btnPaste);
1079 $this->tpl->setContent(
1080 $this->ctrl->getHTML(
$toolbar) . $this->ctrl->getHTML($table_gui)
1083 $this->tpl->setContent($this->ctrl->getHTML($table_gui));
1086 if ($this->object->getShowTaxonomies()) {
1087 $this->lng->loadLanguageModule(
'tax');
1089 require_once
'Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php';
1091 foreach ($taxIds as $taxId) {
1092 if ($taxId != $this->object->getNavTaxonomyId()) {
1100 'ilobjquestionpoolgui',
1104 if (!$taxExp->handleCommand()) {
1105 $this->tpl->setLeftContent($taxExp->getHTML() .
" ");
1118 $qId = (int)
$_GET[
'q_id'];
1120 if ($this->object->checkQuestionParent($qId)) {
1130 $ilHelp = $DIC[
'ilHelp'];
1132 $ilHelp->setScreenId(
'assQuestions');
1135 $ilHelp->setSubScreenId(
'createQuestion_editMode');
1137 $ilHelp->setSubScreenId(
'createQuestion');
1142 $this->tpl->setContent($this->ctrl->getHTML(
$form));
1152 require_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1154 $form->setTitle($this->lng->txt(
'ass_create_question'));
1155 $form->setFormAction($this->ctrl->getFormAction($this));
1160 foreach ($this->object->getQuestionTypes(
false,
true,
false) as $translation =>
$data) {
1164 require_once(
"Services/Form/classes/class.ilSelectInputGUI.php");
1174 $ri =
new ilRadioGroupInputGUI($this->lng->txt(
"tst_add_quest_cont_edit_mode"),
"add_quest_cont_edit_mode");
1177 $this->lng->txt(
'tst_add_quest_cont_edit_mode_default'),
1182 $this->lng->txt(
'tst_add_quest_cont_edit_mode_page_object'),
1188 $form->addItem($ri,
true);
1192 $form->addItem($hi,
true);
1197 $form->addCommandButton(
'createQuestion', $this->lng->txt(
'create'));
1198 $form->addCommandButton(
'questions', $this->lng->txt(
'cancel'));
1206 public function printObject()
1212 $ilToolbar = $DIC[
'ilToolbar'];
1214 $ilToolbar->setFormAction($this->ctrl->getFormAction($this,
'print'));
1215 require_once
'Services/Form/classes/class.ilSelectInputGUI.php';
1218 'overview' => $this->lng->txt(
'overview'),
1219 'detailed' => $this->lng->txt(
'detailed_output_solutions'),
1220 'detailed_printview' => $this->lng->txt(
'detailed_output_printview')
1224 $ilToolbar->setFormName(
'printviewOptions');
1225 $ilToolbar->addInputItem($mode,
true);
1226 $ilToolbar->addFormButton($this->lng->txt(
'submit'),
'print');
1228 include_once
"./Modules/TestQuestionPool/classes/tables/class.ilQuestionPoolPrintViewTableGUI.php";
1230 $data = $this->
object->getPrintviewQuestions();
1233 $totalPoints += $d[
'points'];
1235 $table_gui->setTotalPoints($totalPoints);
1236 $table_gui->initColumns();
1237 $table_gui->setData(
$data);
1238 $this->tpl->setContent($table_gui->getHTML());
1244 $this->
update = $this->
object->update();
1245 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1253 if (array_key_exists(
"qpl_clipboard",
$_SESSION)) {
1254 if ($this->object->pasteFromClipboard()) {
1255 ilUtil::sendSuccess($this->lng->txt(
"qpl_paste_success"),
true);
1262 $this->ctrl->redirect($this,
"questions");
1270 if (isset(
$_POST[
"q_id"]) && is_array(
$_POST[
"q_id"]) && count(
$_POST[
"q_id"]) > 0) {
1272 $this->
object->copyToClipboard($value);
1275 } elseif (isset(
$_GET[
'q_id']) &&
$_GET[
'q_id'] > 0) {
1276 $this->
object->copyToClipboard((
int)
$_GET[
'q_id']);
1281 $this->ctrl->redirect($this,
"questions");
1289 if (isset(
$_POST[
"q_id"]) && is_array(
$_POST[
"q_id"]) && count(
$_POST[
"q_id"]) > 0) {
1291 $this->
object->moveToClipboard($value);
1294 } elseif (isset(
$_GET[
'q_id']) &&
$_GET[
'q_id'] > 0) {
1295 $this->
object->moveToClipboard((
int)
$_GET[
'q_id']);
1300 $this->ctrl->redirect($this,
"questions");
1306 $rbacsystem = $DIC[
'rbacsystem'];
1307 if ($rbacsystem->checkAccess(
"write",
$_GET[
'ref_id'])) {
1308 include_once(
"./Modules/TestQuestionPool/classes/class.ilQuestionpoolExport.php");
1309 $question_ids = &$this->
object->getAllQuestionIds();
1311 $qpl_exp->buildExportFile();
1312 $this->ctrl->redirectByClass(
"ilquestionpoolexportgui",
"");
1321 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
1323 $this->ctrl->redirectByClass(get_class($q_gui),
"editQuestion");
1328 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1330 $form->setTarget(
"_top");
1331 $form->setFormAction($this->ctrl->getFormAction($this));
1332 $form->setTitle($this->lng->txt(
"import_qpl"));
1334 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
1335 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"xmldoc");
1337 $fi->setRequired(
true);
1338 $form->addItem($fi);
1340 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
1341 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
1352 if (
$form->checkInput()) {
1357 $this->tpl->setContent(
$form->getHTML());
1363 $ilLocator = $DIC[
'ilLocator'];
1364 switch ($this->ctrl->getCmd()) {
1370 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$_GET[
"ref_id"]);
1373 if (
$_GET[
"q_id"] > 0) {
1374 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
1377 $q_gui->object->setObjId($this->object->getId());
1378 $title = $q_gui->object->getTitle();
1382 $ilLocator->addItem(
$title, $this->ctrl->getLinkTargetByClass(get_class($q_gui),
"editQuestion"));
1385 $this->ctrl->setParameter($this,
'q_id',
'');
1386 $this->ctrl->redirect($this);
1396 parent::setTitleAndDescription();
1397 if (
$_GET[
"q_id"] > 0) {
1398 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
1401 $q_gui->object->setObjId($this->object->getId());
1402 $title = $q_gui->object->getTitle();
1406 $this->tpl->setTitle(
$title);
1407 $this->tpl->setDescription($q_gui->object->getComment());
1411 $this->ctrl->setParameter($this,
'q_id',
'');
1412 $this->ctrl->redirect($this);
1415 $this->tpl->setTitle($this->object->getTitle());
1416 $this->tpl->setDescription($this->object->getLongDescription());
1429 $ilAccess = $DIC[
'ilAccess'];
1430 $ilHelp = $DIC[
'ilHelp'];
1432 $currentUserHasWriteAccess = $ilAccess->checkAccess(
"write",
"", $this->object->getRefId());
1434 $ilHelp->setScreenIdComponent(
"qpl");
1436 $next_class = strtolower($this->ctrl->getNextClass());
1437 switch ($next_class) {
1439 case "ilpermissiongui":
1440 case "ilobjectmetadatagui":
1441 case "ilquestionpoolexportgui":
1442 case "ilquestionpoolskilladministrationgui":
1445 case 'ilobjtaxonomygui':
1446 case 'ilobjquestionpoolsettingsgeneralgui':
1448 if ($currentUserHasWriteAccess) {
1459 $force_active =
false;
1460 $commands =
$_POST[
"cmd"];
1461 if (is_array($commands)) {
1462 foreach ($commands as
$key => $value) {
1463 if (preg_match(
"/^delete_.*/",
$key, $matches) ||
1464 preg_match(
"/^addSelectGap_.*/",
$key, $matches) ||
1465 preg_match(
"/^addTextGap_.*/",
$key, $matches) ||
1466 preg_match(
"/^deleteImage_.*/",
$key, $matches) ||
1467 preg_match(
"/^upload_.*/",
$key, $matches) ||
1468 preg_match(
"/^addSuggestedSolution_.*/",
$key, $matches)
1470 $force_active =
true;
1474 if (array_key_exists(
"imagemap_x",
$_POST)) {
1475 $force_active =
true;
1477 if (!$force_active) {
1478 $force_active = ((strtolower($this->ctrl->getCmdClass()) == strtolower(get_class($this)) || strlen($this->ctrl->getCmdClass()) == 0) &&
1479 $this->ctrl->getCmd() ==
"")
1483 $this->tabs_gui->addTarget(
1485 $this->ctrl->getLinkTarget($this,
"questions"),
1486 array(
"questions",
"filter",
"resetFilter",
"createQuestion",
1487 "importQuestions",
"deleteQuestions",
"filterQuestionBrowser",
1488 "view",
"preview",
"editQuestion",
"exec_pg",
1489 "addItem",
"upload",
"save",
"cancel",
"addSuggestedSolution",
1490 "cancelExplorer",
"linkChilds",
"removeSuggestedSolution",
1491 "add",
"addYesNo",
"addTrueFalse",
"createGaps",
"saveEdit",
1492 "setMediaMode",
"uploadingImage",
"uploadingImagemap",
"addArea",
1493 "deletearea",
"saveShape",
"back",
"addPair",
"uploadingJavaapplet",
1494 "addParameter",
"assessment",
"addGIT",
"addST",
"addPG",
"delete",
1495 "toggleGraphicalAnswers",
"deleteAnswer",
"deleteImage",
"removeJavaapplet"),
1501 if ($ilAccess->checkAccess(
"read",
"", $this->ref_id) || $ilAccess->checkAccess(
"visible",
"", $this->ref_id)) {
1502 $this->tabs_gui->addTarget(
1504 $this->ctrl->getLinkTarget($this,
"infoScreen"),
1505 array(
"infoScreen",
"showSummary")
1509 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
'ref_id'])) {
1511 $this->tabs_gui->addTarget(
1513 $this->ctrl->getLinkTargetByClass(
'ilObjQuestionPoolSettingsGeneralGUI'),
1515 array(
'ilObjQuestionPoolSettingsGeneralGUI',
'ilObjTaxonomyGUI')
1520 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentsGUI.php';
1522 $link = $this->ctrl->getLinkTargetByClass(
1523 array(
'ilQuestionPoolSkillAdministrationGUI',
'ilAssQuestionSkillAssignmentsGUI'),
1527 $this->tabs_gui->addTarget(
'qpl_tab_competences', $link, array(), array());
1532 $this->tabs_gui->addTarget(
1534 $this->ctrl->getLinkTarget($this,
'print'),
1540 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1542 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
1544 $mdtab = $mdgui->getTab();
1546 $this->tabs_gui->addTarget(
1560 if ($currentUserHasWriteAccess) {
1561 $this->tabs_gui->addTarget(
1563 $this->ctrl->getLinkTargetByClass(
"ilquestionpoolexportgui",
""),
1565 "ilquestionpoolexportgui" 1569 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->object->getRefId())) {
1570 $this->tabs_gui->addTarget(
1572 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1573 array(
"perm",
"info",
"owner"),
1585 if (!$this->object->isSkillServiceEnabled()) {
1599 'qpl_settings_subtab_general',
1600 $this->ctrl->getLinkTargetByClass(
'ilObjQuestionPoolSettingsGeneralGUI'),
1602 'ilObjQuestionPoolSettingsGeneralGUI' 1606 'qpl_settings_subtab_taxonomies',
1607 $this->ctrl->getLinkTargetByClass(
'ilObjTaxonomyGUI',
'editAOTaxonomySettings'),
1620 $this->ctrl->setCmd(
"showSummary");
1621 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1632 $ilAccess = $DIC[
'ilAccess'];
1634 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id)) {
1635 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
1638 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1640 $info->enablePrivateNotes();
1643 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
1645 $this->ctrl->forwardCommand(
$info);
1659 $ilAccess = $DIC[
'ilAccess'];
1663 if ($ilAccess->checkAccess(
"write",
"", $a_target) || $ilAccess->checkAccess(
'read',
'', $a_target)) {
1664 $_GET[
'cmdClass'] =
'ilObjQuestionPoolGUI';
1665 $_GET[
'cmd'] =
'questions';
1666 $_GET[
'baseClass'] =
'ilRepositoryGUI';
1667 $_GET[
"ref_id"] = $a_target;
1668 include_once(
"ilias.php");
1670 } elseif ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
1672 $lng->txt(
"msg_no_perm_read_item"),
1691 $rbacsystem = $DIC[
'rbacsystem'];
1692 $ilDB = $DIC[
'ilDB'];
1694 $ilPluginAdmin = $DIC[
'ilPluginAdmin'];
1696 $writeAccess = (bool) $rbacsystem->checkAccess(
'write',
$_GET[
'ref_id']);
1697 $enableCommenting = $writeAccess;
1699 include_once
"./Modules/TestQuestionPool/classes/tables/class.ilQuestionBrowserTableGUI.php";
1701 $table_gui->setEditable($writeAccess);
1703 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
1705 $questionList->setParentObjId($this->object->getId());
1707 foreach ($table_gui->getFilterItems() as $item) {
1708 if (substr($item->getPostVar(), 0, strlen(
'tax_')) ==
'tax_') {
1709 $v = $item->getValue();
1711 if (is_array($v) && count($v) && !(
int) $v[0]) {
1715 $taxId = substr($item->getPostVar(), strlen(
'tax_'));
1717 $questionList->addTaxonomyFilter(
1720 $this->
object->getId(),
1721 $this->
object->getType()
1723 } elseif ($item->getValue() !==
false) {
1724 $questionList->addFieldFilter($item->getPostVar(), $item->getValue());
1728 if ($this->object->isNavTaxonomyActive() && (int)
$_GET[
'tax_node']) {
1729 require_once
'Services/Taxonomy/classes/class.ilTaxonomyTree.php';
1730 $taxTree =
new ilTaxonomyTree($this->object->getNavTaxonomyId());
1733 if ((
int)
$_GET[
'tax_node'] != $rootNodeId) {
1734 $questionList->addTaxonomyFilter(
1735 $this->object->getNavTaxonomyId(),
1736 array((
int)
$_GET[
'tax_node']),
1737 $this->
object->getId(),
1738 $this->
object->getType()
1743 $questionList->load();
1744 $data = $questionList->getQuestionDataArray();
1746 $table_gui->setQuestionData(
$data);
const MATCHING_QUESTION_IDENTIFIER
const MULTIPLE_CHOICE_QUESTION_IDENTIFIER
static _goto($a_target)
Redirect script to call a test with the question pool reference id.
executeCommand()
execute command
& createQuestionForTestObject()
create new question
This class represents an option in a radio group.
static getPluginObject(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
createQuestionFormObject()
addSubTabTarget( $a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)
DEPRECATED.
Export User Interface Class.
renoveImportFailsObject()
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
copyObject()
copy one or more question objects to the clipboard
confirmDeleteQuestionsObject()
delete questions
GUI class for the workflow of copying objects.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
const ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT
constant for additional content editing mode "pageobject"
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
filterObject()
set question list filter
Abstract basic class which is to be extended by the concrete assessment question type classes...
const KPRIM_CHOICE_QUESTION_IDENTIFIER
Taxonomy explorer GUI class.
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
const LONG_MENU_QUESTION_IDENTIFIER
Class ilUnitConfigurationRepository.
const TEXTSUBSET_QUESTION_IDENTIFIER
__construct()
Constructor public.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
static _lookupTitle($a_id)
lookup object title
getTabs()
adds tabs to tab gui object
download_paragraphObject()
download source code paragraph
filterQuestionBrowserObject()
exportObject()
Gateway for exports initiated from workspace, as there is a generic forward to {objTypeMainGUI}::expo...
const JAVAAPPLET_QUESTION_IDENTIFIER
resetQuestionBrowserObject()
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
prepareOutput($a_show_subobjects=true)
prepare output
& editQuestionForTestObject()
edit question
importQuestionsObject(ilPropertyFormGUI $form=null)
display the import form to import questions into the questionpool
Export class for questionpools.
deleteQuestionsObject()
delete questions confirmation screen
deleteRegisteredImportFails()
const NUMERIC_QUESTION_IDENTIFIER
if(isset($_POST['submit'])) $form
setTitleAndDescription()
called by prepare output
buildQuestionBrowserTableGUI($taxIds)
questionsObject()
list questions of question pool
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
const ORDERING_QUESTION_IDENTIFIER
uploadQplObject($questions_only=false)
imports question(s) into the questionpool
downloadFileObject()
download file
cancelDeleteQuestionsObject()
Cancel question deletion.
static _setImportDirectory($a_import_dir=null)
set import directory
addSettingsSubTabs(ilTabsGUI $tabs)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getSyntaxStylePath()
get syntax style path
importVerifiedFileObject()
imports question(s) into the questionpool (after verification)
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
const TEXT_QUESTION_IDENTIFIER
Class ilObjQuestionPoolGUI.
const EDIT_CONTEXT_AUTHORING
& createQuestionObject()
create new question
moveObject()
mark one or more question objects for moving
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
buildCreateQuestionForm()
const ADDITIONAL_CONTENT_EDITING_MODE_DEFAULT
constant for additional content editing mode "default"
update($pash, $contents, Config $config)
Class ilQuestionPoolImportVerificationTableGUI.
if(!empty($this->data['faventry'])) $tabs
fullscreenObject()
show fullscreen view
afterSave(ilObject $a_new_object)
save object public
fetchAuthoringQuestionIdParamater()
static isSkillManagementGloballyActivated()
pasteObject()
paste questios from the clipboard into the question pool
static isAdditionalQuestionContentEditingModePageObjectEnabled()
returns the fact wether content editing with ilias page editor is enabled for questions or not ...
resetFilterObject()
resets filter
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
getCreationMode()
get creation mode
getRefId()
get reference id public
exportQuestionObject()
export question
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
Class ilLocalUnitConfigurationGUI.
infoScreenForward()
show information screen
initImportForm($a_new_type)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getImportDirectory()
get import directory of lm
if(empty($password)) $table
importFileObject($parent_id=null, $a_catch_errors=true)
form for new questionpool object import
static redirect($a_script)
static _createImportDirectory()
creates data directory for import files (data_dir/qpl_data/qpl_<id>/import, depending on data directo...
const SINGLE_CHOICE_QUESTION_IDENTIFIER
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
const RENDER_PURPOSE_PREVIEW
const CMD_SHOW_SKILL_QUEST_ASSIGNS
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
const CLOZE_TEST_IDENTIFIER
Question identifier constants.
uploadObject()
imports question(s) into the questionpool
static _setImportDirectory($a_import_dir=null)
set import directory
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
const IMAGEMAP_QUESTION_IDENTIFIER
readRootId()
read root id from database