当前位置: 首页>>代码示例>>PHP>>正文


PHP ilNumberInputGUI::render方法代码示例

本文整理汇总了PHP中ilNumberInputGUI::render方法的典型用法代码示例。如果您正苦于以下问题:PHP ilNumberInputGUI::render方法的具体用法?PHP ilNumberInputGUI::render怎么用?PHP ilNumberInputGUI::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilNumberInputGUI的用法示例。


在下文中一共展示了ilNumberInputGUI::render方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fillRow

 /**
  * @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);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:31,代码来源:class.ilUnitTableGUI.php

示例2: fillRow

 /**
  * @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'));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilTestManScoringParticipantsBySelectedQuestionAndPassTableGUI.php

示例3: fillRow

 /**
  * @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));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:27,代码来源:class.ilMarkSchemaTableGUI.php


注:本文中的ilNumberInputGUI::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。