44 $this->skillQuestionAssignmentList = $assignmentList;
68 $this->
setId(
'assQstSkl');
73 $this->
setStyle(
'table',
'fullwidth');
75 $this->
setRowTemplate(
"tpl.tst_skl_qst_assignment_row.html",
"Modules/Test");
82 public function init(): void
97 $this->
addColumn($this->
lng->txt(
'tst_question'),
'question',
'25%');
98 $this->
addColumn($this->
lng->txt(
'tst_competence'),
'competence',
'');
99 $this->
addColumn($this->
lng->txt(
'tst_comp_eval_mode'),
'eval_mode',
'13%');
100 $this->
addColumn($this->
lng->txt(
'tst_comp_points'),
'points',
'12%');
101 $this->
addColumn($this->
lng->txt(
'actions'),
'actions',
'20%');
106 $assignments = $this->skillQuestionAssignmentList->getAssignmentsByQuestionId($a_set[
'question_id']);
108 $this->
ctrl->setParameter($this->parent_obj,
'question_id', $a_set[
'question_id']);
110 $this->tpl->setCurrentBlock(
'question_title');
111 $this->tpl->setVariable(
'ROWSPAN', $this->
getRowspan($assignments));
112 $this->tpl->setVariable(
'QUESTION_TITLE', $a_set[
'title']);
113 $this->tpl->setVariable(
'QUESTION_DESCRIPTION', $a_set[
'description']);
114 $this->tpl->parseCurrentBlock();
116 $this->tpl->setCurrentBlock(
'tbl_content');
118 for ($i = 0, $numAssigns = count($assignments); $i < $numAssigns; $i++) {
120 $assignment = $assignments[$i];
122 $this->tpl->setCurrentBlock(
'actions_col');
124 $this->tpl->parseCurrentBlock();
126 $this->tpl->setCurrentBlock(
'tbl_content');
128 $this->tpl->setVariable(
'COMPETENCE', $assignment->getSkillTitle());
129 $this->tpl->setVariable(
'COMPETENCE_PATH', $assignment->getSkillPath());
131 $this->tpl->setVariable(
'SKILL_POINTS', $assignment->getMaxSkillPoints());
134 $this->tpl->parseCurrentBlock();
136 $this->tpl->setCurrentBlock(
'tbl_content');
137 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
142 $this->tpl->setCurrentBlock(
'actions_col');
144 $this->tpl->parseCurrentBlock();
146 $this->tpl->setCurrentBlock(
'tbl_content');
147 } elseif (!$numAssigns) {
148 $this->tpl->setCurrentBlock(
'actions_col');
149 $this->tpl->setVariable(
'ACTION',
' ');
150 $this->tpl->parseCurrentBlock();
152 $this->tpl->setCurrentBlock(
'tbl_content');
158 $cnt = count($assignments);
173 $href = $this->
ctrl->getLinkTarget(
178 $label = $this->
lng->txt(
'tst_manage_competence_assigns');
185 $this->
ctrl->setParameter($this->parent_obj,
'skill_base_id', $assignment->
getSkillBaseId());
186 $this->
ctrl->setParameter($this->parent_obj,
'skill_tref_id', $assignment->
getSkillTrefId());
188 $href = $this->
ctrl->getLinkTarget(
194 $label = $this->
lng->txt(
'tst_edit_competence_assign');
196 $label = $this->
lng->txt(
'tst_view_competence_assign');
199 $this->
ctrl->setParameter($this->parent_obj,
'skill_base_id', null);
200 $this->
ctrl->setParameter($this->parent_obj,
'skill_tref_id', null);
207 return "<a href=\"{$href}\" title=\"{$label}\">{$label}</a>";
232 $href = $this->
ctrl->getLinkTarget(
237 $label = $this->
lng->txt(
'tst_assign_competence');
240 return implode(
'<br />', $actions);
246 return $this->
lng->txt(
'qpl_skill_point_eval_mode_solution_compare');
249 return $this->
lng->txt(
'qpl_skill_point_eval_mode_quest_result');
const CMD_SHOW_SKILL_SELECT
enable(string $a_module_name)
setManipulationsEnabled($manipulationsEnabled)
loadSkillPointsFromRequest($loadSkillPointsFromRequest)
buildActionLink($href, $label)
areManipulationsEnabled()
$skillQuestionAssignmentList
$loadSkillPointsFromRequest
setStyle(string $a_element, string $a_style)
buildActionColumnHTML($assignments)
setSkillQuestionAssignmentList(ilAssQuestionSkillAssignmentList $assignmentList)
__construct($parentOBJ, $parentCmd, ilCtrl $ctrl, ilLanguage $lng)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
getEvalModeLabel(ilAssQuestionSkillAssignment $assignment)
getCompetenceAssignPropertiesFormLink(ilAssQuestionSkillAssignment $assignment)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
disable(string $a_module_name)
getManageCompetenceAssignsActionLink()
const CMD_SHOW_SKILL_QUEST_ASSIGN_PROPERTIES_FORM
setPrefix(string $a_prefix)