4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
5 require_once
'Services/Form/classes/class.ilTextInputGUI.php';
6 require_once
'Services/Form/classes/class.ilNumberInputGUI.php';
44 $this->is_editable = $this->
object->canEditMarks();
46 $this->
setId(
'mark_schema_gui_' . $this->
object->getMarkSchemaForeignId());
47 parent::__construct($parent, $cmd);
49 $this->
setFormAction($this->ctrl->getFormAction($this->getParentObject(), $cmd));
52 $this->
setRowTemplate(
'tpl.il_as_tst_mark_schema_row.html',
'Modules/Test');
56 if ($this->
object->canEditMarks()) {
77 $this->
addColumn($this->lng->txt(
'tst_mark_short_form'),
'');
78 $this->
addColumn($this->lng->txt(
'tst_mark_official_form'),
'');
79 $this->
addColumn($this->lng->txt(
'tst_mark_minimum_level'),
'');
80 $this->
addColumn($this->lng->txt(
'tst_mark_passed'),
'',
'1');
88 $this->
object->getMarkSchema()->sort();
92 $marks = $this->
object->getMarkSchema()->getMarkSteps();
93 foreach ($marks as
$key => $value) {
96 'mark_short' => $value->getShortName(),
97 'mark_official' => $value->getOfficialName(),
98 'mark_percentage' => $value->getMinimumLevel(),
99 'mark_passed' => $value->getPassed() ? 1 : 0
112 $short_name->setValue(
$row[
'mark_short']);
113 $short_name->setDisabled(!$this->is_editable);
114 $short_name->setSize(10);
117 $official_name->setSize(20);
118 $official_name->setDisabled(!$this->
object->canEditMarks());
119 $official_name->setValue(
$row[
'mark_official']);
122 $percentage->allowDecimals(
true);
123 $percentage->setValue(
$row[
'mark_percentage']);
124 $percentage->setSize(10);
125 $percentage->setDisabled(!$this->is_editable);
126 $percentage->setMinValue(0);
127 $percentage->setMaxValue(100);
129 $this->tpl->setVariable(
'VAL_MARK_ID',
$row[
'mark_id']);
130 $this->tpl->setVariable(
'VAL_CHECKBOX',
ilUtil::formCheckbox(
false,
'marks[]',
$row[
'mark_id'], !$this->is_editable));
131 $this->tpl->setVariable(
'VAL_SHORT_NAME', $short_name->render());
132 $this->tpl->setVariable(
'VAL_OFFICIAL_NAME', $official_name->render());
133 $this->tpl->setVariable(
'VAL_PERCENTAGE', $percentage->render());
134 $this->tpl->setVariable(
'VAL_PASSED_CHECKBOX',
ilUtil::formCheckbox((
bool)
$row[
'mark_passed'],
'passed_' . $row[
'mark_id'],
'1', !$this->is_editable));
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
__construct($a_parent_obj, $a_parent_cmd="", $a_template_context="")
ilTable2GUI constructor.
setNoEntriesText($a_text)
Set text for an empty table.
addMultiCommand($a_cmd, $a_text)
Add Command button.
This class represents a text property in a property form.
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.
disable($a_module_name)
diesables particular modules of table
Create new PHPExcel object
obj_idprivate
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.
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
setLimit($a_limit=0, $a_default_limit=0)