4 include_once
"./Modules/Test/classes/inc.AssessmentConstants.php";
40 $this->
ilObject($a_id,$a_call_by_reference);
81 if (!parent::update())
94 include_once
"./Services/MetaData/classes/class.ilMD.php";
96 $md_gen =& $md->getGeneral();
99 include_once
"./Services/MetaData/classes/class.ilMDCreator.php";
101 $md_creator->setTitle($this->
getTitle());
102 $md_creator->setTitleLanguage($ilUser->getPref(
'language'));
103 $md_creator->create();
113 function read($a_force_db =
false)
129 if (!parent::delete())
147 if (count($questions))
149 foreach ($questions as $question_id)
156 include_once
"./Services/Utilities/classes/class.ilUtil.php";
158 $directory = $qpl_data_dir.
"/qpl_".$this->
getId();
159 if (is_dir($directory))
161 include_once
"./Services/Utilities/classes/class.ilUtil.php";
191 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
231 if ($a_node_id==
$_GET[
"ref_id"])
233 $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
234 $parent_type = $parent_obj->getType();
235 if($parent_type == $this->
getType())
237 $a_node_id = (int) $tree->getParentId($a_node_id);
241 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
252 include_once
"./Modules/Test/classes/class.ilObjTest.php";
255 $question->delete($question_id);
267 $result = $ilDB->queryF(
"SELECT * FROM qpl_questionpool WHERE obj_fi = %s",
269 array($this->
getId())
287 $result = $ilDB->queryF(
"SELECT id_questionpool FROM qpl_questionpool WHERE obj_fi = %s",
289 array($this->
getId())
293 $result = $ilDB->manipulateF(
"UPDATE qpl_questionpool SET isonline = %s, tstamp = %s WHERE obj_fi = %s",
294 array(
'text',
'integer',
'integer'),
300 $next_id = $ilDB->nextId(
'qpl_questionpool');
301 $result = $ilDB->manipulateF(
"INSERT INTO qpl_questionpool (id_questionpool, isonline, tstamp, obj_fi) VALUES (%s, %s, %s, %s)",
302 array(
'integer',
'text',
'integer',
'integer'),
319 if ($question_id < 1)
324 $result = $ilDB->queryF(
"SELECT qpl_qst_type.type_tag FROM qpl_questions, qpl_qst_type WHERE qpl_questions.question_type_fi = qpl_qst_type.question_type_id AND qpl_questions.question_id = %s",
331 return $data[
"type_tag"];
386 $result = $ilDB->queryF(
"SELECT COUNT(solution_id) solution_count FROM tst_solutions WHERE question_fi = %s",
391 return $row[
"solution_count"];
396 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
399 $question_type_gui = $question_type .
"GUI";
400 $question_gui =&
new $question_type_gui();
401 return $question_gui;
413 $newtitle = $question->object->getTitle();
414 if ($question->object->questionTitleExists($this->getId(), $question->object->getTitle()))
417 while ($question->object->questionTitleExists($this->getId(), $question->object->getTitle() .
" ($counter)"))
421 $newtitle = $question->object->getTitle() .
" ($counter)";
423 $new_id = $question->object->duplicate(
false, $newtitle);
439 if ($question_gui->object->getObjId() == $questionpool_to)
447 $newtitle = $question_gui->object->getTitle();
448 if ($question_gui->object->questionTitleExists($this->getId(), $question_gui->object->getTitle()))
451 while ($question_gui->object->questionTitleExists($this->getId(), $question_gui->object->getTitle() .
" ($counter)"))
455 $newtitle = $question_gui->object->getTitle() .
" ($counter)";
457 return $question_gui->object->copyObject($this->
getId(), $newtitle);
472 if (is_array($arrFilter))
474 if (array_key_exists(
'title', $arrFilter) && strlen($arrFilter[
'title']))
476 $where .=
" AND " . $ilDB->like(
'qpl_questions.title',
'text',
"%%" . $arrFilter[
'title'] .
"%%");
478 if (array_key_exists(
'description', $arrFilter) && strlen($arrFilter[
'description']))
480 $where .=
" AND " . $ilDB->like(
'qpl_questions.description',
'text',
"%%" . $arrFilter[
'description'] .
"%%");
482 if (array_key_exists(
'author', $arrFilter) && strlen($arrFilter[
'author']))
484 $where .=
" AND " . $ilDB->like(
'qpl_questions.author',
'text',
"%%" . $arrFilter[
'author'] .
"%%");
486 if (array_key_exists(
'type', $arrFilter) && strlen($arrFilter[
'type']))
488 $where .=
" AND qpl_qst_type.type_tag = " . $ilDB->quote($arrFilter[
'type'],
'text');
491 $query_result = $ilDB->queryF(
"SELECT qpl_questions.*, qpl_qst_type.type_tag, qpl_qst_type.plugin FROM qpl_questions, qpl_qst_type WHERE qpl_questions.original_id IS NULL AND qpl_questions.tstamp > 0 AND qpl_questions.question_type_fi = qpl_qst_type.question_type_id AND qpl_questions.obj_fi = %s" . $where,
493 array($this->
getId())
497 if ($query_result->numRows())
499 while (
$row = $ilDB->fetchAssoc($query_result))
501 $row[
'ttype'] = $types[
$row[
'type_tag']];
506 array_push($rows, $row);
511 array_push($rows, $row);
527 $query_result = $ilDB->queryF(
"SELECT qpl_questions.*, qpl_qst_type.type_tag, qpl_qst_type.plugin, qpl_questions.tstamp updated FROM qpl_questions, qpl_qst_type WHERE qpl_questions.original_id IS NULL AND qpl_questions.tstamp > 0 AND qpl_questions.question_type_fi = qpl_qst_type.question_type_id AND qpl_questions.obj_fi = %s",
529 array($this->
getId())
533 if ($query_result->numRows())
535 while (
$row = $ilDB->fetchAssoc($query_result))
537 $row[
'ttype'] = $types[
$row[
'type_tag']];
542 array_push($rows, $row);
547 array_push($rows, $row);
560 function exportPagesXML(&$a_xml_writer, $a_inst, $a_target_dir, &$expLog, $questions)
564 $this->mob_ids = array();
565 $this->file_ids = array();
568 $attrs[
"Type"] =
"Questionpool_Test";
569 $a_xml_writer->xmlStartTag(
"ContentObject", $attrs);
575 $expLog->write(date(
"[y-m-d H:i:s] ").
"Start Export Page Objects");
576 $ilBench->start(
"ContentObjectExport",
"exportPageObjects");
578 $ilBench->stop(
"ContentObjectExport",
"exportPageObjects");
579 $expLog->write(date(
"[y-m-d H:i:s] ").
"Finished Export Page Objects");
582 $expLog->write(date(
"[y-m-d H:i:s] ").
"Start Export Media Objects");
583 $ilBench->start(
"ContentObjectExport",
"exportMediaObjects");
585 $ilBench->stop(
"ContentObjectExport",
"exportMediaObjects");
586 $expLog->write(date(
"[y-m-d H:i:s] ").
"Finished Export Media Objects");
589 $expLog->write(date(
"[y-m-d H:i:s] ").
"Start Export File Items");
590 $ilBench->start(
"ContentObjectExport",
"exportFileItems");
592 $ilBench->stop(
"ContentObjectExport",
"exportFileItems");
593 $expLog->write(date(
"[y-m-d H:i:s] ").
"Finished Export File Items");
595 $a_xml_writer->xmlEndTag(
"ContentObject");
606 include_once(
"Services/MetaData/classes/class.ilMD2XML.php");
608 $md2xml->setExportMode(
true);
609 $md2xml->startExport();
610 $a_xml_writer->appendXML($md2xml->getXML());
615 if ($a_tag ==
"Identifier" && $a_param ==
"Entry")
617 include_once
"./Services/Utilities/classes/class.ilUtil.php";
635 include_once
"./Modules/LearningModule/classes/class.ilLMPageObject.php";
637 foreach ($questions as $question_id)
639 $ilBench->start(
"ContentObjectExport",
"exportPageObject");
640 $expLog->write(date(
"[y-m-d H:i:s] ").
"Page Object ".$question_id);
643 $a_xml_writer->xmlStartTag(
"PageObject", $attrs);
647 $ilBench->start(
"ContentObjectExport",
"exportPageObject_XML");
649 $page_object->buildDom();
650 $page_object->insertInstIntoIDs($a_inst);
651 $mob_ids = $page_object->collectMediaObjects(
false);
652 $file_ids = $page_object->collectFileItems();
653 $xml = $page_object->getXMLFromDom(
false,
false,
false,
"",
true);
654 $xml = str_replace(
"&",
"&", $xml);
655 $a_xml_writer->appendXML($xml);
656 $page_object->freeDom();
657 unset ($page_object);
659 $ilBench->stop(
"ContentObjectExport",
"exportPageObject_XML");
662 $ilBench->start(
"ContentObjectExport",
"exportPageObject_CollectMedia");
664 foreach($mob_ids as $mob_id)
666 $this->mob_ids[$mob_id] = $mob_id;
668 $ilBench->stop(
"ContentObjectExport",
"exportPageObject_CollectMedia");
671 $ilBench->start(
"ContentObjectExport",
"exportPageObject_CollectFileItems");
673 foreach($file_ids as $file_id)
675 $this->file_ids[$file_id] = $file_id;
677 $ilBench->stop(
"ContentObjectExport",
"exportPageObject_CollectFileItems");
679 $a_xml_writer->xmlEndTag(
"PageObject");
682 $ilBench->stop(
"ContentObjectExport",
"exportPageObject");
696 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
698 foreach ($this->mob_ids as $mob_id)
700 $expLog->write(date(
"[y-m-d H:i:s] ").
"Media Object ".$mob_id);
704 $media_obj->exportXML($a_xml_writer, $a_inst);
705 $media_obj->exportFiles($a_target_dir);
717 include_once(
"./Modules/File/classes/class.ilObjFile.php");
719 foreach ($this->file_ids as $file_id)
721 $expLog->write(date(
"[y-m-d H:i:s] ").
"File Item ".$file_id);
722 $file_obj =
new ilObjFile($file_id,
false);
723 $file_obj->export($a_target_dir);
735 include_once
"./Services/Utilities/classes/class.ilUtil.php";
738 if(!is_writable($qpl_data_dir))
740 $this->ilias->raiseError(
"Questionpool Data Directory (".$qpl_data_dir
741 .
") not writeable.",$this->ilias->error_obj->FATAL);
745 $qpl_dir = $qpl_data_dir.
"/qpl_".$this->
getId();
747 if(!@is_dir($qpl_dir))
749 $this->ilias->raiseError(
"Creation of Questionpool Directory failed.",$this->ilias->error_obj->FATAL);
755 $this->ilias->raiseError(
"Creation of Export Directory failed.",$this->ilias->error_obj->FATAL);
760 $this->ilias->raiseError(
"Creation of Export Directory failed.",$this->ilias->error_obj->FATAL);
769 include_once
"./Services/Utilities/classes/class.ilUtil.php";
774 $export_dir =
ilUtil::getDataDir().
"/qpl_data".
"/qpl_".$this->getId().
"/export_$type";
792 include_once
"./Services/Utilities/classes/class.ilUtil.php";
796 if(!is_writable($qpl_data_dir))
798 $ilias->raiseError(
"Questionpool Data Directory (".$qpl_data_dir
799 .
") not writeable.",$ilias->error_obj->FATAL);
803 $qpl_dir = $qpl_data_dir.
"/qpl_import";
805 if(!@is_dir($qpl_dir))
807 $ilias->raiseError(
"Creation of Questionpool Directory failed.",$ilias->error_obj->FATAL);
817 if (strlen($a_import_dir))
819 $_SESSION[
"qpl_import_dir"] = $a_import_dir;
853 $result = $ilDB->queryF(
"SELECT question_id FROM qpl_questions WHERE obj_fi = %s AND qpl_questions.tstamp > 0 AND original_id IS NULL",
855 array($this->
getId())
857 $questions = array();
860 array_push($questions,
$row[
"question_id"]);
869 $query_result = $ilDB->queryF(
"SELECT question_id, qpl_qst_type.type_tag, qpl_qst_type.plugin FROM qpl_questions, qpl_qst_type WHERE original_id IS NULL AND qpl_questions.tstamp > 0 AND obj_fi = %s AND complete = %s AND qpl_questions.question_type_fi = qpl_qst_type.question_type_id",
870 array(
'integer',
'text'),
871 array($this->
getId(), 1)
873 $questions = array();
874 if ($query_result->numRows())
876 while (
$row = $ilDB->fetchAssoc($query_result))
882 array_push($questions,
$row[
"question_id"]);
887 array_push($questions,
$row[
"question_id"]);
900 if (!is_array($this->import_mapping))
906 return $this->import_mapping;
921 if (count($questions) > 0)
923 foreach ($questions as $key => $value)
926 $xml .= $question->object->toXML();
928 if (count($questions) > 1)
930 $xml = preg_replace(
"/<\/questestinterop>\s*<.xml.*?>\s*<questestinterop>/",
"", $xml);
933 $xml = preg_replace(
"/(<\?xml[^>]*?>)/",
"\\1" .
"<!DOCTYPE questestinterop SYSTEM \"ims_qtiasiv1p2p1.dtd\">", $xml);
948 if ($complete_questions_only)
950 $result = $ilDB->queryF(
"SELECT COUNT(question_id) question_count FROM qpl_questions WHERE obj_fi = %s AND qpl_questions.tstamp > 0 AND original_id IS NULL AND complete = %s",
951 array(
'integer',
'text'),
952 array($questionpool_id, 1)
957 $result = $ilDB->queryF(
"SELECT COUNT(question_id) question_count FROM qpl_questions WHERE obj_fi = %s AND qpl_questions.tstamp > 0 AND original_id IS NULL",
959 array($questionpool_id)
963 return $row[
"question_count"];
975 switch ($a_online_status)
979 $this->online = $a_online_status;
989 if (strcmp($this->online,
"") == 0) $this->online =
"0";
999 $result = $ilDB->queryF(
"SELECT qpl_questionpool.isonline FROM qpl_questionpool,object_reference WHERE object_reference.ref_id = %s AND object_reference.obj_id = qpl_questionpool.obj_fi",
1006 $result = $ilDB->queryF(
"SELECT isonline FROM qpl_questionpool WHERE obj_fi = %s",
1014 return $row[
"isonline"];
1031 $result = $ilDB->queryF(
"SELECT count(DISTINCT qpl_questions.points) equal_points FROM qpl_questions, object_reference WHERE object_reference.ref_id = %s AND qpl_questions.tstamp > 0 AND object_reference.obj_id = qpl_questions.obj_fi AND qpl_questions.original_id IS NULL",
1038 $result = $ilDB->queryF(
"SELECT count(DISTINCT points) equal_points FROM qpl_questions WHERE obj_fi = %s AND qpl_questions.tstamp > 0 AND qpl_questions.original_id IS NULL",
1046 if (
$row[
"equal_points"] == 1)
1067 if (array_key_exists(
"qpl_clipboard",
$_SESSION))
1069 foreach (
$_SESSION[
"qpl_clipboard"] as $question_object)
1071 if (strcmp($question_object[
"action"],
"move") == 0)
1073 $result = $ilDB->queryF(
"SELECT obj_fi FROM qpl_questions WHERE question_id = %s",
1075 array($question_object[
"question_id"])
1080 $source_questionpool =
$row[
"obj_fi"];
1082 $affectedRows = $ilDB->manipulateF(
"UPDATE qpl_questions SET obj_fi = %s WHERE question_id = %s",
1083 array(
'integer',
'integer'),
1084 array($this->
getId(), $question_object[
"question_id"])
1088 $source_path = CLIENT_WEB_DIR .
"/assessment/" . $source_questionpool .
"/" . $question_object[
"question_id"] .
"/";
1089 if (@is_dir($source_path))
1091 $target_path = CLIENT_WEB_DIR .
"/assessment/" . $this->
getId() .
"/";
1092 if (!@is_dir($target_path))
1094 include_once
"./Services/Utilities/classes/class.ilUtil.php";
1097 @rename($source_path, $target_path . $question_object[
"question_id"]);
1122 if (!array_key_exists(
"qpl_clipboard",
$_SESSION))
1126 $_SESSION[
"qpl_clipboard"][$question_id] = array(
"question_id" => $question_id,
"action" =>
"copy");
1137 if (!array_key_exists(
"qpl_clipboard",
$_SESSION))
1141 $_SESSION[
"qpl_clipboard"][$question_id] = array(
"question_id" => $question_id,
"action" =>
"move");
1146 if( !isset(
$_SESSION[
'qpl_clipboard']) )
1151 if( !isset(
$_SESSION[
'qpl_clipboard'][$deletedQuestionId]) )
1156 unset(
$_SESSION[
'qpl_clipboard'][$deletedQuestionId]);
1158 if( !count(
$_SESSION[
'qpl_clipboard']) )
1175 include_once
"./Services/Object/classes/class.ilObject.php";
1202 $query_result = $ilDB->query(
"SELECT qpl_questions.*, qpl_qst_type.type_tag FROM qpl_questions, qpl_qst_type WHERE qpl_questions.question_type_fi = qpl_qst_type.question_type_id AND " . $ilDB->in(
'qpl_questions.question_id', $question_ids,
false,
'integer') .
" ORDER BY qpl_questions.title");
1203 if ($query_result->numRows())
1205 while (
$row = $ilDB->fetchAssoc($query_result))
1226 $query_result = $ilDB->query(
"SELECT qpl_questions.*, qpl_qst_type.type_tag FROM qpl_questions, qpl_qst_type WHERE qpl_questions.question_type_fi = qpl_qst_type.question_type_id AND " . $ilDB->in(
'qpl_questions.question_id', $question_ids,
false,
'integer') .
" ORDER BY qpl_questions.title");
1227 if ($query_result->numRows())
1229 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
1230 while (
$row = $ilDB->fetchAssoc($query_result))
1245 $duplicate_id = $question->object->duplicate(
true);
1246 if ($duplicate_id > 0)
1249 $affectedRows = $ilDB->manipulateF(
"UPDATE tst_solutions SET question_fi = %s WHERE question_fi = %s",
1250 array(
'integer',
'integer'),
1251 array($duplicate_id,
$row[
"question_id"])
1255 $affectedRows = $ilDB->manipulateF(
"UPDATE tst_test_rnd_qst SET question_fi = %s WHERE question_fi = %s",
1256 array(
'integer',
'integer'),
1257 array($duplicate_id,
$row[
"question_id"])
1261 $affectedRows = $ilDB->manipulateF(
"UPDATE tst_test_result SET question_fi = %s WHERE question_fi = %s",
1262 array(
'integer',
'integer'),
1263 array($duplicate_id,
$row[
"question_id"])
1267 $affectedRows = $ilDB->manipulateF(
"UPDATE ass_log SET question_fi = %s WHERE question_fi = %s",
1268 array(
'integer',
'integer'),
1269 array($duplicate_id,
$row[
"question_id"])
1293 foreach (
$path as $item)
1295 if (($counter > 0) && ($counter < count(
$path)-1))
1297 array_push($items, $item[
"title"]);
1301 $fullpath = join(
" > ", $items);
1302 include_once
"./Services/Utilities/classes/class.ilStr.php";
1303 if (strlen($fullpath) > 60)
1316 function &
_getAvailableQuestionpools($use_object_id = FALSE, $equal_points = FALSE, $could_be_offline = FALSE, $showPath = FALSE, $with_questioncount = FALSE, $permission =
"read",
$usr_id =
"")
1321 $result_array = array();
1322 $permission = (strlen($permission) == 0) ?
"read" : $permission;
1331 if (count($obj_ids))
1333 $in = $ilDB->in(
'object_data.obj_id', $obj_ids,
false,
'integer');
1334 if ($could_be_offline)
1336 $result = $ilDB->query(
"SELECT qpl_questionpool.*, object_data.title FROM qpl_questionpool, object_data WHERE ".
1337 "qpl_questionpool.obj_fi = object_data.obj_id AND $in ORDER BY object_data.title");
1341 $result = $ilDB->queryF(
"SELECT qpl_questionpool.*, object_data.title FROM qpl_questionpool, object_data WHERE ".
1342 "qpl_questionpool.obj_fi = object_data.obj_id AND $in AND qpl_questionpool.isonline = %s ".
1343 "ORDER BY object_data.title",
1360 $ref_id = array_search(
$row[
"obj_fi"], $obj_ids);
1361 $title = (($showPath) ? $titles[$ref_id] :
$row[
"title"]);
1362 if ($with_questioncount)
1364 $title .=
" [" . $row[
"questioncount"] .
" " . ($row[
"questioncount"] == 1 ? $this->lng->txt(
"ass_question") : $this->lng->txt(
"assQuestions")) .
"]";
1369 $result_array[$row[
"obj_fi"]] = array(
"title" =>
$title,
"count" => $row[
"questioncount"]);
1373 $result_array[
$ref_id] = array(
"title" =>
$title,
"count" => $row[
"questioncount"]);
1378 return $result_array;
1385 $questions = array();
1386 $result = $ilDB->queryF(
"SELECT qpl_questions.question_id FROM qpl_questions WHERE qpl_questions.original_id IS NULL AND qpl_questions.tstamp > 0 AND qpl_questions.obj_fi = %s",
1388 array($this->
getId())
1392 array_push($questions,
$row[
"question_id"]);
1407 $newObj->saveToDb();
1410 foreach ($questions as $question_id)
1412 $newObj->copyQuestion($question_id, $newObj->getId());
1416 include_once
"./Services/MetaData/classes/class.ilMD.php";
1418 $new_md =& $md->cloneMD($newObj->getId(),0,$newObj->getType());
1421 $newObj->updateMetaData();
1435 include_once
"./Modules/Test/classes/class.ilObjAssessmentFolder.php";
1437 $lng->loadLanguageModule(
"assessment");
1438 $result = $ilDB->query(
"SELECT * FROM qpl_qst_type");
1442 if ($all_tags || (!in_array(
$row[
"question_type_id"], $forbidden_types)))
1446 if (
$row[
"plugin"] == 0)
1448 $types[$lng->txt(
$row[
"type_tag"])] =
$row;
1452 global $ilPluginAdmin;
1453 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_MODULE,
"TestQuestionPool",
"qst");
1454 foreach ($pl_names as $pl_name)
1457 if (strcmp($pl->getQuestionType(),
$row[
"type_tag"]) == 0)
1459 $types[$pl->getQuestionTypeTranslation()] =
$row;
1466 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionTypeOrderer.php';
1469 $types = $orderer->getOrderedTypes();
1476 $query =
"SELECT type_tag FROM qpl_qst_type WHERE question_type_id = %s";
1477 $types = array(
'integer');
1478 $values = array($type_id);
1481 return $row[
'type_tag'];
1490 global $ilPluginAdmin;
1492 $lng->loadLanguageModule(
"assessment");
1493 $result = $ilDB->query(
"SELECT * FROM qpl_qst_type");
1497 if (
$row[
"plugin"] == 0)
1499 $types[
$row[
'type_tag']] = $lng->txt($row[
"type_tag"]);
1503 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_MODULE,
"TestQuestionPool",
"qst");
1504 foreach ($pl_names as $pl_name)
1507 if (strcmp($pl->getQuestionType(),
$row[
"type_tag"]) == 0)
1509 $types[
$row[
'type_tag']] = $pl->getQuestionTypeTranslation();
1537 $allowed_types = array(
1538 "assSingleChoice" => 1,
1539 "assMultipleChoice" => 2,
1540 "assClozeTest" => 3,
1541 "assMatchingQuestion" => 4,
1542 "assOrderingQuestion" => 5,
1543 "assOrderingHorizontal" => 6,
1544 "assImagemapQuestion" => 7,
1545 "assTextSubset" => 9,
1546 "assErrorText" => 10
1550 foreach($qtypes as $k =>
$t)
1553 if (isset($allowed_types[
$t[
"type_tag"]]))
1555 $t[
"order"] = $allowed_types[$t[
"type_tag"]];
1567 $questions = array();
1568 $result = $ilDB->queryF(
"SELECT qpl_questions.*, qpl_qst_type.* FROM qpl_questions, qpl_qst_type WHERE qpl_questions.original_id IS NULL AND qpl_questions.obj_fi = %s AND qpl_questions.tstamp > 0 AND qpl_questions.question_type_fi = qpl_qst_type.question_type_id",
1570 array($this->
getId())
1574 array_push($questions,
$row);
1588 $result = $ilDB->manipulateF(
"UPDATE qpl_questionpool SET questioncount = %s, tstamp = %s WHERE obj_fi = %s",
1589 array(
'integer',
'integer',
'integer'),
1602 global $ilPluginAdmin;
1603 if ($ilPluginAdmin->isActive(
IL_COMP_MODULE,
"TestQuestionPool",
"qst", $a_pname))
1620 require_once
'Modules/TestQuestionPool/classes/class.ilAssIncompleteQuestionPurger.php';
1622 $incompleteQuestionPurger->setOwnerId($ilUser->getId());
1623 $incompleteQuestionPurger->purge();