ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilTestPersonalDefaultSettingsTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/Table/classes/class.ilTable2GUI.php';
5
10{
11 public function __construct($parentObj, $cmd)
12 {
16 global $ilCtrl;
17
18 $this->setId('tst_pers_def_set_' . $parentObj->object->getId());
19
20 parent::__construct($parentObj, $cmd);
21
22 $this->setTitle($this->lng->txt('tst_defaults_available'));
23 $this->setNoEntriesText($this->lng->txt('tst_defaults_not_defined'));
24 $this->setFormAction($ilCtrl->getFormAction($parentObj, $cmd));
25
26 $this->setRowTemplate('tpl.il_as_tst_defaults_row.html', 'Modules/Test');
27
28 $this->setShowRowsSelector(true);
29 $this->setSelectAllCheckbox('chb_defaults');
30 $this->setFormName('formDefaults');
31 $this->addMultiCommand('deleteDefaults', $this->lng->txt('delete'));
32 $this->addMultiCommand('applyDefaults', $this->lng->txt('apply_def_settings_to_tst'));
33 $this->initColumns();
34 }
35
39 private function initColumns()
40 {
41 $this->addColumn('', '', '1px', true);
42 $this->addColumn($this->lng->txt('title'), 'name', '80%');
43 $this->addColumn($this->lng->txt('date'), 'tstamp', '19%');
44 }
45
49 public function fillRow(array $row)
50 {
51 parent::fillRow(array(
52 'name' => $row['name'],
53 'checkbox' => ilUtil::formCheckbox(false, 'chb_defaults[]', $row['test_defaults_id']),
55 ));
56 }
57
61 public function numericOrdering($field)
62 {
63 return in_array($field, array(
64 'tstamp'
65 ));
66 }
67}
const IL_CAL_UNIX
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
Class ilTable2GUI.
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.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setNoEntriesText($a_text)
Set text for an empty table.
__construct($a_parent_obj, $a_parent_cmd="", $a_template_context="")
Constructor.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setFormName($a_formname)
Set Form name.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public
global $ilCtrl
Definition: ilias.php:18
$cmd
Definition: sahs_server.php:35