24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
45 public function __construct($a_parent_obj, $a_parent_cmd, $a_write_access =
false)
57 $this->
setStyle(
'table',
'fullwidth');
59 $this->
addColumn($this->lng->txt(
"tst_question_title"),
'title',
'');
60 $this->
addColumn($this->lng->txt(
"description"),
'description',
'');
61 $this->
addColumn($this->lng->txt(
"tst_question_type"),
'ttype',
'');
62 $this->
addColumn($this->lng->txt(
"author"),
'author',
'');
63 $this->
addColumn($this->lng->txt(
"create_date"),
'created',
'');
64 $this->
addColumn($this->lng->txt(
"last_update"),
'updated',
'');
65 $this->
addColumn($this->lng->txt(
"qpl"),
'qpl',
'');
75 $this->
setRowTemplate(
"tpl.il_as_tst_question_browser_row.html",
"Modules/Test");
77 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
83 $this->
enable(
'select_all');
94 global
$lng, $rbacreview, $ilUser;
97 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
101 $ti->setValidationRegexp(
'/^[^%]+$/is');
103 $ti->readFromSession();
104 $this->filter[
"title"] = $ti->getValue();
107 $ti =
new ilTextInputGUI($lng->txt(
"description"),
"description");
110 $ti->setValidationRegexp(
'/^[^%]+$/is');
112 $ti->readFromSession();
113 $this->filter[
"description"] = $ti->getValue();
116 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
117 include_once(
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
120 $options[
""] = $lng->txt(
'filter_all_question_types');
121 foreach ($types as $translation =>
$row)
123 $options[
$row[
'type_tag']] = $translation;
129 $si->readFromSession();
130 $this->filter[
"type"] = $si->getValue();
136 $ti->setValidationRegexp(
'/^[^%]+$/is');
138 $ti->readFromSession();
139 $this->filter[
"author"] = $ti->getValue();
144 $ti->setValidationRegexp(
'/^[^%]+$/is');
147 $ti->readFromSession();
148 $this->filter[
"qpl"] = $ti->getValue();
161 global $ilUser,$ilAccess;
163 $this->tpl->setVariable(
"QUESTION_ID",
$data[
"question_id"]);
164 $this->tpl->setVariable(
"QUESTION_TITLE",
$data[
"title"]);
165 $this->tpl->setVariable(
"QUESTION_COMMENT",
$data[
"description"]);
166 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
168 $this->tpl->setVariable(
"QUESTION_AUTHOR",
$data[
"author"]);
169 include_once
"./classes/class.ilFormat.php";
172 $this->tpl->setVariable(
"QUESTION_POOL",
$data[
'qpl']);
177 $this->writeAccess = $value;