/** * @global ilCtrl $ilCtrl * @global ilLanguage $lng * @param array $row */ public function fillRow($row) { /** * @var $ilCtrl ilCtrl */ global $ilCtrl; $this->tpl->setVariable('VAL_NAME', $row['participant']->getName()); $reached_points = new ilNumberInputGUI('', 'scoring[' . $row['pass_id'] . '][' . $row['active_id'] . '][' . $row['qst_id'] . ']'); $reached_points->allowDecimals(true); $reached_points->setSize(5); if (count($this->manPointsPostData)) { if ($this->isMaxPointsExceededByPostValue($row['pass_id'], $row['active_id'], $row['qst_id'])) { $reached_points->setAlert(sprintf($this->lng->txt('tst_manscoring_maxpoints_exceeded_input_alert'), $row['maximum_points'])); $this->tpl->setCurrentBlock("reached_points_alert"); $this->tpl->setVariable("REACHED_POINTS_IMG_ALERT", ilUtil::getImagePath("icon_alert.svg")); $this->tpl->setVariable("REACHED_POINTS_ALT_ALERT", $this->lng->txt("alert")); $this->tpl->setVariable("REACHED_POINTS_TXT_ALERT", $reached_points->getAlert()); $this->tpl->parseCurrentBlock(); } $reached_points->setValue($this->manPointsPostData[$row['pass_id']][$row['active_id']][$row['qst_id']]); } else { $reached_points->setValue($row['reached_points']); } $this->tpl->setVariable('VAL_REACHED_POINTS', $reached_points->render()); $this->tpl->setVariable('VAL_ID', md5($row['pass_id'] . $row['active_id'] . $row['qst_id'])); $ilCtrl->setParameter($this->getParentObject(), 'qst_id', $row['qst_id']); $ilCtrl->setParameter($this->getParentObject(), 'active_id', $row['active_id']); $ilCtrl->setParameter($this->getParentObject(), 'pass_id', $row['pass_id']); $this->tpl->setVariable('VAL_LINK_ANSWER', $ilCtrl->getLinkTarget($this->getParentObject(), 'getAnswerDetail', '', true, false)); $ilCtrl->setParameter($this->getParentObject(), 'qst_id', ''); $ilCtrl->setParameter($this->getParentObject(), 'active_id', ''); $ilCtrl->setParameter($this->getParentObject(), 'pass_id', ''); $this->tpl->setVariable('VAL_TXT_ANSWER', $this->lng->txt('tst_eval_show_answer')); }