24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
63 public function __construct($a_parent_obj, $a_parent_cmd, $a_object, $a_write_access =
false)
67 $this->rbacreview = $DIC->rbac()->review();
68 $this->
user = $DIC->user();
69 $this->access = $DIC->access();
70 parent::__construct($a_parent_obj, $a_parent_cmd);
72 $lng = $DIC->language();
81 $this->
setStyle(
'table',
'fullwidth');
83 $this->
addColumn($this->lng->txt(
"title"),
'title',
'');
85 $this->
addColumn($this->lng->txt(
"description"),
'description',
'');
86 $this->
addColumn($this->lng->txt(
"question_type"),
'ttype',
'');
87 $this->
addColumn($this->lng->txt(
"author"),
'author',
'');
88 $this->
addColumn($this->lng->txt(
"create_date"),
'created',
'');
89 $this->
addColumn($this->lng->txt(
"last_update"),
'updated',
'');
90 $this->
addColumn($this->lng->txt(
"obj_spl"),
'spl',
'');
97 $this->
setRowTemplate(
"tpl.il_svy_svy_questionbrowser_row.html",
"Modules/Survey");
99 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
102 include_once
"./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php";
107 $this->
enable(
'select_all');
117 $arrFilter =
array();
119 if ($item->getValue() !==
false) {
120 $arrFilter[$item->getPostVar()] = $item->getValue();
123 $data = $a_object->getQuestionsTable($arrFilter);
129 $data[$idx][
"spl"] = $pools[
$row[
"obj_fi"]];
151 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
154 $ti->setValidationRegexp(
'/^[^%]+$/is');
157 $ti->readFromSession();
158 $this->filter[
"title"] = $ti->getValue();
163 $ti->setValidationRegexp(
'/^[^%]+$/is');
166 $ti->readFromSession();
167 $this->filter[
"description"] = $ti->getValue();
172 $ti->setValidationRegexp(
'/^[^%]+$/is');
175 $ti->readFromSession();
176 $this->filter[
"author"] = $ti->getValue();
179 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
180 include_once(
"./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php");
181 $types = ilObjSurveyQuestionPool::_getQuestionTypes();
184 foreach ($types as $translation =>
$row) {
191 $si->readFromSession();
192 $this->filter[
"type"] =
$si->getValue();
200 $ti->readFromSession();
201 $this->filter[
"spl_txt"] = $ti->getValue();
206 natcasesort($this->questionpools);
207 foreach ($this->questionpools as $obj_id =>
$title) {
213 $si->readFromSession();
214 $this->filter[
"type"] =
$si->getValue();
229 $this->tpl->setVariable(
'QUESTION_ID',
$data[
"question_id"]);
232 $this->tpl->setVariable(
"TXT_PREVIEW", $this->lng->txt(
"preview"));
233 $guiclass = strtolower(
$data[
'type_tag']) .
"gui";
234 $this->ctrl->setParameterByClass($guiclass,
"q_id",
$data[
"question_id"]);
235 $this->tpl->setVariable(
"LINK_PREVIEW",
"ilias.php?baseClass=ilObjSurveyQuestionPoolGUI&ref_id=" .
$data[
"ref_id"] .
"&cmd=preview&preview=" .
$data[
"question_id"]);
237 $this->tpl->setVariable(
"QUESTION_DESCRIPTION",
ilUtil::prepareFormOutput((strlen($data[
"description"])) ? $data[
"description"] :
""));
238 $this->tpl->setVariable(
"QUESTION_TYPE", $data[
"ttype"]);
247 $this->editable = $value;
257 $this->writeAccess = $value;
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
__construct($a_parent_obj, $a_parent_cmd, $a_object, $a_write_access=false)
Constructor.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setStyle($a_element, $a_style)
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
addMultiCommand($a_cmd, $a_text)
Add Command button.
enable($a_module_name)
enables particular modules of table
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
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.
setFormName($a_formname="")
Set Form name.
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.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
getFilterItems($a_optionals=false)
Get filter items.
static _getAvailableQuestionpools($use_object_id=false, $could_be_offline=false, $showPath=false, $permission="read")
Returns the available question pools for the active user.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
setFilterCommand($a_val, $a_caption=null)
Set filter command.