public function fillRow($question) { $assignments = $this->skillQuestionAssignmentList->getAssignmentsByQuestionId($question['question_id']); $this->ctrl->setParameter($this->parent_obj, 'question_id', $question['question_id']); $this->tpl->setCurrentBlock('question_title'); $this->tpl->setVariable('ROWSPAN', $this->getRowspan($assignments)); $this->tpl->setVariable('QUESTION', $question['title']); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock('tbl_content'); for ($i = 0, $max = count($assignments); $i < $max; $i++) { $assignment = $assignments[$i]; $this->tpl->setVariable('COMPETENCE', $assignment->getSkillTitle()); $this->tpl->setVariable('COMPETENCE_PATH', $assignment->getSkillPath()); $this->tpl->setVariable('QUANTIFIER', $this->buildQuantifierInput($assignment)); $this->tpl->setVariable('ACTION', $this->getRemoveCompetenceActionLink($assignment)); $this->tpl->parseCurrentBlock(); $this->tpl->setVariable("CSS_ROW", $this->css_row); $this->tpl->setVariable("CSS_NO_BORDER", 'ilBorderlessRow'); } $this->tpl->setVariable('ACTION', $this->getAddCompetenceActionLink()); }
private function drawUpSkillPointAccounts() { foreach ($this->questions as $questionId) { $maxTestPoints = $this->maxPointsByQuestion[$questionId]; $reachedTestPoints = $this->reachedPointsByQuestion[$questionId]; $assignments = $this->skillQuestionAssignmentList->getAssignmentsByQuestionId($questionId); foreach ($assignments as $assignment) { $reachedSkillPoints = $this->calculateReachedSkillPoints($assignment->getSkillPoints(), $maxTestPoints, $reachedTestPoints); $this->bookToSkillPointAccount($assignment->getSkillBaseId(), $assignment->getSkillTrefId(), $reachedSkillPoints); } } }