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;
33 parent::__construct($a_parent_obj, $a_parent_cmd);
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';
85 $questionList->setParentObjId($this->pool_obj_id);
86 $questionList->load();
88 $data = $questionList->getQuestionDataArray();
94 if (in_array($d[
"question_type_fi"], $all_ids))
124 $ilCtrl->setParameter($this->parent_obj,
"q_id", $a_set[
"question_id"]);
125 $ilCtrl->setParameter($this->parent_obj,
"subCmd",
"copyQuestion");
126 $this->tpl->setCurrentBlock(
"cmd");
127 $this->tpl->setVariable(
"HREF_CMD",
128 $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
129 $this->tpl->setVariable(
"TXT_CMD",
130 $lng->txt(
"cont_copy_question_into_page"));
131 $this->tpl->parseCurrentBlock();
132 $ilCtrl->setParameter($this->parent_obj,
"subCmd",
"listPoolQuestions");
135 $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
136 $this->tpl->setVariable(
"TYPE",
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
static _lookupTitle($a_id)
lookup object title
for($col=0; $col< 50; $col++) $d
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static _lookupObjId($a_id)
getQuestions()
Get questions.
Table to select self assessment questions for copying into learning resources.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct($a_parent_obj, $a_parent_cmd, $a_pool_ref_id)
Constructor.
setFormName($a_formname="")
Set Form name.
static & _getSelfAssessmentQuestionTypes($all_tags=FALSE)
Get all self assessment question types.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.