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");
75 $this->
setFormAction($this->ctrl->getFormAction($this->parent_obj));
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++)
117 $assignment = $assignments[$i];
119 $this->tpl->setCurrentBlock(
'actions_col');
121 $this->tpl->parseCurrentBlock();
123 $this->tpl->setCurrentBlock(
'tbl_content');
125 $this->tpl->setVariable(
'COMPETENCE', $assignment->getSkillTitle());
126 $this->tpl->setVariable(
'COMPETENCE_PATH', $assignment->getSkillPath());
135 $this->tpl->setVariable(
'SKILL_POINTS', $assignment->getMaxSkillPoints());
140 $this->tpl->parseCurrentBlock();
142 $this->tpl->setCurrentBlock(
'tbl_content');
143 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
149 $this->tpl->setCurrentBlock(
'actions_col');
151 $this->tpl->parseCurrentBlock();
153 $this->tpl->setCurrentBlock(
'tbl_content');
155 elseif( !$numAssigns )
157 $this->tpl->setCurrentBlock(
'actions_col');
158 $this->tpl->setVariable(
'ACTION',
' ');
159 $this->tpl->parseCurrentBlock();
161 $this->tpl->setCurrentBlock(
'tbl_content');
167 $cnt = count($assignments);
184 $href = $this->ctrl->getLinkTarget(
188 $label = $this->lng->txt(
'tst_manage_competence_assigns');
195 $this->ctrl->setParameter($this->parent_obj,
'skill_base_id', $assignment->
getSkillBaseId());
196 $this->ctrl->setParameter($this->parent_obj,
'skill_tref_id', $assignment->
getSkillTrefId());
198 $href = $this->ctrl->getLinkTarget(
204 $label = $this->lng->txt(
'tst_edit_competence_assign');
208 $label = $this->lng->txt(
'tst_view_competence_assign');
211 $this->ctrl->setParameter($this->parent_obj,
'skill_base_id', null);
212 $this->ctrl->setParameter($this->parent_obj,
'skill_tref_id', null);
219 return "<a href=\"{$href}\" title=\"{$label}\">{$label}</a>";
226 foreach($assignments as $assignment)
228 $this->ctrl->setParameter($this->parent_obj,
'skill_base_id', $assignment->getSkillBaseId());
229 $this->ctrl->setParameter($this->parent_obj,
'skill_tref_id', $assignment->getSkillTrefId());
231 $href = $this->ctrl->getLinkTarget(
232 $this->parent_obj, ilAssQuestionSkillAssignmentsGUI::CMD_REMOVE_SKILL_QUEST_ASSIGN
235 $label = $this->lng->txt(
'tst_remove_competence');
240 $href = $this->ctrl->getLinkTarget(
244 $label = $this->lng->txt(
'tst_assign_competence');
247 return implode(
'<br />', $actions);
254 return $this->lng->txt(
'qpl_skill_point_eval_mode_solution_compare');
257 return $this->lng->txt(
'qpl_skill_point_eval_mode_quest_result');
262 $assignmentKey = implode(
':',
array(
275 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.
Create styles array
The data for the language used.
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)