/** * @param array $row */ public function fillRow(array $row) { /** * @var $ilCtrl ilCtrl */ global $ilCtrl; if ($this->getParentObject()->isCRUDContext()) { $row['chb'] = ilUtil::formCheckbox(false, 'unit_ids[]', $row['unit_id']); $sequence = new ilNumberInputGUI('', 'sequence[' . $row['unit_id'] . ']'); $sequence->setValue($this->position++ * 10); $sequence->setMinValue(0); $sequence->setSize(3); $row['sequence'] = $sequence->render(); $action = new ilAdvancedSelectionListGUI(); $action->setId('asl_content_' . $row['unit_id']); $action->setAsynch(false); $action->setListTitle($this->lng->txt('actions')); $ilCtrl->setParameter($this->getParentObject(), 'unit_id', $row['unit_id']); $action->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitModificationForm')); $action->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmDeleteUnit')); $ilCtrl->setParameter($this->getParentObject(), 'unit_id', ''); $row['actions'] = $action->getHtml(); } if ($row['unit_id'] == $row['baseunit_id']) { $row['baseunit'] = ''; } parent::fillRow($row); }
/** * @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')); }
/** * @param array $row */ public function fillRow(array $row) { $short_name = new ilTextInputGUI('', 'mark_short_' . $row['mark_id']); $short_name->setValue($row['mark_short']); $short_name->setDisabled(!$this->is_editable); $short_name->setSize(10); $official_name = new ilTextInputGUI('', 'mark_official_' . $row['mark_id']); $official_name->setSize(20); $official_name->setDisabled(!$this->object->canEditMarks()); $official_name->setValue($row['mark_official']); $percentage = new ilNumberInputGUI('', 'mark_percentage_' . $row['mark_id']); $percentage->allowDecimals(true); $percentage->setValue($row['mark_percentage']); $percentage->setSize(10); $percentage->setDisabled(!$this->is_editable); $percentage->setMinValue(0); $percentage->setMaxValue(100); $this->tpl->setVariable('VAL_MARK_ID', $row['mark_id']); $this->tpl->setVariable('VAL_CHECKBOX', ilUtil::formCheckbox(false, 'marks[]', $row['mark_id'], !$this->is_editable)); $this->tpl->setVariable('VAL_SHORT_NAME', $short_name->render()); $this->tpl->setVariable('VAL_OFFICIAL_NAME', $official_name->render()); $this->tpl->setVariable('VAL_PERCENTAGE', $percentage->render()); $this->tpl->setVariable('VAL_PASSED_CHECKBOX', ilUtil::formCheckbox((bool) $row['mark_passed'], 'passed_' . $row['mark_id'], '1', !$this->is_editable)); }