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);
31 parent::__construct($a_parent_obj, $a_parent_cmd);
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');
80 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
81 $ti =
new ilTextInputGUI($lng->txt(
"tst_qbt_filter_question_title"),
"title");
84 $ti->setValidationRegexp(
'/(^[^%]+$)|(^$)/is');
86 $ti->readFromSession();
87 $this->filter[
"title"] = $ti->getValue();
93 $ti->setValidationRegexp(
'/(^[^%]+$)|(^$)/is');
95 $ti->readFromSession();
96 $this->filter[
"description"] = $ti->getValue();
99 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
100 include_once(
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
103 $options[
""] = $lng->txt(
'filter_all_question_types');
104 foreach ($types as $translation =>
$row)
112 $si->readFromSession();
113 $this->filter[
"type"] =
$si->getValue();
120 $ti->setValidationRegexp(
'/(^[^%]+$)|(^$)/is');
121 $ti->readFromSession();
122 $this->filter[
"author"] = $ti->getValue();
128 $ti->setValidationRegexp(
'/(^[^%]+$)|(^$)/is');
130 $ti->readFromSession();
131 $this->filter[
"qpl"] = $ti->getValue();
144 $this->tpl->setVariable(
"QUESTION_ID",
$data[
"question_id"]);
145 $this->tpl->setVariable(
"QUESTION_TITLE",
$data[
"title"]);
146 $this->tpl->setVariable(
"QUESTION_COMMENT",
$data[
"description"]);
147 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
149 $this->tpl->setVariable(
"QUESTION_AUTHOR",
$data[
"author"]);
152 $this->tpl->setVariable(
"QUESTION_POOL",
$data[
'qpl']);
153 $this->tpl->setVariable(
"WORKING_TIME",
$data[
'working_time']);
158 $this->writeAccess = $value;
setFormName($a_formname)
Set Form name.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setStyle($a_element, $a_style)
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
& _getQuestionTypes($all_tags=FALSE, $fixOrder=false)
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
__construct($a_parent_obj, $a_parent_cmd, $a_ref_id, $a_write_access=false)
Constructor.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
if(!is_array($argv)) $options
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
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.
static formatDate(ilDateTime $date)
Format a date public.
setMaxLength($a_maxlength)
Set Max Length.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setFilterCommand($a_val, $a_caption=null)
Set filter command.