24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
47 public function __construct($a_parent_obj, $a_parent_cmd, $a_write_access =
false)
61 $this->
setStyle(
'table',
'fullwidth');
63 $this->
addColumn($this->lng->txt(
"title"),
'title',
'');
66 $this->browsercolumns[
'description'] = $qplSetting->get(
"description", 1) ?
true :
false;
67 $this->browsercolumns[
'type'] = $qplSetting->get(
"type", 1) ?
true :
false;
68 $this->browsercolumns[
'author'] = $qplSetting->get(
"author", 1) ?
true :
false;
69 $this->browsercolumns[
'created'] = $qplSetting->get(
"created", 1) ?
true :
false;
70 $this->browsercolumns[
'tstamp'] = $qplSetting->get(
"tstamp", 1) ?
true :
false;
71 if ($this->browsercolumns[
'description']) $this->
addColumn($this->lng->txt(
"description"),
'description',
'');
72 if ($this->browsercolumns[
'type']) $this->
addColumn($this->lng->txt(
"question_type"),
'type',
'');
73 if ($this->browsercolumns[
'author']) $this->
addColumn($this->lng->txt(
"author"),
'author',
'');
74 if ($this->browsercolumns[
'created']) $this->
addColumn($this->lng->txt(
"create_date"),
'created',
'');
75 if ($this->browsercolumns[
'tstamp']) $this->
addColumn($this->lng->txt(
"last_update"),
'tstamp',
'');
88 if (array_key_exists(
"spl_clipboard",
$_SESSION))
95 $this->
setRowTemplate(
"tpl.il_svy_qpl_questions_row.html",
"Modules/SurveyQuestionPool");
97 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
103 $this->
enable(
'select_all');
115 global
$lng, $rbacreview, $ilUser;
118 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
121 $ti->setValidationRegexp(
'/^[^%]+$/is');
124 $ti->readFromSession();
125 $this->filter[
"title"] = $ti->getValue();
128 $ti =
new ilTextInputGUI($lng->txt(
"description"),
"description");
131 $ti->setValidationRegexp(
'/^[^%]+$/is');
133 $ti->readFromSession();
134 $this->filter[
"description"] = $ti->getValue();
140 $ti->setValidationRegexp(
'/^[^%]+$/is');
142 $ti->readFromSession();
143 $this->filter[
"author"] = $ti->getValue();
146 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
147 include_once(
"./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php");
148 $types = ilObjSurveyQuestionPool::_getQuestionTypes();
150 $options[
""] = $lng->txt(
'filter_all_question_types');
151 foreach ($types as $translation =>
$row)
153 $options[
$row[
'type_tag']] = $translation;
159 $si->readFromSession();
160 $this->filter[
"type"] = $si->getValue();
173 global $ilUser,$ilAccess;
174 include_once
"./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php";
175 include_once
"./Modules/SurveyQuestionPool/classes/class.SurveyQuestionGUI.php";
177 $guiclass = $class .
"GUI";
178 $this->ctrl->setParameterByClass(strtolower($guiclass),
"q_id",
$data[
"question_id"]);
181 $this->tpl->setCurrentBlock(
"edit_link");
182 $this->tpl->setVariable(
"TXT_EDIT", $this->lng->txt(
"edit"));
183 $this->tpl->setVariable(
"LINK_EDIT", $this->ctrl->getLinkTargetByClass(strtolower($guiclass),
"editQuestion"));
184 $this->tpl->parseCurrentBlock();
186 if (
$data[
"complete"] == 0)
188 $this->tpl->setCurrentBlock(
"qpl_warning");
190 $this->tpl->setVariable(
"ALT_WARNING", $this->lng->txt(
"warning_question_not_complete"));
191 $this->tpl->setVariable(
"TITLE_WARNING", $this->lng->txt(
"warning_question_not_complete"));
192 $this->tpl->parseCurrentBlock();
195 if ($this->browsercolumns[
'description'])
197 $this->tpl->setCurrentBlock(
'description');
198 $this->tpl->setVariable(
"QUESTION_COMMENT", (strlen(
$data[
"description"])) ?
$data[
"description"] :
" ");
199 $this->tpl->parseCurrentBlock();
201 if ($this->browsercolumns[
'type'])
203 $this->tpl->setCurrentBlock(
'type');
205 $this->tpl->parseCurrentBlock();
207 if ($this->browsercolumns[
'author'])
209 $this->tpl->setCurrentBlock(
'author');
210 $this->tpl->setVariable(
"QUESTION_AUTHOR",
$data[
"author"]);
211 $this->tpl->parseCurrentBlock();
213 include_once
"./classes/class.ilFormat.php";
214 if ($this->browsercolumns[
'created'])
216 $this->tpl->setCurrentBlock(
'created');
218 $this->tpl->parseCurrentBlock();
220 if ($this->browsercolumns[
'tstamp'])
222 $this->tpl->setCurrentBlock(
'updated');
224 $this->tpl->parseCurrentBlock();
227 $this->tpl->setVariable(
'QUESTION_ID',
$data[
"question_id"]);
228 $this->tpl->setVariable(
"QUESTION_TITLE",
$data[
"title"]);
230 $this->tpl->setVariable(
"TXT_PREVIEW", $this->lng->txt(
"preview"));
231 $this->tpl->setVariable(
"LINK_PREVIEW", $this->ctrl->getLinkTargetByClass(strtolower($guiclass),
"preview"));
236 $this->editable = $value;
246 $this->writeAccess = $value;