4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
5 require_once
'Services/Skill/classes/class.ilBasicSkill.php';
6 require_once
'Services/Form/classes/class.ilNumberInputGUI.php';
47 parent::__construct($parentOBJ, $parentCmd);
52 $this->lng->loadLanguageModule(
'form');
54 $this->
setStyle(
'table',
'fullwidth');
56 $this->
setRowTemplate(
"tpl.tst_skl_thresholds_row.html",
"Modules/Test");
59 #$this->disable('sort'); 74 $this->
addColumn($this->lng->txt(
'tst_competence'),
'competence',
'50%');
78 $this->
addColumn($this->lng->txt(
'tst_num_questions'),
'',
'10%');
79 $this->
addColumn($this->lng->txt(
'tst_max_comp_points'),
'',
'10%');
82 $this->
addColumn($this->lng->txt(
'tst_level'),
'',
'10%');
83 $this->
addColumn($this->lng->txt(
'tst_threshold'),
'',
'10%');
88 $skill =
$data[
'skill'];
89 $levels = $skill->getLevelData();
93 $this->tpl->setCurrentBlock(
'quest_assign_info');
94 $this->tpl->setVariable(
'ROWSPAN', $this->
getRowspan(count($levels)));
95 $this->tpl->setVariable(
'NUM_QUESTIONS',
$data[
'num_assigns']);
96 $this->tpl->setVariable(
'MAX_COMP_POINTS',
$data[
'max_points']);
97 $this->tpl->parseCurrentBlock();
100 $this->tpl->setCurrentBlock(
'competence');
101 $this->tpl->setVariable(
'ROWSPAN', $this->
getRowspan(count($levels)));
102 $this->tpl->setVariable(
'COMPETENCE',
$data[
'competence']);
103 $this->tpl->parseCurrentBlock();
105 $this->tpl->setCurrentBlock(
'tbl_content');
107 for($i = 0, $max = count($levels); $i < $max; $i++)
109 $level = $levels[$i];
111 $this->tpl->setVariable(
'LEVEL', $level[
'title']);
114 $data[
'skill_base_id'],
$data[
'skill_tref_id'], $level[
'id']
117 if( $i < ($max - 1) )
119 $this->tpl->parseCurrentBlock();
120 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
121 $this->tpl->setVariable(
"CSS_NO_BORDER",
'ilBorderlessRow');
145 $skill = $data[
'skill'];
146 $levels = $skill->getLevelData();
147 for($i = 0, $max = count($levels); $i < $max; $i++)
149 $level = $levels[$i];
152 $data[
'skill_base_id'], $data[
'skill_tref_id'], $level[
'id']
168 $skillKey = $skillBaseId.
':'.$skillTrefId;
170 if(isset($this->input_elements_by_id[$skillKey][$skillLevelId]))
172 return $this->input_elements_by_id[$skillKey][$skillLevelId];
175 $threshold = $this->skillLevelThresholdList->getThreshold($skillBaseId, $skillTrefId, $skillLevelId);
178 $thresholdValue = $threshold->getThreshold();
182 $thresholdValue =
'';
185 $value =
new ilNumberInputGUI(
'',
'threshold_'. $skillKey .
'_' . $skillLevelId);
186 $value->setValue($thresholdValue);
188 $value->setMinValue(0);
190 if(!isset($this->input_elements_by_id[$skillKey]))
192 $this->input_elements_by_id[$skillKey] =
array();
195 $this->input_elements_by_id[$skillKey][$skillLevelId] = $value;
202 foreach($rows as $key =>
$row)
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
areQuestionAssignmentColumnsEnabled()
This class provides processing control methods.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
buildThresholdInput($skillBaseId, $skillTrefId, $skillLevelId)
setStyle($a_element, $a_style)
getSkillLevelThresholdList()
completeCompetenceTitles($rows)
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
getFormAction($a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.
enable($a_module_name)
enables particular modules of table
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
render()
render table public
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
setQuestionAssignmentColumnsEnabled($questionAssignmentColumnsEnabled)
setSkillLevelThresholdList(ilTestSkillLevelThresholdList $skillLevelThresholdList)
__construct($parentOBJ, $parentCmd, ilCtrl $ctrl, ilLanguage $lng)
const CMD_SAVE_SKILL_THRESHOLDS
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.
$questionAssignmentColumnsEnabled