4 require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
5 require_once
'Modules/Test/classes/class.ilTestExpressPage.php';
102 $this->ctrl->saveParameter($this,
"q_id");
103 $this->ctrl->saveParameter($this,
"prev_qid");
104 $this->ctrl->saveParameter($this,
"calling_test");
105 $this->ctrl->saveParameter($this,
"calling_consumer");
106 $this->ctrl->saveParameter($this,
"consumer_context");
107 $this->ctrl->saveParameterByClass(
'ilAssQuestionPageGUI',
'test_express_mode');
108 $this->ctrl->saveParameterByClass(
'ilAssQuestionPageGUI',
'calling_consumer');
109 $this->ctrl->saveParameterByClass(
'ilAssQuestionPageGUI',
'consumer_context');
110 $this->ctrl->saveParameterByClass(
'ilobjquestionpoolgui',
'test_express_mode');
111 $this->ctrl->saveParameterByClass(
'ilobjquestionpoolgui',
'calling_consumer');
112 $this->ctrl->saveParameterByClass(
'ilobjquestionpoolgui',
'consumer_context');
114 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
115 $this->errormessage = $this->lng->txt(
"fill_out_all_required_fields");
117 $this->selfassessmenteditingmode =
false;
118 $this->new_id_listeners = array();
119 $this->new_id_listener_cnt = 0;
121 $this->navigationGUI = null;
129 $cmd = $this->ctrl->getCmd(
"editQuestion");
130 $next_class = $this->ctrl->getNextClass($this);
218 return $this->
getOutputMode() == self::OUTPUT_MODE_CONTENT_EDITING;
274 if( is_object($this->
object) )
305 require_once
'Modules/TestQuestionPool/classes/tables/class.ilQuestionCumulatedStatisticsTableGUI.php';
308 require_once
'Modules/TestQuestionPool/classes/tables/class.ilQuestionUsagesTableGUI.php';
311 $tpl->setContent(implode(
'<br />', array(
312 $stats_table->getHTML(),
313 $usage_table->getHTML()
330 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
332 if ((!$question_type) and ($question_id > 0))
337 if (strlen($question_type) == 0)
return NULL;
342 $question =&
new $question_type_gui();
345 $question->object->feedbackOBJ =
new $feedbackObjectClassname($question->object, $ilCtrl, $ilDB, $lng);
347 if ($question_id > 0)
349 $question->object->loadFromDb($question_id);
360 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
361 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
372 return $q_type .
"GUI";
389 include_once
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
398 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.il_as_qpl_content.html",
"Modules/TestQuestionPool");
399 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
400 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.il_as_question.html",
"Modules/TestQuestionPool");
411 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
414 $page_gui->setOutputMode(
"presentation");
415 $presentation = $page_gui->presentation();
416 $presentation = preg_replace(
"/src=\"\\.\\//ims",
"src=\"" . ILIAS_HTTP_PATH .
"/", $presentation);
417 return $presentation;
432 $this->lng->loadLanguageModule(
"content");
442 $postponed =
" (" . $this->lng->txt(
"postponed") .
")";
445 include_once(
"./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
448 $page_gui->setTemplateTargetVar($a_temp_var);
452 $page_gui->setQuestionHTML(array($this->object->getId() =>
$html));
455 $page_gui->setPresentationTitle($this->questionHeaderBlockBuilder->getHTML());
457 return $page_gui->presentation();
463 return $this->lng->txt(
'use_previous_solution_advice');
472 if (
$_GET[
"calling_test"])
477 elseif (
$_GET[
"test_ref_id"])
484 if (
$_GET[
"q_id"] > 0)
486 $this->ctrl->setParameterByClass(
"ilAssQuestionPageGUI",
"q_id",
$_GET[
"q_id"]);
487 $this->ctrl->redirectByClass(
"ilAssQuestionPageGUI",
"edit");
491 $this->ctrl->redirectByClass(
"ilobjquestionpoolgui",
"questions");
502 if (strlen($return_to))
504 $this->ctrl->setParameter($this,
"return_to", $return_to);
507 $this->ctrl->setParameter($this,
"return_to",
$_REQUEST[
'return_to']);
509 if(strlen($return_to_feedback))
511 $this->ctrl->setParameter($this,
'return_to_fb',
'true');
514 $this->ctrl->saveParameter($this,
'test_express_mode');
516 $template =
new ilTemplate(
"tpl.il_as_qpl_sync_original.html",TRUE, TRUE,
"Modules/TestQuestionPool");
517 $template->setVariable(
"BUTTON_YES", $this->lng->txt(
"yes"));
518 $template->setVariable(
"BUTTON_NO", $this->lng->txt(
"no"));
519 $template->setVariable(
"FORM_ACTION", $this->ctrl->getFormAction($this));
520 $template->setVariable(
"TEXT_SYNC", $this->lng->txt(
"confirm_sync_questions"));
521 $this->tpl->setVariable(
"ADM_CONTENT", $template->get());
526 $original_id = $this->
object->original_id;
529 $this->
object->syncWithOriginal();
531 if (strlen(
$_GET[
"return_to"]))
533 $this->ctrl->redirect($this,
$_GET[
"return_to"]);
537 $this->ctrl->redirectByClass(
'ilAssQuestionFeedbackEditingGUI',
'showFeedbackForm');
541 if(isset(
$_GET[
'calling_consumer']) && (
int)
$_GET[
'calling_consumer'])
543 $ref_id = (int)$_GET[
'calling_consumer'];
547 ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET[
'consumer_context']));
549 require_once
'Services/Link/classes/class.ilLink.php';
552 $_GET[
"ref_id"] = $_GET[
"calling_test"];
560 ilUtil::redirect(
"ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=".$_GET[
"calling_test"]);
567 if (strlen(
$_GET[
"return_to"]))
569 $this->ctrl->redirect($this,
$_GET[
"return_to"]);
573 $this->ctrl->redirectByClass(
'ilAssQuestionFeedbackEditingGUI',
'showFeedbackForm');
577 if(isset(
$_GET[
'calling_consumer']) && (
int)
$_GET[
'calling_consumer'])
579 $ref_id = (int)$_GET[
'calling_consumer'];
583 ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET[
'consumer_context']));
585 require_once
'Services/Link/classes/class.ilLink.php';
588 $_GET[
"ref_id"] = $_GET[
"calling_test"];
596 ilUtil::redirect(
"ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=".$_GET[
"calling_test"]);
611 $ilUser->setPref(
"tst_lastquestiontype", $this->object->getQuestionType());
612 $ilUser->writePref(
"tst_lastquestiontype", $this->object->getQuestionType());
613 $this->
object->saveToDb();
614 $originalexists = $this->
object->_questionExists($this->object->original_id);
615 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
618 $this->ctrl->redirect($this,
"originalSyncForm");
620 elseif (
$_GET[
"calling_test"])
626 elseif (
$_GET[
"test_ref_id"])
628 global $tree,
$ilDB, $ilPluginAdmin;
630 include_once (
"./Modules/Test/classes/class.ilObjTest.php");
634 require_once
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
637 $test->insertQuestion( $testQuestionSetConfigFactory->getQuestionSetConfig(), $this->
object->getId() );
643 $this->ctrl->setParameter($this,
"q_id", $this->object->getId());
644 $this->editQuestion();
653 $this->ctrl->setParameterByClass(
"ilAssQuestionPageGUI",
"q_id", $this->object->getId());
654 $this->ctrl->redirectByClass(
"ilAssQuestionPageGUI",
"edit");
665 $old_id =
$_GET[
"q_id"];
670 $ilUser->setPref(
"tst_lastquestiontype", $this->object->getQuestionType());
671 $ilUser->writePref(
"tst_lastquestiontype", $this->object->getQuestionType());
672 $this->
object->saveToDb();
673 $originalexists = $this->
object->_questionExistsInPool($this->object->original_id);
676 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
680 $this->ctrl->setParameter($this,
'return_to',
'editQuestion');
681 $this->ctrl->redirect($this,
"originalSyncForm");
684 elseif($_GET[
"calling_test"])
686 require_once
'Modules/Test/classes/class.ilObjTest.php';
690 global $tree,
$ilDB, $ilPluginAdmin;
692 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
693 $_GET[
"ref_id"] = $_GET[
"calling_test"];
696 require_once
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
699 $new_id =
$test->insertQuestion(
700 $testQuestionSetConfigFactory->getQuestionSetConfig(), $this->
object->getId()
705 $test->moveQuestionAfter($this->object->getId() + 1,
$_REQUEST[
'prev_qid']);
708 $this->ctrl->setParameter($this,
'q_id', $new_id);
709 $this->ctrl->setParameter($this,
'calling_test', $_GET[
'calling_test']);
710 #$this->ctrl->setParameter($this, 'test_ref_id', false); 713 $this->ctrl->redirect($this,
'editQuestion');
720 if($this->object->getId() != $old_id)
723 $this->ctrl->setParameterByClass($_GET[
"cmdClass"],
"q_id", $this->object->getId());
724 $this->ctrl->setParameterByClass($_GET[
"cmdClass"],
"sel_question_types", $_GET[
"sel_question_types"]);
735 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
737 $test->moveQuestionAfter(
$_REQUEST[
'prev_qid'], $this->object->getId());
741 global $tree,
$ilDB, $ilPluginAdmin;
743 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
746 require_once
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
749 $test->insertQuestion(
750 $testQuestionSetConfigFactory->getQuestionSetConfig(), $this->
object->getId()
753 require_once
'Modules/Test/classes/class.ilTestExpressPage.php';
754 $_REQUEST[
'q_id'] = $this->
object->getId();
758 $this->ctrl->redirectByClass($_GET[
"cmdClass"],
"editQuestion");
768 $this->ctrl->redirect($this,
'editQuestion');
779 $old_id =
$_GET[
"q_id"];
783 $ilUser->setPref(
"tst_lastquestiontype", $this->object->getQuestionType());
784 $ilUser->writePref(
"tst_lastquestiontype", $this->object->getQuestionType());
785 $this->
object->saveToDb();
786 $originalexists = $this->
object->_questionExistsInPool($this->object->original_id);
787 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
791 $this->ctrl->setParameter($this,
'test_express_mode',
$_REQUEST[
'test_express_mode']);
792 $this->ctrl->redirect($this,
"originalSyncForm");
795 elseif($_GET[
"calling_test"])
797 require_once
'Modules/Test/classes/class.ilObjTest.php';
799 #var_dump(assQuestion::_questionExistsInTest($this->object->getId(), $test->getTestId())); 800 $q_id = $this->
object->getId();
803 global $tree,
$ilDB, $ilPluginAdmin;
805 include_once(
"./Modules/Test/classes/class.ilObjTest.php");
806 $_GET[
"ref_id"] = $_GET[
"calling_test"];
809 require_once
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
812 $new_id =
$test->insertQuestion(
813 $testQuestionSetConfigFactory->getQuestionSetConfig(), $this->
object->getId()
819 $test->moveQuestionAfter($this->object->getId() + 1,
$_REQUEST[
'prev_qid']);
822 $this->ctrl->setParameter($this,
'q_id', $new_id);
823 $this->ctrl->setParameter($this,
'calling_test', $_GET[
'calling_test']);
824 #$this->ctrl->setParameter($this, 'test_ref_id', false); 836 ilUtil::redirect(
"ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET[
"calling_test"]);
841 if($this->object->getId() != $old_id)
845 $this->ctrl->redirectByClass(
"ilobjquestionpoolgui",
"questions");
855 $this->ctrl->redirectByClass(
"ilobjquestionpoolgui",
"questions");
866 $this->
object->saveToDb();
867 $this->ctrl->setParameter($this,
"q_id", $this->object->getId());
868 $this->editQuestion();
881 $tmpPath = $cont_obj->getLMTree()->getPathFull($a_endnode_id, $a_startnode_id);
884 for ($i = 1; $i < (count($tmpPath) - 1); $i++)
891 $path .= $tmpPath[$i][
"title"];
899 $this->sequence_no = $nr;
909 $this->question_count = $a_question_count;
929 $this->errormessage .= ((strlen($this->errormessage)) ?
"<br />" :
"") .
$errormessage;
946 return $this->
object->getQuestionType();
959 if (strlen($a_value))
961 $result =
" value=\"$a_value\" ";
973 $cnt = $this->new_id_listener_cnt;
974 $this->new_id_listeners[$cnt][
"object"] =& $a_object;
975 $this->new_id_listeners[$cnt][
"method"] = $a_method;
976 $this->new_id_listeners[$cnt][
"parameters"] = $a_parameters;
977 $this->new_id_listener_cnt++;
986 for ($i=0; $i<$this->new_id_listener_cnt; $i++)
988 $this->new_id_listeners[$i][
"parameters"][
"new_id"] = $a_new_id;
989 $object =& $this->new_id_listeners[$i][
"object"];
990 $method = $this->new_id_listeners[$i][
"method"];
991 $parameters = $this->new_id_listeners[$i][
"parameters"];
996 $object->$method($parameters);
1006 if(!$this->object->getSelfAssessmentEditingMode())
1008 $form->addCommandButton(
"saveReturn", $this->lng->txt(
"save_return"));
1010 $form->addCommandButton(
"save", $this->lng->txt(
"save"));
1024 $title->setValue($this->object->getTitle());
1025 $title->setRequired(TRUE);
1026 $form->addItem($title);
1028 if (!$this->object->getSelfAssessmentEditingMode())
1031 $author =
new ilTextInputGUI($this->lng->txt(
"author"),
"author");
1032 $author->
setValue($this->object->getAuthor());
1033 $author->setRequired(TRUE);
1034 $form->addItem($author);
1037 $description =
new ilTextInputGUI($this->lng->txt(
"description"),
"comment");
1038 $description->
setValue($this->object->getComment());
1039 $description->setRequired(FALSE);
1040 $form->addItem($description);
1047 if (trim($author) ==
"")
1051 $hi->setValue($author);
1052 $form->addItem($hi);
1058 $question->
setValue($this->object->getQuestion());
1059 $question->setRequired(TRUE);
1060 $question->setRows(10);
1061 $question->setCols(80);
1063 if (!$this->object->getSelfAssessmentEditingMode())
1067 $question->setUseRte(TRUE);
1068 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
1070 $question->addPlugin(
"latex");
1071 $question->addButton(
"latex");
1072 $question->addButton(
"pastelatex");
1073 $question->setRTESupport($this->object->getId(),
"qpl",
"assessment");
1078 require_once
'Modules/TestQuestionPool/classes/questions/class.ilAssSelfAssessmentQuestionFormatter.php';
1080 $question->setUseTagsForRteOnly(
false);
1082 $form->addItem($question);
1084 if (!$this->object->getSelfAssessmentEditingMode())
1089 $duration->setShowMinutes(TRUE);
1090 $duration->setShowSeconds(TRUE);
1091 $ewt = $this->
object->getEstimatedWorkingTime();
1092 $duration->setHours($ewt[
"h"]);
1093 $duration->setMinutes($ewt[
"m"]);
1094 $duration->setSeconds($ewt[
"s"]);
1095 $duration->setRequired(FALSE);
1096 $form->addItem($duration);
1101 if (strlen($this->object->getNrOfTries()))
1103 $nr_tries = $this->
object->getNrOfTries();
1107 $nr_tries = $this->
object->getDefaultNrOfTries();
1114 $ni =
new ilNumberInputGUI($this->lng->txt(
"qst_nr_of_tries"),
"nr_of_tries");
1116 $ni->setMinValue(0);
1118 $ni->setMaxLength(5);
1119 $form->addItem($ni);
1127 require_once
'Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php';
1131 $postvar =
"tax_node_assign_$taxonomyId";
1135 $tax_node_assign->saveInput(
"qpl", $this->object->getObjId(),
"quest", $this->
object->getId());
1145 $sectHeader->setTitle($this->lng->txt(
'qpl_qst_edit_form_taxonomy_section'));
1148 require_once
'Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php';
1153 $label = sprintf($this->lng->txt(
'qpl_qst_edit_form_taxonomy'), $taxonomy->getTitle());
1154 $postvar =
"tax_node_assign_$taxonomyId";
1158 $taxNodeAssign->
setCurrentValues(
'qpl', $this->object->getObjId(),
'quest', $this->
object->getId());
1159 $form->
addItem($taxNodeAssign);
1172 $userSolution = $this->
object->getUserSolutionPreferingIntermediate($active_id,
$pass);
1174 if( count($userSolution) )
1176 $solutionRow = current($userSolution);
1177 return (
bool)$solutionRow[
'authorized'];
1209 include_once
"./Modules/Test/classes/class.ilObjTest.php";
1211 if (strlen($manual_feedback))
1213 return $manual_feedback;
1215 $correct_feedback = $this->
object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(),
true);
1216 $incorrect_feedback = $this->
object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(),
false);
1217 if (strlen($correct_feedback.$incorrect_feedback))
1220 $reached_points = $this->
object->calculateReachedPoints($active_id,
$pass, (
bool)$useAuthorizedSolution);
1221 $max_points = $this->
object->getMaximumPoints();
1222 if ($reached_points == $max_points)
1224 $output = $correct_feedback;
1228 $output = $incorrect_feedback;
1231 return $this->
object->prepareTextareaOutput($output, TRUE);
1236 return $this->
object->prepareTextareaOutput(
1237 $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(),
true),
true 1243 return $this->
object->prepareTextareaOutput(
1244 $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(),
false),
true 1263 $count = $this->
object->isInUse();
1268 if ($rbacsystem->checkAccess(
"write",
$_GET[
"ref_id"]))
1270 ilUtil::sendInfo(sprintf($this->lng->txt(
"qpl_question_is_in_use"), $count));
1292 $save = (is_array(
$_POST[
"cmd"]) && array_key_exists(
"suggestedsolution",
$_POST[
"cmd"])) ? TRUE : FALSE;
1294 if ($save &&
$_POST[
"deleteSuggestedSolution"] == 1)
1296 $this->
object->deleteSuggestedSolutions();
1298 $this->ctrl->redirect($this,
"suggestedsolution");
1302 $solution_array = $this->
object->getSuggestedSolution(0);
1304 "lm" => $this->lng->txt(
"obj_lm"),
1305 "st" => $this->lng->txt(
"obj_st"),
1306 "pg" => $this->lng->txt(
"obj_pg"),
1307 "git" => $this->lng->txt(
"glossary_term"),
1308 "file" => $this->lng->txt(
"fileDownload"),
1309 "text" => $this->lng->txt(
"solutionText")
1312 if ((strcmp(
$_POST[
"solutiontype"],
"file") == 0) && (strcmp($solution_array[
"type"],
"file") != 0))
1314 $solution_array = array(
1318 elseif ((strcmp(
$_POST[
"solutiontype"],
"text") == 0) && (strcmp($solution_array[
"type"],
"text") != 0))
1323 $solution_array = array(
1329 if ($save && strlen(
$_POST[
"filename"]))
1331 $solution_array[
"value"][
"filename"] =
$_POST[
"filename"];
1333 if ($save && strlen(
$_POST[
"solutiontext"]))
1335 $solution_array[
"value"] =
$_POST[
"solutiontext"];
1337 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1338 if (count($solution_array))
1341 $form->setFormAction($this->ctrl->getFormAction($this));
1342 $form->setTitle($this->lng->txt(
"solution_hint"));
1343 $form->setMultipart(TRUE);
1344 $form->setTableWidth(
"100%");
1345 $form->setId(
"suggestedsolutiondisplay");
1348 include_once
"./Modules/TestQuestionPool/classes/class.ilSolutionTitleInputGUI.php";
1350 $template =
new ilTemplate(
"tpl.il_as_qpl_suggested_solution_input_presentation.html", TRUE, TRUE,
"Modules/TestQuestionPool");
1351 if (strlen($solution_array[
"internal_link"]))
1354 $template->setCurrentBlock(
"preview");
1355 $template->setVariable(
"TEXT_SOLUTION", $this->lng->txt(
"suggested_solution"));
1356 $template->setVariable(
"VALUE_SOLUTION",
" <a href=\"$href\" target=\"content\">" . $this->lng->txt(
"view").
"</a> ");
1357 $template->parseCurrentBlock();
1359 elseif ((strcmp($solution_array[
"type"],
"file") == 0) && (is_array($solution_array[
"value"])))
1361 $href = $this->
object->getSuggestedSolutionPathWeb() . $solution_array[
"value"][
"name"];
1362 $template->setCurrentBlock(
"preview");
1363 $template->setVariable(
"TEXT_SOLUTION", $this->lng->txt(
"suggested_solution"));
1364 $template->setVariable(
"VALUE_SOLUTION",
" <a href=\"$href\" target=\"content\">" .
ilUtil::prepareFormOutput((strlen($solution_array[
"value"][
"filename"])) ? $solution_array[
"value"][
"filename"] : $solution_array[
"value"][
"name"]).
"</a> ");
1365 $template->parseCurrentBlock();
1367 $template->setVariable(
"TEXT_TYPE", $this->lng->txt(
"type"));
1368 $template->setVariable(
"VALUE_TYPE",
$options[$solution_array[
"type"]]);
1369 $title->
setHtml($template->get());
1371 $deletesolution->setOptionTitle($this->lng->txt(
"deleteSuggestedSolution"));
1372 $title->addSubItem($deletesolution);
1373 $form->addItem($title);
1375 if (strcmp($solution_array[
"type"],
"file") == 0)
1379 $file->setRequired(TRUE);
1380 $file->enableFileNameSelection(
"filename");
1382 if( $_FILES[
"file"][
"tmp_name"] &&
$file->checkInput() )
1384 if (!file_exists($this->object->getSuggestedSolutionPath()))
ilUtil::makeDirParents($this->object->getSuggestedSolutionPath());
1386 $res =
ilUtil::moveUploadedFile($_FILES[
"file"][
"tmp_name"], $_FILES[
"file"][
"name"], $this->object->getSuggestedSolutionPath() . $_FILES[
"file"][
"name"]);
1392 if (is_array($solution_array[
"value"])) @unlink($this->object->getSuggestedSolutionPath() . $solution_array[
"value"][
"name"]);
1393 $file->setValue($_FILES[
"file"][
"name"]);
1394 $this->
object->saveSuggestedSolution(
"file",
"", 0, array(
"name" => $_FILES[
"file"][
"name"],
"type" => $_FILES[
"file"][
"type"],
"size" => $_FILES[
"file"][
"size"],
"filename" =>
$_POST[
"filename"]));
1395 $originalexists = $this->
object->_questionExistsInPool($this->object->original_id);
1403 $this->ctrl->redirect($this,
"suggestedsolution");
1414 if (is_array($solution_array[
"value"]))
1416 $file->setValue($solution_array[
"value"][
"name"]);
1417 $file->setFilename((strlen($solution_array[
"value"][
"filename"])) ? $solution_array[
"value"][
"filename"] : $solution_array[
"value"][
"name"]);
1420 $form->addItem(
$file);
1422 $hidden->setValue(
"file");
1423 $form->addItem($hidden);
1425 else if (strcmp($solution_array[
"type"],
"text") == 0)
1427 $solutionContent = $solution_array[
'value'];
1428 $solutionContent = $this->
object->fixSvgToPng($solutionContent);
1429 $solutionContent = $this->
object->fixUnavailableSkinImageSources($solutionContent);
1431 $question->
setValue($this->object->prepareTextareaOutput($solutionContent));
1432 $question->setRequired(TRUE);
1433 $question->setRows(10);
1434 $question->setCols(80);
1435 $question->setUseRte(TRUE);
1436 $question->addPlugin(
"latex");
1437 $question->addButton(
"latex");
1438 $question->setRTESupport($this->object->getId(),
"qpl",
"assessment");
1440 $hidden->setValue(
"text");
1441 $form->addItem($hidden);
1442 $form->addItem($question);
1444 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
'ref_id']))
1446 $form->addCommandButton(
'showSuggestedSolution', $this->lng->txt(
'cancel'));
1447 $form->addCommandButton(
'suggestedsolution', $this->lng->txt(
'save'));
1452 if ($form->checkInput())
1454 switch ($solution_array[
"type"])
1457 $this->
object->saveSuggestedSolution(
"file",
"", 0, array(
1458 "name" => $solution_array[
"value"][
"name"],
1459 "type" => $solution_array[
"value"][
"type"],
1460 "size" => $solution_array[
"value"][
"size"],
1461 "filename" =>
$_POST[
"filename"]
1465 $this->
object->saveSuggestedSolution(
"text",
"", 0, $solution_array[
"value"]);
1468 $originalexists = $this->
object->_questionExistsInPool($this->object->original_id);
1476 $this->ctrl->redirect($this,
"suggestedsolution");
1481 $output = $form->getHTML();
1484 $savechange = (strcmp($this->ctrl->getCmd(),
"saveSuggestedSolution") == 0) ? TRUE : FALSE;
1487 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
'ref_id']))
1490 $formchange->setFormAction($this->ctrl->getFormAction($this));
1491 $formchange->setTitle((count($solution_array)) ? $this->lng->txt(
"changeSuggestedSolution") : $this->lng->txt(
"addSuggestedSolution"));
1492 $formchange->setMultipart(FALSE);
1493 $formchange->setTableWidth(
"100%");
1494 $formchange->setId(
"suggestedsolution");
1496 $solutiontype =
new ilRadioGroupInputGUI($this->lng->txt(
"suggestedSolutionType"),
"solutiontype");
1497 foreach(
$options as $opt_value => $opt_caption)
1501 if (count($solution_array))
1503 $solutiontype->setValue($solution_array[
"type"]);
1505 $solutiontype->setRequired(TRUE);
1506 $formchange->addItem($solutiontype);
1508 $formchange->addCommandButton(
"saveSuggestedSolution", $this->lng->txt(
"select"));
1512 $formchange->checkInput();
1514 $changeoutput = $formchange->getHTML();
1517 $this->tpl->setVariable(
"ADM_CONTENT", $changeoutput . $output);
1524 include_once(
"./Modules/TestQuestionPool/classes/class.ilSolutionExplorer.php");
1525 $type =
$_GET[
"link_new_type"];
1526 $search =
$_GET[
"search_link_type"];
1527 $this->ctrl->setParameter($this,
"link_new_type", $type);
1528 $this->ctrl->setParameter($this,
"search_link_type", $search);
1529 $this->ctrl->saveParameter($this, array(
"subquestion_index",
"link_new_type",
"search_link_type"));
1533 $parent_ref_id = $tree->getParentId(
$_GET[
"ref_id"]);
1534 $exp =
new ilSolutionExplorer($this->ctrl->getLinkTarget($this,
'suggestedsolution'), get_class($this));
1536 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'outSolutionExplorer'));
1537 $exp->setTargetGet(
"ref_id");
1538 $exp->setRefId(
$_GET[
"ref_id"]);
1539 $exp->addFilter($type);
1540 $exp->setSelectableType($type);
1541 if(isset(
$_GET[
'expandCurrentPath']) &&
$_GET[
'expandCurrentPath'])
1543 $exp->expandPathByRefId($parent_ref_id);
1549 $template =
new ilTemplate(
"tpl.il_as_qpl_explorer.html", TRUE, TRUE,
"Modules/TestQuestionPool");
1550 $template->setVariable(
"EXPLORER_TREE",$exp->getOutput());
1551 $template->setVariable(
"BUTTON_CANCEL",$this->lng->txt(
"cancel"));
1552 $template->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this,
"suggestedsolution"));
1553 $this->tpl->setVariable(
"ADM_CONTENT", $template->get());
1560 include_once(
"./Modules/TestQuestionPool/classes/class.ilSolutionExplorer.php");
1561 switch (
$_POST[
"solutiontype"])
1587 if(isset(
$_POST[
'solutiontype']))
1589 $this->ctrl->setParameter($this,
'expandCurrentPath', 1);
1591 $this->ctrl->setParameter($this,
"link_new_type", $type);
1592 $this->ctrl->setParameter($this,
"search_link_type", $search);
1593 $this->ctrl->redirect($this,
"outSolutionExplorer");
1598 $this->ctrl->redirect($this,
"suggestedsolution");
1603 require_once
'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1604 require_once
'Modules/LearningModule/classes/class.ilLMPageObject.php';
1605 require_once
'Modules/LearningModule/classes/class.ilObjContentObjectGUI.php';
1607 $this->ctrl->setParameter($this,
'q_id', $this->object->getId());
1610 $cont_obj = $cont_obj_gui->object;
1612 $shownpages = array();
1613 $tree = $cont_obj->getLMTree();
1614 $chapters = $tree->getSubtree($tree->getNodeData($tree->getRootId()));
1618 foreach($chapters as $chapter)
1620 $chapterpages = $tree->getChildsByType($chapter[
'obj_id'],
'pg');
1621 foreach($chapterpages as $page)
1623 if($page[
'type'] ==
$_GET[
'search_link_type'])
1625 array_push($shownpages, $page[
'obj_id']);
1627 if($tree->isInTree($page[
'obj_id']))
1636 $this->ctrl->setParameter($this, $page[
'type'], $page[
'obj_id']);
1638 'title' => $page[
'title'],
1640 'text_add' => $this->lng->txt(
'add'),
1641 'href_add' => $this->ctrl->getLinkTarget($this,
'add' . strtoupper($page[
'type']))
1646 foreach($pages as $page)
1648 if(!in_array($page[
'obj_id'], $shownpages))
1650 $this->ctrl->setParameter($this, $page[
'type'], $page[
'obj_id']);
1652 'title' => $page[
'title'],
1653 'description' =>
'---',
1654 'text_add' => $this->lng->txt(
'add'),
1655 'href_add' => $this->ctrl->getLinkTarget($this,
'add' . strtoupper($page[
'type']))
1660 require_once
'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1663 $table->setData($rows);
1665 $this->tpl->setContent($table->getHTML());
1670 require_once
'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1671 require_once
'Modules/LearningModule/classes/class.ilObjContentObjectGUI.php';
1673 $this->ctrl->setParameter($this,
'q_id', $this->object->getId());
1676 $cont_obj = $cont_obj_gui->object;
1677 $ctree = $cont_obj->getLMTree();
1678 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
1682 foreach($nodes as $node)
1684 if($node[
'type'] ==
$_GET[
'search_link_type'])
1686 $this->ctrl->setParameter($this, $node[
'type'], $node[
'obj_id']);
1688 'title' => $node[
'title'],
1689 'description' =>
'',
1690 'text_add' => $this->lng->txt(
'add'),
1691 'href_add' => $this->ctrl->getLinkTarget($this,
'add' . strtoupper($node[
'type']))
1698 $table->setData($rows);
1700 $this->tpl->setContent($table->getHTML());
1705 require_once
'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1706 require_once
'Modules/Glossary/classes/class.ilObjGlossary.php';
1708 $this->ctrl->setParameter($this,
'q_id', $this->object->getId());
1711 $terms = $glossary->getTermList();
1715 foreach($terms as $term)
1717 $this->ctrl->setParameter($this,
'git', $term[
'id']);
1719 'title' => $term[
'term'],
1720 'description' =>
'',
1721 'text_add' => $this->lng->txt(
'add'),
1722 'href_add' => $this->ctrl->getLinkTarget($this,
'addGIT')
1727 $table->setTitle($this->lng->txt(
'glossary_term'));
1728 $table->setData($rows);
1730 $this->tpl->setContent($table->getHTML());
1735 $this->ctrl->saveParameter($this, array(
"subquestion_index",
"link_new_type",
"search_link_type"));
1736 switch (
$_GET[
"search_link_type"])
1748 $subquestion_index = (
$_GET[
"subquestion_index"] > 0) ?
$_GET[
"subquestion_index"] : 0;
1749 $this->
object->saveSuggestedSolution(
"lm",
"il__lm_" .
$_GET[
"source_id"], $subquestion_index);
1751 $this->ctrl->redirect($this,
"suggestedsolution");
1758 $subquestion_index = 0;
1759 if (strlen(
$_GET[
"subquestion_index"]) &&
$_GET[
"subquestion_index"] >= 0)
1761 $subquestion_index =
$_GET[
"subquestion_index"];
1763 $this->
object->saveSuggestedSolution(
"pg",
"il__pg_" .
$_GET[
"pg"], $subquestion_index);
1765 $this->ctrl->redirect($this,
"suggestedsolution");
1770 $subquestion_index = 0;
1771 if (strlen(
$_GET[
"subquestion_index"]) &&
$_GET[
"subquestion_index"] >= 0)
1773 $subquestion_index =
$_GET[
"subquestion_index"];
1775 $this->
object->saveSuggestedSolution(
"st",
"il__st_" .
$_GET[
"st"], $subquestion_index);
1777 $this->ctrl->redirect($this,
"suggestedsolution");
1782 $subquestion_index = 0;
1783 if (strlen(
$_GET[
"subquestion_index"]) &&
$_GET[
"subquestion_index"] >= 0)
1785 $subquestion_index =
$_GET[
"subquestion_index"];
1787 $this->
object->saveSuggestedSolution(
"git",
"il__git_" .
$_GET[
"git"], $subquestion_index);
1789 $this->ctrl->redirect($this,
"suggestedsolution");
1794 return in_array($this->ctrl->getCmd(), array(
'save',
'saveEdit',
'saveReturn'));
1807 $reflectionClass =
new ReflectionClass($guiClassName);
1811 if( $reflectionClass instanceof ReflectionClass )
1813 $commands = array();
1815 foreach($reflectionClass->getConstants() as $constName => $constValue)
1817 if( substr($constName, 0, strlen($cmdConstantNameBegin)) == $cmdConstantNameBegin )
1819 $commands[] = $constValue;
1829 global $rbacsystem, $ilTabs;
1831 $ilTabs->clearTargets();
1833 $this->ctrl->setParameterByClass(
"ilAssQuestionPageGUI",
"q_id",
$_GET[
"q_id"]);
1834 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
1835 $q_type = $this->
object->getQuestionType();
1837 if (strlen($q_type))
1839 $classname = $q_type .
"GUI";
1840 $this->ctrl->setParameterByClass(strtolower($classname),
"sel_question_types", $q_type);
1841 $this->ctrl->setParameterByClass(strtolower($classname),
"q_id",
$_GET[
"q_id"]);
1846 if ($rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"]))
1849 $ilTabs->addTarget(
"edit_page",
1850 $this->ctrl->getLinkTargetByClass(
"ilAssQuestionPageGUI",
"edit"),
1851 array(
"edit",
"insert",
"exec_pg"),
1852 "",
"", $force_active);
1857 $force_active =
false;
1858 if ($rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"]))
1861 if ($classname)
$url = $this->ctrl->getLinkTargetByClass($classname,
"editQuestion");
1862 $force_active =
false;
1864 $ilTabs->addTarget(
"edit_question",
1867 $classname,
"", $force_active);
1882 $ilTabs->addTarget(
"statistics",
1883 $this->ctrl->getLinkTargetByClass($classname,
"assessment"),
1884 array(
"assessment"),
1896 $this->ctrl->getLinkTargetByClass($classname,
"suggestedsolution"),
1897 array(
"suggestedsolution",
"saveSuggestedSolution",
"outSolutionExplorer",
"cancel",
1898 "addSuggestedSolution",
"cancelExplorer",
"linkChilds",
"removeSuggestedSolution" 1913 return array(
'editQuestion',
'save',
'saveEdit',
'originalSyncForm');
1931 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
1932 $tabCommands = self::getCommandsFromClassConstants(
'ilAssQuestionFeedbackEditingGUI');
1936 $tabs->
addTarget(
'tst_feedback', $tabLink, $tabCommands, $ilCtrl->getCmdClass(),
'');
1942 protected function addTab_Units(
ilTabsGUI $tabs)
1949 $tabs->
addTarget(
'units', $ilCtrl->getLinkTargetByClass(
'ilLocalUnitConfigurationGUI',
''),
'',
'illocalunitconfigurationgui');
1962 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
1964 switch( $ilCtrl->getCmdClass() )
1966 case 'ilassquestionhintsgui':
1968 $tabCommands = self::getCommandsFromClassConstants(
'ilAssQuestionHintsGUI');
1971 case 'ilassquestionhintgui':
1973 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintGUI.php';
1974 $tabCommands = self::getCommandsFromClassConstants(
'ilAssQuestionHintGUI');
1979 $tabCommands = array();
1984 $tabs->
addTarget(
'tst_question_hints_tab', $tabLink, $tabCommands, $ilCtrl->getCmdClass(),
'');
1989 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
1995 array(
'ilAssQuestionPreviewGUI')
2002 $graphicalOutput = FALSE,
2003 $result_output = FALSE,
2004 $show_question_only = TRUE,
2005 $show_feedback = FALSE,
2006 $show_correct_solution = FALSE,
2007 $show_manual_scoring = FALSE,
2008 $show_question_text = TRUE
2013 $reachedPoints = $this->
object->getAdjustedReachedPoints($activeId, $passIndex,
true);
2014 $maximumPoints = $this->
object->getMaximumPoints();
2016 return $reachedPoints == $maximumPoints;
2021 return $this->
object->isAutosaveable();
2026 $this->
object->setTitle(
$_POST[
"title"] );
2027 $this->
object->setAuthor(
$_POST[
"author"] );
2028 $this->
object->setComment(
$_POST[
"comment"] );
2029 if ($this->object->getSelfAssessmentEditingMode())
2031 $this->
object->setNrOfTries(
$_POST[
'nr_of_tries'] );
2034 $this->
object->setEstimatedWorkingTime(
2035 $_POST[
"Estimated"][
"hh"],
2036 $_POST[
"Estimated"][
"mm"],
2037 $_POST[
"Estimated"][
"ss"]
2041 abstract public function getPreview($show_question_only = FALSE, $showInlineFeedback =
false);
2057 $is_question_postponed = FALSE,
2058 $user_post_solutions = FALSE,
2059 $show_specific_inline_feedback = FALSE
2067 $is_question_postponed,
2068 $user_post_solutions,
2069 $show_specific_inline_feedback
2074 $this->tpl->setVariable(
"QUESTION_OUTPUT", $test_output);
2075 $this->tpl->setVariable(
"FORMACTION", $formaction);
2077 $this->tpl->setVariable(
"FORM_TIMESTAMP", time());
2095 $is_question_postponed,
2096 $user_post_solutions,
2097 $show_specific_inline_feedback
2105 return $this->
object->getSolutionValues($activeId,
$pass,
true);
2108 return $this->
object->getUserSolutionPreferingIntermediate($activeId,
$pass);
2114 return self::FORM_ENCODING_URLENCODE;
2122 if((
$_GET[
"calling_test"] > 0) || (
$_GET[
"test_ref_id"] > 0))
2127 if(!
$_GET[
'test_express_mode'] && !
$GLOBALS[
'___test_express_mode'])
2129 $ilTabs->
setBackTarget($this->lng->txt(
"backtocallingtest"),
"ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=$ref_id");
2134 $ilTabs->
setBackTarget($this->lng->txt(
"backtocallingtest"), $link);
2137 else if(isset(
$_GET[
'calling_consumer']) && (int)
$_GET[
'calling_consumer'])
2139 $ref_id = (int)$_GET[
'calling_consumer'];
2143 $ilTabs->
setBackTarget($consumer->getQuestionEditingFormBackTargetLabel(), $consumer->getQuestionEditingFormBackTarget($_GET[
'consumer_context']));
2147 require_once
'Services/Link/classes/class.ilLink.php';
2153 $ilTabs->
setBackTarget($this->lng->txt(
"qpl"), $this->ctrl->getLinkTargetByClass(
"ilobjquestionpoolgui",
"questions"));
2183 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
2186 $form->setFormAction($this->ctrl->getFormAction($this));
2188 $form->setId($this->
getType());
2191 $form->setTableWidth(
'100%');
2193 $form->setMultipart(
true);
isTestPresentationContext()
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static makeDirParents($a_dir)
Create a new directory and all parent directories.
setQuestionActionCmd($questionActionCmd)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
hasCorrectSolution($activeId, $passIndex)
addTab_QuestionPreview(ilTabsGUI $tabsGUI)
This class represents an option in a radio group.
getSolutionOutput( $active_id, $pass=NULL, $graphicalOutput=FALSE, $result_output=FALSE, $show_question_only=TRUE, $show_feedback=FALSE, $show_correct_solution=FALSE, $show_manual_scoring=FALSE, $show_question_text=TRUE)
writePostData()
Evaluates a posted edit form and writes the form data in the question object.
getTestOutput( $active_id, $pass, $is_question_postponed, $user_post_solutions, $show_specific_inline_feedback)
static _includeClass($question_type, $gui=0)
Include the php class file for a given question type.
addBasicQuestionFormProperties($form)
Add basic question form properties: assessment: title, author, description, question, working time.
_questionExistsInPool($question_id)
Returns true if the question already exists in the database and is assigned to a question pool...
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
addTab_QuestionHints(ilTabsGUI $tabs)
adds the hints tab to ilTabsGUI
getPreview($show_question_only=FALSE, $showInlineFeedback=false)
suggestedsolution()
Allows to add suggested solutions for questions.
$question_count
question count in test
addErrorMessage($errormessage)
const ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT
constant for additional content editing mode "pageobject"
__construct()
assQuestionGUI constructor
getEditQuestionTabCommands()
const SESSION_PREVIEW_DATA_BASE_INDEX
buildBasicEditFormObject()
setPresentationContext($presentationContext)
setPreviousSolutionPrefilled($previousSolutionPrefilled)
isLastSolutionSubmitAuthorized($active_id, $pass)
fetches solutions from database and prefers intermediate solutions, but falls back to authorized solu...
getBasicEditQuestionTabCommands()
getTestOutputSolutions($activeId, $pass)
_getGUIClassNameForId($a_q_id)
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
setValue($a_value)
Set Value.
setQuestionHeaderBlockBuilder($questionHeaderBlockBuilder)
getGenericFeedbackOutputForCorrectSolution()
setTaxonomyIds($taxonomyIds)
callNewIdListeners($a_new_id)
Call the new id listeners.
getQuestionTemplate()
get question template
addTarget($a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)
DEPRECATED.
Class ilQuestionUsagesTableGUI.
& executeCommand()
execute command
setBackTarget($a_title, $a_target, $a_frame="")
back target for upper context
populateTaxonomyFormSection(ilPropertyFormGUI $form)
const CMD_SHOW_LIST
command constants
const CMD_SHOW
command constants
setOutputMode($outputMode)
static stripOnlySlashes($a_str)
strip slashes if magic qoutes is enabled
$sequence_no
sequence number in test
_questionExistsInTest($question_id, $test_id)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
getType()
needed for page editor compliance
static getCommandsFromClassConstants($guiClassName, $cmdConstantNameBegin='CMD_')
extracts values of all constants of given class with given prefix as array can be used to get all pos...
& createQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation.
writeQuestionGenericPostData()
const PRESENTATION_CONTEXT_RESULTS
static getReturnToPageLink($q_id=null)
if(!is_array($argv)) $options
getILIASPage($html="")
Returns the ILIAS Page around a question.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static getManualFeedback($active_id, $question_id, $pass)
Retrieves the manual feedback for a question in a test.
const FORM_ENCODING_MULTIPART
special template class to simplify handling of ITX/PEAR
& _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
This class represents a text property in a property form.
originalSyncForm($return_to="", $return_to_feedback='')
addNewIdListener(&$a_object, $a_method, $a_parameters="")
Add a listener that is notified with the new question ID, when a new question is saved.
getPageList($lm_id)
static
addTab_QuestionFeedback(ilTabsGUI $tabs)
adds the feedback tab to ilTabsGUI
_getInternalLinkHref($target="")
setTargetGui($linkTargetGui)
getContextPath($cont_obj, $a_endnode_id, $a_startnode_id=1)
get context path in content object tree
setMaxLength($a_maxlength)
Set Max Length.
getQuestionType()
Returns the question type string.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
isContentEditingOutputMode()
setTargetGuiClass($targetGuiClass)
Basic GUI class for assessment questions.
setErrorMessage($errormessage)
const OUTPUT_MODE_CONTENT_EDITING
const PRESENTATION_CONTEXT_TEST
outQuestionForTest( $formaction, $active_id, $pass, $is_question_postponed=FALSE, $user_post_solutions=FALSE, $show_specific_inline_feedback=FALSE)
$previousSolutionPrefilled
completeTestOutputFormAction($formAction, $active_id, $pass)
getPreviousSolutionProvidedMessage()
getAnswerFeedbackOutput($active_id, $pass)
Returns the answer generic feedback depending on the results of the question.
const FORM_ENCODING_URLENCODE
Class ilQuestionInternalLinkSelectionTableGUI.
getGenericFeedbackOutputForIncorrectSolution()
saveTaxonomyAssignments()
Class ilQuestionUsagesTableGUI.
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
& _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
getAdditionalEditQuestionCommands()
This class represents a text area property in a property form.
addBackTab(ilTabsGUI $ilTabs)
setPreviewSession($previewSession)
Class ilObjContentObjectGUI.
getQuestionTypeFromDb($question_id)
get question type for question id
$questionHeaderBlockBuilder
static getGuiClassNameByQuestionType($questionType)
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="")
output question page
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
isPreviousSolutionPrefilled()
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
getGenericFeedbackOutput($active_id, $pass)
Returns the answer specific feedback for the question.
getAsValueAttribute($a_value)
Returns a HTML value attribute.
setValue($a_value)
Set Value.
static redirect($a_script)
http redirect to other script
static getFeedbackClassNameByQuestionType($questionType)
_getClassNameForQType($q_type)
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
_isWriteable($question_id, $user_id)
Returns true if the question is writeable by a certain user.
saveReturn()
save question
getSpecificFeedbackOutput($active_id, $pass)
Returns the answer specific feedback for the question.
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
addTab_SuggestedSolution(ilTabsGUI $tabs, $classname)
setOutputMode($a_mode=IL_PAGE_PRESENTATION)
Set Output Mode.
const TAB_ID_QUESTION_PREVIEW
setQuestionHTML($question_html)
addQuestionFormCommandButtons($form)
Add the command buttons of a question properties form.
setQuestionCount($a_question_count)
setNavigationGUI($navigationGUI)