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 $this->
setId(
'tst_skl_lev_thr_' . $testId);
48 parent::__construct($parentOBJ, $parentCmd);
53 $this->lng->loadLanguageModule(
'form');
55 $this->
setStyle(
'table',
'fullwidth');
57 $this->
setRowTemplate(
"tpl.tst_skl_thresholds_row.html",
"Modules/Test");
60 #$this->disable('sort'); 71 $this->lng->txt(
'tst_save_thresholds')
77 $this->
addColumn($this->lng->txt(
'tst_competence'),
'competence',
'50%');
80 $this->
addColumn($this->lng->txt(
'tst_num_questions'),
'',
'10%');
81 $this->
addColumn($this->lng->txt(
'tst_max_comp_points'),
'',
'10%');
84 $this->
addColumn($this->lng->txt(
'tst_level'),
'',
'10%');
85 $this->
addColumn($this->lng->txt(
'tst_threshold'),
'',
'10%');
90 $skill =
$data[
'skill'];
91 $levels = $skill->getLevelData();
94 $this->tpl->setCurrentBlock(
'quest_assign_info');
95 $this->tpl->setVariable(
'ROWSPAN', $this->
getRowspan(count($levels)));
96 $this->tpl->setVariable(
'NUM_QUESTIONS',
$data[
'num_assigns']);
97 $this->tpl->setVariable(
'MAX_COMP_POINTS',
$data[
'max_points']);
98 $this->tpl->parseCurrentBlock();
101 $this->tpl->setCurrentBlock(
'competence');
102 $this->tpl->setVariable(
'ROWSPAN', $this->
getRowspan(count($levels)));
103 $this->tpl->setVariable(
'COMPETENCE',
$data[
'competence']);
104 $this->tpl->parseCurrentBlock();
108 $this->tpl->setCurrentBlock(
'tbl_content');
110 for (
$i = 0, $max = count($levels);
$i < $max;
$i++) {
111 $level = $levels[
$i];
113 $this->tpl->setVariable(
'LEVEL', $level[
'title']);
116 $data[
'skill_base_id'],
117 $data[
'skill_tref_id'],
121 if (
$i < ($max - 1)) {
122 $this->tpl->parseCurrentBlock();
123 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
124 $this->tpl->setVariable(
"CSS_NO_BORDER",
'ilBorderlessRow');
135 return 'threshold_' . $row[
'skill_base_id'] .
':' . $row[
'skill_tref_id'];
140 if ($numLevels == 0) {
157 if (!in_array(
$id, $idFilter)) {
161 $skill = $data[
'skill'];
162 $levels = $skill->getLevelData();
163 for (
$i = 0, $max = count($levels);
$i < $max;
$i++) {
164 $level = $levels[
$i];
167 $data[
'skill_base_id'],
168 $data[
'skill_tref_id'],
185 $skillKey = $skillBaseId .
':' . $skillTrefId;
187 if (isset($this->input_elements_by_id[$skillKey][$skillLevelId])) {
188 return $this->input_elements_by_id[$skillKey][$skillLevelId];
191 $threshold = $this->skillLevelThresholdList->getThreshold($skillBaseId, $skillTrefId, $skillLevelId);
193 $thresholdValue = $threshold->getThreshold();
195 $thresholdValue =
'';
198 $value =
new ilNumberInputGUI(
'',
'threshold_' . $skillKey .
'_' . $skillLevelId);
199 $value->setValue($thresholdValue);
201 $value->setMinValue(0);
203 if (!isset($this->input_elements_by_id[$skillKey])) {
204 $this->input_elements_by_id[$skillKey] =
array();
207 $this->input_elements_by_id[$skillKey][$skillLevelId] = $value;
217 $row[
'skill_tref_id']
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
areQuestionAssignmentColumnsEnabled()
buildUniqueRecordIdentifier(array $row)
This class provides processing control methods.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
buildThresholdInput($skillBaseId, $skillTrefId, $skillLevelId)
addHiddenInput($a_name, $a_value)
Add Hidden Input field.
__construct($parentOBJ, $testId, $parentCmd, ilCtrl $ctrl, ilLanguage $lng)
setStyle($a_element, $a_style)
getSkillLevelThresholdList()
completeCompetenceTitles($rows)
if(!array_key_exists('StateId', $_REQUEST)) $id
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
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)
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.
const CMD_SAVE_SKILL_THRESHOLDS
getInputElements(array $idFilter)
$questionAssignmentColumnsEnabled
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.