4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
26 $this->skillQuestionAssignmentList = $assignmentList;
47 parent::__construct($parentOBJ, $parentCmd);
52 $this->
setId(
'assQstSkl');
55 $this->
setStyle(
'table',
'fullwidth');
57 $this->
setRowTemplate(
"tpl.tst_skl_qst_assignment_row.html",
"Modules/Test");
70 $this->
setFormAction($this->ctrl->getFormAction($this->parent_obj));
80 $this->
addColumn($this->lng->txt(
'tst_question'),
'question',
'25%');
81 $this->
addColumn($this->lng->txt(
'tst_competence'),
'competence',
'');
82 $this->
addColumn($this->lng->txt(
'tst_comp_eval_mode'),
'eval_mode',
'13%');
83 $this->
addColumn($this->lng->txt(
'tst_comp_points'),
'points',
'12%');
84 $this->
addColumn($this->lng->txt(
'actions'),
'actions',
'20%');
89 $assignments = $this->skillQuestionAssignmentList->getAssignmentsByQuestionId($question[
'question_id']);
91 $this->ctrl->setParameter($this->parent_obj,
'question_id', $question[
'question_id']);
93 $this->tpl->setCurrentBlock(
'question_title');
94 $this->tpl->setVariable(
'ROWSPAN', $this->
getRowspan($assignments));
95 $this->tpl->setVariable(
'QUESTION_TITLE', $question[
'title']);
96 $this->tpl->setVariable(
'QUESTION_DESCRIPTION', $question[
'description']);
97 $this->tpl->parseCurrentBlock();
99 $this->tpl->setCurrentBlock(
'tbl_content');
101 for($i = 0, $numAssigns = count($assignments); $i < $numAssigns; $i++)
104 $assignment = $assignments[$i];
106 $this->tpl->setCurrentBlock(
'actions_col');
108 $this->tpl->parseCurrentBlock();
110 $this->tpl->setCurrentBlock(
'tbl_content');
112 $this->tpl->setVariable(
'COMPETENCE', $assignment->getSkillTitle());
113 $this->tpl->setVariable(
'COMPETENCE_PATH', $assignment->getSkillPath());
122 $this->tpl->setVariable(
'SKILL_POINTS', $assignment->getMaxSkillPoints());
127 $this->tpl->parseCurrentBlock();
129 $this->tpl->setCurrentBlock(
'tbl_content');
130 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
136 $this->tpl->setCurrentBlock(
'actions_col');
138 $this->tpl->parseCurrentBlock();
140 $this->tpl->setCurrentBlock(
'tbl_content');
142 elseif( !$numAssigns )
144 $this->tpl->setCurrentBlock(
'actions_col');
145 $this->tpl->setVariable(
'ACTION',
' ');
146 $this->tpl->parseCurrentBlock();
148 $this->tpl->setCurrentBlock(
'tbl_content');
154 $cnt = count($assignments);
171 $href = $this->ctrl->getLinkTarget(
175 $label = $this->lng->txt(
'tst_manage_competence_assigns');
182 $this->ctrl->setParameter($this->parent_obj,
'skill_base_id', $assignment->
getSkillBaseId());
183 $this->ctrl->setParameter($this->parent_obj,
'skill_tref_id', $assignment->
getSkillTrefId());
185 $href = $this->ctrl->getLinkTarget(
191 $label = $this->lng->txt(
'tst_edit_competence_assign');
195 $label = $this->lng->txt(
'tst_view_competence_assign');
198 $this->ctrl->setParameter($this->parent_obj,
'skill_base_id', null);
199 $this->ctrl->setParameter($this->parent_obj,
'skill_tref_id', null);
206 return "<a href=\"{$href}\" title=\"{$label}\">{$label}</a>";
213 foreach($assignments as $assignment)
215 $this->ctrl->setParameter($this->parent_obj,
'skill_base_id', $assignment->getSkillBaseId());
216 $this->ctrl->setParameter($this->parent_obj,
'skill_tref_id', $assignment->getSkillTrefId());
218 $href = $this->ctrl->getLinkTarget(
219 $this->parent_obj, ilAssQuestionSkillAssignmentsGUI::CMD_REMOVE_SKILL_QUEST_ASSIGN
222 $label = $this->lng->txt(
'tst_remove_competence');
227 $href = $this->ctrl->getLinkTarget(
231 $label = $this->lng->txt(
'tst_assign_competence');
234 return implode(
'<br />', $actions);
241 return $this->lng->txt(
'qpl_skill_point_eval_mode_solution_compare');
244 return $this->lng->txt(
'qpl_skill_point_eval_mode_quest_result');
249 $assignmentKey = implode(
':', array(
253 return "<input type\"text\" size=\"2\" name=\"skill_points[{$assignmentKey}]\" value=\"{$assignment->getSkillPoints()}\" />";
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
This class provides processing control methods.
const CMD_SHOW_SKILL_SELECT
setStyle($a_element, $a_style)
setManipulationsEnabled($manipulationsEnabled)
buildActionLink($href, $label)
buildSkillPointsInput(ilAssQuestionSkillAssignment $assignment)
const CMD_SAVE_SKILL_POINTS
areManipulationsEnabled()
$skillQuestionAssignmentList
buildActionColumnHTML($assignments)
setSkillQuestionAssignmentList(ilAssQuestionSkillAssignmentList $assignmentList)
__construct($parentOBJ, $parentCmd, ilCtrl $ctrl, ilLanguage $lng)
enable($a_module_name)
enables particular modules of table
getEvalModeLabel(ilAssQuestionSkillAssignment $assignment)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
getCompetenceAssignPropertiesFormLink(ilAssQuestionSkillAssignment $assignment)
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
getManageCompetenceAssignsActionLink()
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.
const CMD_SHOW_SKILL_QUEST_ASSIGN_PROPERTIES_FORM
isSkillPointInputRequired(ilAssQuestionSkillAssignment $assignment)