4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
5 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
25 public function __construct($a_parent_obj, $a_parent_cmd, $a_pool_ref_id)
29 $this->
setId(
"cont_qpl");
30 $this->pool_ref_id = $a_pool_ref_id;
42 $this->
addColumn($this->lng->txt(
"title"),
'title',
'');
43 $this->
addColumn($this->lng->txt(
"cont_question_type"),
'ttype',
'');
44 $this->
addColumn($this->lng->txt(
"actions"),
'',
'');
49 $this->
setRowTemplate(
"tpl.copy_sa_quest_row.html",
"Services/COPage");
51 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
70 global $ilAccess, $ilDB,
$lng, $ilPluginAdmin;
72 include_once(
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
75 foreach ($all_types as $k => $v)
77 $all_ids[] = $v[
"question_type_id"];
81 if ($ilAccess->checkAccess(
"read",
"", $this->pool_ref_id))
83 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
84 $questionList =
new ilAssQuestionList($ilDB, $lng, $ilPluginAdmin, $this->pool_obj_id);
85 $questionList->load();
87 $data = $questionList->getQuestionDataArray();
93 if (in_array($d[
"question_type_fi"], $all_ids))
123 $ilCtrl->setParameter($this->parent_obj,
"q_id", $a_set[
"question_id"]);
124 $ilCtrl->setParameter($this->parent_obj,
"subCmd",
"copyQuestion");
125 $this->tpl->setCurrentBlock(
"cmd");
126 $this->tpl->setVariable(
"HREF_CMD",
127 $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
128 $this->tpl->setVariable(
"TXT_CMD",
129 $lng->txt(
"cont_copy_question_into_page"));
130 $this->tpl->parseCurrentBlock();
131 $ilCtrl->setParameter($this->parent_obj,
"subCmd",
"listPoolQuestions");
134 $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
135 $this->tpl->setVariable(
"TYPE",