ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilQuestionBrowserTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once('./Services/Table/classes/class.ilTable2GUI.php');
5require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
6require_once 'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
7
19{
20 protected $editable = true;
21 protected $writeAccess = false;
22 protected $totalPoints = 0;
23 protected $totalWorkingTime = '00:00:00';
24 protected $confirmdelete;
25
26 protected $taxIds = array();
27
31 protected $questionCommentingEnabled = false;
32
40 public function __construct($a_parent_obj, $a_parent_cmd, $a_write_access = false, $confirmdelete = false, $taxIds = array(), $enableCommenting = false)
41 {
42 $this->setQuestionCommentingEnabled($enableCommenting);
43
44 // Bugfix: #0019539
45 if ($confirmdelete) {
46 $this->setId("qpl_confirm_del_" . $a_parent_obj->object->getRefId());
47 } else {
48 $this->setId("qpl_qst_brows_" . $a_parent_obj->object->getRefId());
49 }
50
51 parent::__construct($a_parent_obj, $a_parent_cmd);
52
53 global $DIC;
54 $lng = $DIC['lng'];
55 $ilCtrl = $DIC['ilCtrl'];
56
57 $this->lng = $lng;
58 $this->ctrl = $ilCtrl;
59
60 $this->confirmdelete = $confirmdelete;
61 $this->setWriteAccess($a_write_access);
62 $this->taxIds = $taxIds;
63
64 $qplSetting = new ilSetting("qpl");
65
66 $this->setFormName('questionbrowser');
67 $this->setStyle('table', 'fullwidth');
68 if (!$confirmdelete) {
69 $this->addColumn('', '', '1%');
70 $this->addColumn($this->lng->txt("title"), 'title', '');
71 foreach ($this->getSelectedColumns() as $c) {
72 if (strcmp($c, 'description') == 0) {
73 $this->addColumn($this->lng->txt("description"), 'description', '');
74 }
75 if (strcmp($c, 'type') == 0) {
76 $this->addColumn($this->lng->txt("question_type"), 'ttype', '');
77 }
78 // According to mantis #12713
79 if (strcmp($c, 'points') == 0) {
80 $this->addColumn($this->lng->txt("points"), 'points', '', false, 'ilCenterForced');
81 }
82 if (strcmp($c, 'statistics') == 0) {
83 $this->addColumn($this->lng->txt('statistics'), '', '');
84 }
85 if (strcmp($c, 'author') == 0) {
86 $this->addColumn($this->lng->txt("author"), 'author', '');
87 }
88 if ($c == 'lifecycle') {
89 $this->addColumn($this->lng->txt('qst_lifecycle'), 'lifecycle', '');
90 }
91 if ($this->isQuestionCommentingEnabled() && $c == 'comments') {
92 $this->addColumn($this->lng->txt("ass_comments"), 'comments', '');
93 }
94 if (strcmp($c, 'created') == 0) {
95 $this->addColumn($this->lng->txt("create_date"), 'created', '');
96 }
97 if (strcmp($c, 'tstamp') == 0) {
98 $this->addColumn($this->lng->txt("last_update"), 'tstamp', '');
99 }
100 if (strcmp($c, 'working_time') == 0) {
101 $this->addColumn($this->lng->txt("working_time"), 'working_time', '');
102 }
103 }
104 $this->addColumn($this->lng->txt('actions'), '');
105 $this->setSelectAllCheckbox('q_id');
106 } else {
107 $this->addColumn($this->lng->txt("title"), 'title', '');
108 foreach ($this->getSelectedColumns() as $c) {
109 if (strcmp($c, 'description') == 0) {
110 $this->addColumn($this->lng->txt("description"), 'description', '');
111 }
112 if (strcmp($c, 'type') == 0) {
113 $this->addColumn($this->lng->txt("question_type"), 'ttype', '');
114 }
115 }
116 }
117
118 if ($this->getWriteAccess()) {
119 if ($confirmdelete) {
120 $this->addCommandButton('confirmDeleteQuestions', $this->lng->txt('confirm'));
121 $this->addCommandButton('cancelDeleteQuestions', $this->lng->txt('cancel'));
122 } else {
123 $this->addMultiCommand('copy', $this->lng->txt('copy'));
124 $this->addMultiCommand('move', $this->lng->txt('move'));
125 $this->addMultiCommand('exportQuestion', $this->lng->txt('export'));
126 $this->addMultiCommand('deleteQuestions', $this->lng->txt('delete'));
127 }
128 }
129
130 $this->setRowTemplate("tpl.il_as_qpl_questionbrowser_row.html", "Modules/TestQuestionPool");
131
132 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
133 $this->setDefaultOrderField("title");
134 $this->setDefaultOrderDirection("asc");
135
136 $this->setShowRowsSelector(true);
137
138 if ($confirmdelete) {
139 $this->disable('sort');
140 $this->disable('select_all');
141 } else {
142 $this->enable('sort');
143 $this->enable('header');
144 $this->enable('select_all');
145 $this->setFilterCommand('filterQuestionBrowser');
146 $this->setResetCommand('resetQuestionBrowser');
147 $this->initFilter();
148 }
149
150 if ($this->isQuestionCommentingEnabled()) {
151 global $DIC; /* @var ILIAS\DI\Container $DIC */
152
153 $notesUrl = $this->ctrl->getLinkTargetByClass(
154 array("ilcommonactiondispatchergui", "ilnotegui"),
155 "",
156 "",
157 true,
158 false
159 );
160
161 ilNoteGUI::initJavascript($notesUrl, IL_NOTE_PUBLIC, $DIC->ui()->mainTemplate());
162 }
163 }
164
168 public function isQuestionCommentingEnabled() : bool
169 {
171 }
172
177 {
178 $this->questionCommentingEnabled = $questionCommentingEnabled;
179 }
180
181 protected function isCommentsColumnSelected()
182 {
183 return in_array('comments', $this->getSelectedColumns());
184 }
185
186 public function setQuestionData($questionData)
187 {
188 if ($this->isQuestionCommentingEnabled() && ($this->isCommentsColumnSelected() || $this->filter['commented'])) {
189 foreach ($questionData as $key => $data) {
190 $numComments = count(ilNote::_getNotesOfObject(
191 $this->parent_obj->object->getId(),
192 $data['question_id'],
193 'quest',
195 ));
196
197 if ($this->filter['commented'] && !$numComments) {
198 unset($questionData[$key]);
199 continue;
200 }
201
202 $questionData[$key]['comments'] = $numComments;
203 }
204 }
205
206 $this->setData($questionData);
207 }
208
209 public function getSelectableColumns()
210 {
211 global $DIC;
212 $lng = $DIC['lng'];
213 $cols["description"] = array(
214 "txt" => $lng->txt("description"),
215 "default" => true
216 );
217 $cols["type"] = array(
218 "txt" => $lng->txt("question_type"),
219 "default" => true
220 );
221 if (!$this->confirmdelete) {
222 $cols["points"] = array(
223 "txt" => $lng->txt("points"),
224 "default" => true
225 );
226 $cols["statistics"] = array(
227 "txt" => $lng->txt("statistics"),
228 "default" => true
229 );
230 $cols["author"] = array(
231 "txt" => $lng->txt("author"),
232 "default" => true
233 );
234 $cols['lifecycle'] = array(
235 'txt' => $lng->txt('qst_lifecycle'),
236 'default' => true
237 );
238 if ($this->isQuestionCommentingEnabled()) {
239 $cols["comments"] = array(
240 "txt" => $lng->txt("comments"),
241 "default" => true
242 );
243 }
244 $cols["created"] = array(
245 "txt" => $lng->txt("create_date"),
246 "default" => true
247 );
248 $cols["tstamp"] = array(
249 "txt" => $lng->txt("last_update"),
250 "default" => true
251 );
252 $cols["working_time"] = array(
253 "txt" => $lng->txt("working_time"),
254 "default" => true
255 );
256 }
257 return $cols;
258 }
259
263 public function initFilter()
264 {
265 global $DIC;
266 $lng = $DIC['lng'];
267 $rbacreview = $DIC['rbacreview'];
268 $ilUser = $DIC['ilUser'];
269
270 // title
271 include_once("./Services/Form/classes/class.ilTextInputGUI.php");
272 $ti = new ilTextInputGUI($lng->txt("title"), "title");
273 $ti->setMaxLength(64);
274 $ti->setValidationRegexp('/^[^%]+$/is');
275 $ti->setSize(20);
276 $this->addFilterItem($ti);
277 $ti->readFromSession();
278 $this->filter["title"] = $ti->getValue();
279
280 // description
281 $ti = new ilTextInputGUI($lng->txt("description"), "description");
282 $ti->setMaxLength(64);
283 $ti->setSize(20);
284 $ti->setValidationRegexp('/^[^%]+$/is');
285 $this->addFilterItem($ti);
286 $ti->readFromSession();
287 $this->filter["description"] = $ti->getValue();
288
289 if (!$this->confirmdelete) {
290 // author
291 $ti = new ilTextInputGUI($lng->txt("author"), "author");
292 $ti->setMaxLength(64);
293 $ti->setSize(20);
294 $ti->setValidationRegexp('/^[^%]+$/is');
295 $this->addFilterItem($ti);
296 $ti->readFromSession();
297 $this->filter["author"] = $ti->getValue();
298 }
299
300 // lifecycle
301 $lifecycleOptions = array_merge(
302 array('' => $this->lng->txt('qst_lifecycle_filter_all')),
303 ilAssQuestionLifecycle::getDraftInstance()->getSelectOptions($this->lng)
304 );
305 $lifecycleInp = new ilSelectInputGUI($this->lng->txt('qst_lifecycle'), 'lifecycle');
306 $lifecycleInp->setOptions($lifecycleOptions);
307 $this->addFilterItem($lifecycleInp);
308 $lifecycleInp->readFromSession();
309 $this->filter['lifecycle'] = $lifecycleInp->getValue();
310
311 // questiontype
312 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
313 include_once("./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
315 $options = array();
316 $options[""] = $lng->txt('filter_all_question_types');
317 foreach ($types as $translation => $row) {
318 $options[$row['type_tag']] = $translation;
319 }
320
321 $si = new ilSelectInputGUI($this->lng->txt("question_type"), "type");
322 $si->setOptions($options);
323 $this->addFilterItem($si);
324 $si->readFromSession();
325 $this->filter["type"] = $si->getValue();
326
327 if ($this->parent_obj->object->getShowTaxonomies()) {
328 require_once 'Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php';
329
330 foreach ($this->taxIds as $taxId) {
331 if ($taxId == $this->parent_obj->object->getNavTaxonomyId()) {
332 continue;
333 }
334
335 $postvar = "tax_$taxId";
336
337 $inp = new ilTaxSelectInputGUI($taxId, $postvar, true);
338 $this->addFilterItem($inp);
339 $inp->readFromSession();
340 $this->filter[$postvar] = $inp->getValue();
341 }
342 }
343
344 // comments
345 if ($this->isQuestionCommentingEnabled()) {
346 $comments = new ilCheckboxInputGUI($lng->txt('ass_commented_questions_only'), 'commented');
347 $this->addFilterItem($comments);
348 $comments->readFromSession();
349 $this->filter['commented'] = $comments->getChecked();
350 }
351 }
352
353 public function fillHeader()
354 {
355 foreach ($this->column as $key => $column) {
356 if (strcmp($column['text'], $this->lng->txt("points")) == 0) {
357 $this->column[$key]['text'] = $this->lng->txt("points") . "&nbsp;(" . $this->totalPoints . ")";
358 } elseif (strcmp($column['text'], $this->lng->txt("working_time")) == 0) {
359 $this->column[$key]['text'] = $this->lng->txt("working_time") . "&nbsp;(" . $this->totalWorkingTime . ")";
360 }
361 }
362 parent::fillHeader();
363 }
364
372 public function fillRow($data)
373 {
374 global $DIC;
375 $ilUser = $DIC['ilUser'];
376 $ilAccess = $DIC['ilAccess'];
377 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
378 include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
379 $class = strtolower(assQuestionGUI::_getGUIClassNameForId($data["question_id"]));
380 $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $data["question_id"]);
381 $this->ctrl->setParameterByClass("ilAssQuestionPreviewGUI", "q_id", $data["question_id"]);
382 $this->ctrl->setParameterByClass($class, "q_id", $data["question_id"]);
383 $points = 0;
384
385 $actions = new ilAdvancedSelectionListGUI();
386 $actions->setId('qst' . $data["question_id"]);
387 $actions->setListTitle($this->lng->txt('actions'));
388
389 if (!$this->confirmdelete) {
390 $this->tpl->setCurrentBlock('checkbox');
391 $this->tpl->setVariable('CB_QUESTION_ID', $data["question_id"]);
392 $this->tpl->parseCurrentBlock();
393
394 if ($data["complete"] == 0) {
395 $this->tpl->setCurrentBlock("qpl_warning");
396 $this->tpl->setVariable("IMAGE_WARNING", ilUtil::getImagePath("icon_alert.svg"));
397 $this->tpl->setVariable("ALT_WARNING", $this->lng->txt("warning_question_not_complete"));
398 $this->tpl->setVariable("TITLE_WARNING", $this->lng->txt("warning_question_not_complete"));
399 $this->tpl->parseCurrentBlock();
400 } else {
401 $points = $data["points"];
402 $this->totalWorkingTime = assQuestion::sumTimesInISO8601FormatH_i_s_Extended($this->totalWorkingTime, $data['working_time']);
403 }
404 $this->totalPoints += $points;
405
406 foreach ($this->getSelectedColumns() as $c) {
407 if (strcmp($c, 'points') == 0) {
408 $this->tpl->setCurrentBlock('points');
409 $this->tpl->setVariable("QUESTION_POINTS", $points);
410 $this->tpl->parseCurrentBlock();
411 }
412 if (strcmp($c, 'statistics') == 0) {
413 $this->tpl->setCurrentBlock('statistics');
414 $this->tpl->setVariable("LINK_ASSESSMENT", $this->ctrl->getLinkTargetByClass($class, "assessment"));
415 $this->tpl->setVariable("TXT_ASSESSMENT", $this->lng->txt("statistics"));
416 include_once "./Services/Utilities/classes/class.ilUtil.php";
417 $this->tpl->setVariable("IMG_ASSESSMENT", ilUtil::getImagePath("assessment.gif", "Modules/TestQuestionPool"));
418 $this->tpl->parseCurrentBlock();
419 }
420 if (strcmp($c, 'author') == 0) {
421 $this->tpl->setCurrentBlock('author');
422 $this->tpl->setVariable("QUESTION_AUTHOR", $data["author"]);
423 $this->tpl->parseCurrentBlock();
424 }
425 if ($c == 'lifecycle') {
426 $lifecycle = ilAssQuestionLifecycle::getInstance($data['lifecycle']);
427
428 $this->tpl->setCurrentBlock('lifecycle');
429 $this->tpl->setVariable("QUESTION_LIFECYCLE", $lifecycle->getTranslation($this->lng));
430 $this->tpl->parseCurrentBlock();
431 }
432 if ($c == 'comments' && $this->isQuestionCommentingEnabled()) {
433 $this->tpl->setCurrentBlock('comments');
434 $this->tpl->setVariable("COMMENTS", $this->getCommentsHtml($data));
435 $this->tpl->parseCurrentBlock();
436 }
437 if (strcmp($c, 'created') == 0) {
438 $this->tpl->setCurrentBlock('created');
439 $this->tpl->setVariable('QUESTION_CREATED', ilDatePresentation::formatDate(new ilDateTime($data['created'], IL_CAL_UNIX)));
440 $this->tpl->parseCurrentBlock();
441 }
442 if (strcmp($c, 'tstamp') == 0) {
443 $this->tpl->setCurrentBlock('updated');
444 $this->tpl->setVariable('QUESTION_UPDATED', ilDatePresentation::formatDate(new ilDateTime($data['tstamp'], IL_CAL_UNIX)));
445 $this->tpl->parseCurrentBlock();
446 }
447 if (strcmp($c, 'working_time') == 0) {
448 $this->tpl->setCurrentBlock('working_time');
449 $this->tpl->setVariable('WORKING_TIME', $data["working_time"]);
450 $this->tpl->parseCurrentBlock();
451 }
452 }
453
454 $actions->addItem($this->lng->txt('preview'), '', $this->ctrl->getLinkTargetByClass('ilAssQuestionPreviewGUI', ilAssQuestionPreviewGUI::CMD_SHOW));
455 if ($this->getEditable()) {
456 $editHref = $this->ctrl->getLinkTargetByClass($data['type_tag'] . 'GUI', 'editQuestion');
457 $actions->addItem($this->lng->txt('edit_question'), '', $editHref);
458
459 $editPageHref = $this->ctrl->getLinkTargetByClass('ilAssQuestionPageGUI', 'edit');
460 $actions->addItem($this->lng->txt('edit_page'), '', $editPageHref);
461 }
462
463 if ($this->getWriteAccess()) {
464 $this->ctrl->setParameter($this->parent_obj, 'q_id', $data['question_id']);
465 $moveHref = $this->ctrl->getLinkTarget($this->parent_obj, 'move');
466 $this->ctrl->setParameter($this->parent_obj, 'q_id', null);
467 $actions->addItem($this->lng->txt('move'), '', $moveHref);
468
469 $this->ctrl->setParameter($this->parent_obj, 'q_id', $data['question_id']);
470 $copyHref = $this->ctrl->getLinkTarget($this->parent_obj, 'copy');
471 $this->ctrl->setParameter($this->parent_obj, 'q_id', null);
472 $actions->addItem($this->lng->txt('copy'), '', $copyHref);
473
474 $this->ctrl->setParameter($this->parent_obj, 'q_id', $data['question_id']);
475 $deleteHref = $this->ctrl->getLinkTarget($this->parent_obj, 'deleteQuestions');
476 $this->ctrl->setParameter($this->parent_obj, 'q_id', null);
477 $actions->addItem($this->lng->txt('delete'), '', $deleteHref);
478 }
479
480 if ($this->getEditable()) {
481 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
482 $this->ctrl->setParameterByClass('ilAssQuestionFeedbackEditingGUI', 'q_id', $data['question_id']);
483 $feedbackHref = $this->ctrl->getLinkTargetByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW);
484 $this->ctrl->setParameterByClass('ilAssQuestionFeedbackEditingGUI', 'q_id', null);
485 $actions->addItem($this->lng->txt('tst_feedback'), '', $feedbackHref);
486
487 $this->ctrl->setParameterByClass('ilAssQuestionHintsGUI', 'q_id', $data['question_id']);
488 $hintsHref = $this->ctrl->getLinkTargetByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
489 $this->ctrl->setParameterByClass('ilAssQuestionHintsGUI', 'q_id', null);
490 $actions->addItem($this->lng->txt('tst_question_hints_tab'), '', $hintsHref);
491 }
492
493 if ($this->isQuestionCommentingEnabled()) {
494 $actions->addItem(
495 $this->lng->txt('ass_comments'),
496 'comments',
497 '',
498 '',
499 '',
500 '',
501 '',
502 '',
503 $this->getCommentsAjaxLink($data['question_id'])
504 );
505 }
506 } else {
507 $this->tpl->setCurrentBlock('hidden');
508 $this->tpl->setVariable('HIDDEN_QUESTION_ID', $data["question_id"]);
509 $this->tpl->parseCurrentBlock();
510 }
511
512 foreach ($this->getSelectedColumns() as $c) {
513 if (strcmp($c, 'description') == 0) {
514 $this->tpl->setCurrentBlock('description');
515 $this->tpl->setVariable("QUESTION_COMMENT", (strlen($data["description"])) ? $data["description"] : "&nbsp;");
516 $this->tpl->parseCurrentBlock();
517 }
518 if (strcmp($c, 'type') == 0) {
519 $this->tpl->setCurrentBlock('type');
520 $this->tpl->setVariable("QUESTION_TYPE", assQuestion::_getQuestionTypeName($data["type_tag"]));
521 $this->tpl->parseCurrentBlock();
522 }
523 }
524 $this->tpl->setVariable('QUESTION_ID', $data["question_id"]);
525 if (!$this->confirmdelete) {
526 $this->tpl->setVariable('QUESTION_HREF_LINKED', $this->ctrl->getLinkTargetByClass('ilAssQuestionPreviewGUI', ilAssQuestionPreviewGUI::CMD_SHOW));
527 $this->tpl->setVariable('QUESTION_TITLE_LINKED', $data['title']);
528 $this->tpl->setVariable('ACTIONS', $actions->getHTML());
529 } else {
530 $this->tpl->setVariable('QUESTION_ID_UNLINKED', $data['question_id']);
531 $this->tpl->setVariable('QUESTION_TITLE_UNLINKED', $data['title']);
532 }
533 }
534
535 public function setEditable($value)
536 {
537 $this->editable = $value;
538 }
539
540 public function getEditable()
541 {
542 return $this->editable;
543 }
544
545 public function setWriteAccess($value)
546 {
547 $this->writeAccess = $value;
548 }
549
550 public function getWriteAccess()
551 {
552 return $this->writeAccess;
553 }
554
559 public function numericOrdering($column)
560 {
561 if (in_array($column, array('points', 'created', 'tstamp', 'comments'))) {
562 return true;
563 }
564
565 return false;
566 }
567
568 protected function getCommentsHtml($qData)
569 {
570 if (!$qData['comments']) {
571 return '';
572 }
573
574 $ajaxLink = $this->getCommentsAjaxLink($qData['question_id']);
575
576 return "<a class='comment' href='#' onclick=\"return " . $ajaxLink . "\">
577 <img src='" . ilUtil::getImagePath("comment_unlabeled.svg")
578 . "' alt='{$qData['comments']}'><span class='ilHActProp'>{$qData['comments']}</span></a>";
579 }
580
581 protected function getCommentsAjaxLink($questionId)
582 {
583 $ajax_hash = ilCommonActionDispatcherGUI::buildAjaxHash(1, $_GET['ref_id'], 'quest', $this->parent_obj->object->getId(), 'quest', $questionId);
584 return ilNoteGUI::getListCommentsJSCall($ajax_hash, '');
585 }
586}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_UNIX
const IL_NOTE_PUBLIC
Definition: class.ilNote.php:6
static _getGUIClassNameForId($a_q_id)
static sumTimesInISO8601FormatH_i_s_Extended($time1, $time2)
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
User interface class for advanced drop-down selection lists.
const CMD_SHOW_LIST
command constants
This class represents a checkbox property in a property form.
static buildAjaxHash( $a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type=null, $a_sub_id=null, $a_news_id=0)
Build ajax hash.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
static initJavascript($a_ajax_url, $a_type=IL_NOTE_PRIVATE, ilGlobalTemplateInterface $a_main_tpl=null)
Init javascript.
static getListCommentsJSCall($a_hash, $a_update_code=null)
Get list comments js call.
static _getNotesOfObject( $a_rep_obj_id, $a_obj_id, $a_obj_type, $a_type=IL_NOTE_PRIVATE, $a_incl_sub=false, $a_filter="", $a_all_public="y", $a_repository_mode=true, $a_sort_ascending=false, $a_news_id=0)
get all notes related to a specific object
static _getQuestionTypes($all_tags=false, $fixOrder=false, $withDeprecatedTypes=true)
setQuestionCommentingEnabled(bool $questionCommentingEnabled)
__construct($a_parent_obj, $a_parent_cmd, $a_write_access=false, $confirmdelete=false, $taxIds=array(), $enableCommenting=false)
Constructor.
getSelectableColumns()
Get selectable columns.
This class represents a selection list property in a property form.
ILIAS Setting Class.
Class ilTable2GUI.
getSelectedColumns()
Get selected columns.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
setData($a_data)
set table data @access public
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
setId($a_val)
Set id.
setFormName($a_formname="")
Set Form name.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
disable($a_module_name)
diesables particular modules of table
setStyle($a_element, $a_style)
enable($a_module_name)
enables particular modules of table
Select taxonomy nodes input GUI.
This class represents a text property in a property form.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$ilUser
Definition: imgupload.php:18
$DIC
Definition: xapitoken.php:46
$cols
Definition: xhr_table.php:11