4 require_once
'./Services/Table/classes/class.ilTable2GUI.php';
28 public function __construct($a_parent_obj, $a_parent_cmd, $a_ref_id, $a_write_access =
false)
30 $this->
setId(
'qst_browser_' . $a_ref_id);
41 $this->
setStyle(
'table',
'fullwidth');
43 $this->
addColumn($this->lng->txt(
"tst_question_title"),
'title',
'');
44 $this->
addColumn($this->lng->txt(
"description"),
'description',
'');
45 $this->
addColumn($this->lng->txt(
"tst_question_type"),
'ttype',
'');
46 $this->
addColumn($this->lng->txt(
"author"),
'author',
'');
47 $this->
addColumn($this->lng->txt(
"create_date"),
'created',
'');
48 $this->
addColumn($this->lng->txt(
"last_update"),
'tstamp',
'');
49 $this->
addColumn($this->lng->txt(
"qpl"),
'qpl',
'');
50 $this->
addColumn($this->lng->txt(
"working_time"),
'working_time',
'');
57 $this->
setRowTemplate(
"tpl.il_as_tst_question_browser_row.html",
"Modules/Test");
59 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
65 $this->
enable(
'select_all');
79 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
80 $ti =
new ilTextInputGUI($lng->txt(
"tst_qbt_filter_question_title"),
"title");
83 $ti->setValidationRegexp(
'/(^[^%]+$)|(^$)/is');
85 $ti->readFromSession();
86 $this->filter[
"title"] = $ti->getValue();
92 $ti->setValidationRegexp(
'/(^[^%]+$)|(^$)/is');
94 $ti->readFromSession();
95 $this->filter[
"description"] = $ti->getValue();
98 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
99 include_once(
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
102 $options[
""] = $lng->txt(
'filter_all_question_types');
103 foreach ($types as $translation =>
$row)
111 $si->readFromSession();
112 $this->filter[
"type"] =
$si->getValue();
119 $ti->setValidationRegexp(
'/(^[^%]+$)|(^$)/is');
120 $ti->readFromSession();
121 $this->filter[
"author"] = $ti->getValue();
127 $ti->setValidationRegexp(
'/(^[^%]+$)|(^$)/is');
129 $ti->readFromSession();
130 $this->filter[
"qpl"] = $ti->getValue();
143 $this->tpl->setVariable(
"QUESTION_ID",
$data[
"question_id"]);
144 $this->tpl->setVariable(
"QUESTION_TITLE",
$data[
"title"]);
145 $this->tpl->setVariable(
"QUESTION_COMMENT",
$data[
"description"]);
146 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
148 $this->tpl->setVariable(
"QUESTION_AUTHOR",
$data[
"author"]);
151 $this->tpl->setVariable(
"QUESTION_POOL",
$data[
'qpl']);
152 $this->tpl->setVariable(
"WORKING_TIME",
$data[
'working_time']);
157 $this->writeAccess = $value;