24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
48 public function __construct($a_parent_obj, $a_parent_cmd, $a_write_access =
false)
60 $this->
setStyle(
'table',
'fullwidth');
62 $this->
addColumn($this->lng->txt(
"title"),
'title',
'');
64 $this->
addColumn($this->lng->txt(
"description"),
'description',
'');
65 $this->
addColumn($this->lng->txt(
"question_type"),
'ttype',
'');
66 $this->
addColumn($this->lng->txt(
"author"),
'author',
'');
67 $this->
addColumn($this->lng->txt(
"create_date"),
'created',
'');
68 $this->
addColumn($this->lng->txt(
"last_update"),
'updated',
'');
69 $this->
addColumn($this->lng->txt(
"obj_spl"),
'spl',
'');
76 $this->
setRowTemplate(
"tpl.il_svy_svy_questionbrowser_row.html",
"Modules/Survey");
78 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
81 include_once
"./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php";
87 $this->
enable(
'select_all');
99 global
$lng, $rbacreview, $ilUser;
102 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
105 $ti->setValidationRegexp(
'/^[^%]+$/is');
108 $ti->readFromSession();
109 $this->filter[
"title"] = $ti->getValue();
112 $ti =
new ilTextInputGUI($lng->txt(
"description"),
"description");
114 $ti->setValidationRegexp(
'/^[^%]+$/is');
117 $ti->readFromSession();
118 $this->filter[
"description"] = $ti->getValue();
123 $ti->setValidationRegexp(
'/^[^%]+$/is');
126 $ti->readFromSession();
127 $this->filter[
"author"] = $ti->getValue();
130 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
131 include_once(
"./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php");
132 $types = ilObjSurveyQuestionPool::_getQuestionTypes();
134 $options[
""] = $lng->txt(
'filter_all_question_types');
135 foreach ($types as $translation =>
$row)
137 $options[
$row[
'type_tag']] = $translation;
143 $si->readFromSession();
144 $this->filter[
"type"] = $si->getValue();
148 $options[
""] = $lng->txt(
'filter_all_questionpools');
149 foreach ($this->questionpools as $obj_id =>
$title)
151 $options[$obj_id] =
$title;
157 $si->readFromSession();
158 $this->filter[
"type"] = $si->getValue();
170 global $ilUser,$ilAccess;
172 $this->tpl->setVariable(
'QUESTION_ID',
$data[
"question_id"]);
175 $this->tpl->setVariable(
"TXT_PREVIEW", $this->lng->txt(
"preview"));
176 $guiclass = strtolower(
$data[
'type_tag']) .
"gui";
177 $this->ctrl->setParameterByClass($guiclass,
"q_id",
$data[
"question_id"]);
178 $this->tpl->setVariable(
"LINK_PREVIEW",
"ilias.php?baseClass=ilObjSurveyQuestionPoolGUI&ref_id=" .
$data[
"ref_id"] .
"&cmd=preview&preview=" .
$data[
"question_id"]);
180 $this->tpl->setVariable(
"QUESTION_DESCRIPTION",
ilUtil::prepareFormOutput((strlen($data[
"description"])) ? $data[
"description"] :
""));
181 $this->tpl->setVariable(
"QUESTION_TYPE", $data[
"ttype"]);
183 include_once
"./classes/class.ilFormat.php";
191 $this->editable = $value;
201 $this->writeAccess = $value;