本文整理匯總了PHP中ilNumberInputGUI::getAlert方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilNumberInputGUI::getAlert方法的具體用法?PHP ilNumberInputGUI::getAlert怎麽用?PHP ilNumberInputGUI::getAlert使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilNumberInputGUI
的用法示例。
在下文中一共展示了ilNumberInputGUI::getAlert方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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