4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
5 require_once
'Services/Form/classes/class.ilNumberInputGUI.php';
46 $this->
setId(
'tst_skl_lev_thr_' . $testId);
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'); 70 $this->lng->txt(
'tst_save_thresholds')
76 $this->
addColumn($this->lng->txt(
'tst_competence'),
'competence',
'50%');
79 $this->
addColumn($this->lng->txt(
'tst_num_questions'),
'',
'10%');
80 $this->
addColumn($this->lng->txt(
'tst_max_comp_points'),
'',
'10%');
83 $this->
addColumn($this->lng->txt(
'tst_level'),
'',
'10%');
84 $this->
addColumn($this->lng->txt(
'tst_threshold'),
'',
'10%');
89 $skill =
$data[
'skill'];
90 $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();
107 $this->tpl->setCurrentBlock(
'tbl_content');
109 for (
$i = 0, $max = count($levels);
$i < $max;
$i++) {
110 $level = $levels[
$i];
112 $this->tpl->setVariable(
'LEVEL', $level[
'title']);
115 $data[
'skill_base_id'],
116 $data[
'skill_tref_id'],
120 if (
$i < ($max - 1)) {
121 $this->tpl->parseCurrentBlock();
122 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
123 $this->tpl->setVariable(
"CSS_NO_BORDER",
'ilBorderlessRow');
134 return 'threshold_' . $row[
'skill_base_id'] .
':' . $row[
'skill_tref_id'];
139 if ($numLevels == 0) {
156 if (!in_array($id, $idFilter)) {
160 $skill = $data[
'skill'];
161 $levels = $skill->getLevelData();
162 for (
$i = 0, $max = count($levels);
$i < $max;
$i++) {
163 $level = $levels[
$i];
166 $data[
'skill_base_id'],
167 $data[
'skill_tref_id'],
184 $skillKey = $skillBaseId .
':' . $skillTrefId;
186 if (isset($this->input_elements_by_id[$skillKey][$skillLevelId])) {
187 return $this->input_elements_by_id[$skillKey][$skillLevelId];
190 $threshold = $this->skillLevelThresholdList->getThreshold($skillBaseId, $skillTrefId, $skillLevelId);
192 $thresholdValue = $threshold->getThreshold();
194 $thresholdValue =
'';
197 $value =
new ilNumberInputGUI(
'',
'threshold_' . $skillKey .
'_' . $skillLevelId);
198 $value->setValue($thresholdValue);
200 $value->setMinValue(0);
201 $value->setMaxValue(100);
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;
214 foreach (
$rows as $key => $row) {
216 $row[
'skill']->
getId(),
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)
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
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.
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(Container $dic, ilPlugin $plugin)
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