4 require_once
'Services/Table/classes/class.ilTable2GUI.php';
31 $this->skillQuestionAssignmentList = $assignmentList;
52 parent::__construct($parentOBJ, $parentCmd);
57 $this->
setId(
'assQstSkl');
60 $this->
setStyle(
'table',
'fullwidth');
62 $this->
setRowTemplate(
"tpl.tst_skl_qst_assignment_row.html",
"Modules/Test");
74 $this->
setFormAction($this->ctrl->getFormAction($this->parent_obj));
78 $this->lng->txt(
'tst_save_comp_points')
93 $this->
addColumn($this->lng->txt(
'tst_question'),
'question',
'25%');
94 $this->
addColumn($this->lng->txt(
'tst_competence'),
'competence',
'');
95 $this->
addColumn($this->lng->txt(
'tst_comp_eval_mode'),
'eval_mode',
'13%');
96 $this->
addColumn($this->lng->txt(
'tst_comp_points'),
'points',
'12%');
97 $this->
addColumn($this->lng->txt(
'actions'),
'actions',
'20%');
102 $assignments = $this->skillQuestionAssignmentList->getAssignmentsByQuestionId($question[
'question_id']);
104 $this->ctrl->setParameter($this->parent_obj,
'question_id', $question[
'question_id']);
106 $this->tpl->setCurrentBlock(
'question_title');
107 $this->tpl->setVariable(
'ROWSPAN', $this->
getRowspan($assignments));
108 $this->tpl->setVariable(
'QUESTION_TITLE', $question[
'title']);
109 $this->tpl->setVariable(
'QUESTION_DESCRIPTION', $question[
'description']);
110 $this->tpl->parseCurrentBlock();
112 $this->tpl->setCurrentBlock(
'tbl_content');
114 for (
$i = 0, $numAssigns = count($assignments);
$i < $numAssigns;
$i++) {
116 $assignment = $assignments[
$i];
118 $this->tpl->setCurrentBlock(
'actions_col');
120 $this->tpl->parseCurrentBlock();
122 $this->tpl->setCurrentBlock(
'tbl_content');
124 $this->tpl->setVariable(
'COMPETENCE', $assignment->getSkillTitle());
125 $this->tpl->setVariable(
'COMPETENCE_PATH', $assignment->getSkillPath());
131 $this->tpl->setVariable(
'SKILL_POINTS', $assignment->getMaxSkillPoints());
135 $this->tpl->parseCurrentBlock();
137 $this->tpl->setCurrentBlock(
'tbl_content');
138 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
143 $this->tpl->setCurrentBlock(
'actions_col');
145 $this->tpl->parseCurrentBlock();
147 $this->tpl->setCurrentBlock(
'tbl_content');
148 } elseif (!$numAssigns) {
149 $this->tpl->setCurrentBlock(
'actions_col');
150 $this->tpl->setVariable(
'ACTION',
' ');
151 $this->tpl->parseCurrentBlock();
153 $this->tpl->setCurrentBlock(
'tbl_content');
159 $cnt = count($assignments);
174 $href = $this->ctrl->getLinkTarget(
179 $label = $this->lng->txt(
'tst_manage_competence_assigns');
186 $this->ctrl->setParameter($this->parent_obj,
'skill_base_id', $assignment->
getSkillBaseId());
187 $this->ctrl->setParameter($this->parent_obj,
'skill_tref_id', $assignment->
getSkillTrefId());
189 $href = $this->ctrl->getLinkTarget(
195 $label = $this->lng->txt(
'tst_edit_competence_assign');
197 $label = $this->lng->txt(
'tst_view_competence_assign');
200 $this->ctrl->setParameter($this->parent_obj,
'skill_base_id', null);
201 $this->ctrl->setParameter($this->parent_obj,
'skill_tref_id', null);
208 return "<a href=\"{$href}\" title=\"{$label}\">{$label}</a>";
215 foreach ($assignments as $assignment) {
216 $this->ctrl->setParameter($this->parent_obj,
'skill_base_id', $assignment->getSkillBaseId());
217 $this->ctrl->setParameter($this->parent_obj,
'skill_tref_id', $assignment->getSkillTrefId());
219 $href = $this->ctrl->getLinkTarget(
221 ilAssQuestionSkillAssignmentsGUI::CMD_REMOVE_SKILL_QUEST_ASSIGN
224 $label = $this->lng->txt(
'tst_remove_competence');
229 $href = $this->ctrl->getLinkTarget(
234 $label = $this->lng->txt(
'tst_assign_competence');
237 return implode(
'<br />', $actions);
243 return $this->lng->txt(
'qpl_skill_point_eval_mode_solution_compare');
246 return $this->lng->txt(
'qpl_skill_point_eval_mode_quest_result');
251 $assignmentKey = implode(
':', array(
261 return "<input type\"text\" size=\"2\" name=\"skill_points[{$assignmentKey}]\" value=\"{$points}\" />";
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)
loadSkillPointsFromRequest($loadSkillPointsFromRequest)
buildActionLink($href, $label)
buildSkillPointsInput(ilAssQuestionSkillAssignment $assignment)
const CMD_SAVE_SKILL_POINTS
areManipulationsEnabled()
$skillQuestionAssignmentList
$loadSkillPointsFromRequest
buildActionColumnHTML($assignments)
setSkillQuestionAssignmentList(ilAssQuestionSkillAssignmentList $assignmentList)
__construct($parentOBJ, $parentCmd, ilCtrl $ctrl, ilLanguage $lng)
enable($a_module_name)
enables particular modules of table
getEvalModeLabel(ilAssQuestionSkillAssignment $assignment)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
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
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.
getManageCompetenceAssignsActionLink()
const CMD_SHOW_SKILL_QUEST_ASSIGN_PROPERTIES_FORM
isSkillPointInputRequired(ilAssQuestionSkillAssignment $assignment)