本文整理汇总了PHP中ilNumberInputGUI::setMinValue方法的典型用法代码示例。如果您正苦于以下问题:PHP ilNumberInputGUI::setMinValue方法的具体用法?PHP ilNumberInputGUI::setMinValue怎么用?PHP ilNumberInputGUI::setMinValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilNumberInputGUI
的用法示例。
在下文中一共展示了ilNumberInputGUI::setMinValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: build
public function build()
{
$this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
$this->setTitle($this->lng->txt('tst_rnd_quest_set_cfg_general_form'));
$this->setId('tstRndQuestSetCfgGeneralForm');
$this->addCommandButton(ilTestRandomQuestionSetConfigGUI::CMD_SAVE_GENERAL_CONFIG_FORM, $this->lng->txt('save'));
// Require Pools with Homogeneous Scored Questions
$requirePoolsQuestionsHomoScored = new ilCheckboxInputGUI($this->lng->txt('tst_inp_all_quest_points_equal_per_pool'), 'quest_points_equal_per_pool');
$requirePoolsQuestionsHomoScored->setInfo($this->lng->txt('tst_inp_all_quest_points_equal_per_pool_desc'));
$requirePoolsQuestionsHomoScored->setChecked($this->questionSetConfig->arePoolsWithHomogeneousScoredQuestionsRequired());
$this->addItem($requirePoolsQuestionsHomoScored);
// question amount config mode (per test / per pool)
$questionAmountConfigMode = new ilRadioGroupInputGUI($this->lng->txt('tst_inp_quest_amount_cfg_mode'), 'quest_amount_cfg_mode');
$questionAmountConfigMode->setValue($this->fetchValidQuestionAmountConfigModeWithFallbackModePerTest($this->questionSetConfig));
$questionAmountConfigModePerTest = new ilRadioOption($this->lng->txt('tst_inp_quest_amount_cfg_mode_test'), ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_TEST);
$questionAmountConfigMode->addOption($questionAmountConfigModePerTest);
$questionAmountConfigModePerPool = new ilRadioOption($this->lng->txt('tst_inp_quest_amount_cfg_mode_pool'), ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_POOL);
$questionAmountConfigMode->addOption($questionAmountConfigModePerPool);
$questionAmountConfigMode->setRequired(true);
$this->addItem($questionAmountConfigMode);
// question amount per test
$questionAmountPerTest = new ilNumberInputGUI($this->lng->txt('tst_inp_quest_amount_per_test'), 'quest_amount_per_test');
$questionAmountPerTest->setRequired(true);
$questionAmountPerTest->setMinValue(0);
$questionAmountPerTest->allowDecimals(false);
$questionAmountPerTest->setMinvalueShouldBeGreater(true);
$questionAmountPerTest->setSize(4);
$questionAmountPerTest->setValue($this->questionSetConfig->getQuestionAmountPerTest());
$questionAmountConfigModePerTest->addSubItem($questionAmountPerTest);
if ($this->testOBJ->participantDataExist()) {
$requirePoolsQuestionsHomoScored->setDisabled(true);
$questionAmountConfigMode->setDisabled(true);
$questionAmountPerTest->setDisabled(true);
}
}
示例3: editQuestion
/**
* Creates an output of the edit form for the question
* @access public
*/
function editQuestion()
{
global $ilDB, $tpl;
$plugin = $this->object->getPlugin();
$this->getQuestionTemplate();
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->outQuestionType());
$form->setMultipart(FALSE);
$form->setTableWidth("100%");
$form->setId("assJSMEQuestion");
// Basiseingabefelder: title, author, description, question, working time (assessment mode)
$this->addBasicQuestionFormProperties($form);
// points
$points = new ilNumberInputGUI($plugin->txt("points"), "points");
$points->setValue($this->object->getPoints());
$points->setRequired(TRUE);
$points->setSize(10);
$points->setMinValue(0.0);
$form->addItem($points);
// optionString for the JSME-Applet
include_once "./Services/Form/classes/class.ilTextInputGUI.php";
$optionString = new ilTextInputGUI($plugin->txt("optionString"), "optionString");
$optionString->setValue($this->object->getOptionString());
$form->addItem($optionString);
// JSME-Applet for sampleSolution
include_once "./Services/Form/classes/class.ilCustomInputGUI.php";
$sampleSolution = new ilCustomInputGUI($plugin->txt("sampleSolution"), "sampleSolution");
$template = $this->getJsmeOutputTemplate("", $this->object->getOptionString(), $this->object->getSampleSolution());
$sampleSolution->setHtml($template->get());
$form->addItem($sampleSolution);
$form->addCommandButton('save', $plugin->txt("save"));
$this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
}
示例4: initAddCodesForm
function initAddCodesForm()
{
global $ilCtrl, $lng;
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form_gui = new ilPropertyFormGUI();
$this->form_gui->setFormAction($ilCtrl->getFormAction($this, 'createCodes'));
$this->form_gui->setTitle($lng->txt('user_account_codes_edit_header'));
$count = new ilNumberInputGUI($lng->txt('user_account_codes_number'), 'acc_codes_number');
$count->setSize(4);
$count->setMaxLength(4);
$count->setMinValue(1);
$count->setMaxValue(1000);
$count->setRequired(true);
$this->form_gui->addItem($count);
$valid = new ilRadioGroupInputGUI($lng->txt('user_account_code_valid_until'), 'valid_type');
$valid->setRequired(true);
$unl = new ilRadioOption($lng->txt('user_account_code_valid_until_unlimited'), 'valid_unlimited');
$valid->addOption($unl);
$st = new ilRadioOption($lng->txt('user_account_code_valid_until_static'), 'valid_static');
$valid->addOption($st);
$dt = new ilDateTimeInputGUI($lng->txt('date'), 'valid_date');
$dt->setRequired(true);
$st->addSubItem($dt);
$dyn = new ilRadioOption($lng->txt('user_account_code_valid_until_dynamic'), 'valid_dynamic');
$valid->addOption($dyn);
$ds = new ilNumberInputGUI($lng->txt('days'), 'valid_days');
$ds->setSize(5);
$ds->setRequired(true);
$dyn->addSubItem($ds);
$this->form_gui->addItem($valid);
$this->form_gui->addCommandButton('createCodes', $lng->txt('create'));
$this->form_gui->addCommandButton('listCodes', $lng->txt('cancel'));
}
示例5: addFieldsToEditForm
protected function addFieldsToEditForm(ilPropertyFormGUI $a_form)
{
// maximum number of characters
$maxchars = new ilNumberInputGUI($this->lng->txt("maxchars"), "maxchars");
$maxchars->setRequired(false);
$maxchars->setSize(5);
$maxchars->setDecimals(0);
$a_form->addItem($maxchars);
// textwidth
$textwidth = new ilNumberInputGUI($this->lng->txt("width"), "textwidth");
$textwidth->setRequired(true);
$textwidth->setSize(3);
$textwidth->setDecimals(0);
$textwidth->setMinValue(10);
$a_form->addItem($textwidth);
// textheight
$textheight = new ilNumberInputGUI($this->lng->txt("height"), "textheight");
$textheight->setRequired(true);
$textheight->setSize(3);
$textheight->setDecimals(0);
$textheight->setMinValue(1);
$a_form->addItem($textheight);
// values
if ($this->object->getMaxChars() > 0) {
$maxchars->setValue($this->object->getMaxChars());
}
$textwidth->setValue($this->object->getTextWidth());
$textheight->setValue($this->object->getTextHeight());
}
示例6: addCustomSettingsToForm
public function addCustomSettingsToForm(ilPropertyFormGUI $a_form)
{
global $lng, $ilSetting;
$num_days = new ilNumberInputGUI($lng->txt('payment_notification_days'), 'payment_notification_days');
$num_days->setSize(3);
$num_days->setMinValue(0);
$num_days->setMaxValue(120);
$num_days->setRequired(true);
$num_days->setValue($ilSetting->get('payment_notification_days'));
$num_days->setInfo($lng->txt('payment_notification_days_desc'));
$a_form->addItem($num_days);
}
示例7: addCustomSettingsToForm
public function addCustomSettingsToForm(ilPropertyFormGUI $a_form)
{
global $lng, $ilSetting;
$lng->loadLanguageModule('dateplaner');
$consultation_days = new ilNumberInputGUI($lng->txt('cal_ch_cron_reminder_days'), 'ch_reminder_days');
$consultation_days->setMinValue(1);
$consultation_days->setMaxLength(2);
$consultation_days->setSize(2);
$consultation_days->setValue($ilSetting->get('ch_reminder_days', 2));
$consultation_days->setRequired(true);
$a_form->addItem($consultation_days);
}
示例8: addFieldsToEditForm
protected function addFieldsToEditForm(ilPropertyFormGUI $a_form)
{
// orientation
$orientation = new ilRadioGroupInputGUI($this->lng->txt("orientation"), "orientation");
$orientation->setRequired(false);
$orientation->addOption(new ilRadioOption($this->lng->txt('vertical'), 0));
$orientation->addOption(new ilRadioOption($this->lng->txt('horizontal'), 1));
$a_form->addItem($orientation);
// minimum answers
$minanswers = new ilCheckboxInputGUI($this->lng->txt("use_min_answers"), "use_min_answers");
$minanswers->setValue(1);
$minanswers->setOptionTitle($this->lng->txt("use_min_answers_option"));
$minanswers->setRequired(FALSE);
$nranswers = new ilNumberInputGUI($this->lng->txt("nr_min_answers"), "nr_min_answers");
$nranswers->setSize(5);
$nranswers->setDecimals(0);
$nranswers->setRequired(false);
$nranswers->setMinValue(1);
$minanswers->addSubItem($nranswers);
$nrmaxanswers = new ilNumberInputGUI($this->lng->txt("nr_max_answers"), "nr_max_answers");
$nrmaxanswers->setSize(5);
$nrmaxanswers->setDecimals(0);
$nrmaxanswers->setRequired(false);
$nrmaxanswers->setMinValue(1);
$minanswers->addSubItem($nrmaxanswers);
$a_form->addItem($minanswers);
// Answers
include_once "./Modules/SurveyQuestionPool/classes/class.ilCategoryWizardInputGUI.php";
$answers = new ilCategoryWizardInputGUI($this->lng->txt("answers"), "answers");
$answers->setRequired(false);
$answers->setAllowMove(true);
$answers->setShowWizard(false);
$answers->setShowSavePhrase(false);
$answers->setUseOtherAnswer(true);
$answers->setShowNeutralCategory(true);
$answers->setNeutralCategoryTitle($this->lng->txt('svy_neutral_answer'));
$answers->setDisabledScale(false);
$a_form->addItem($answers);
// values
$orientation->setValue($this->object->getOrientation());
$minanswers->setChecked($this->object->use_min_answers);
$nranswers->setValue($this->object->nr_min_answers);
$nrmaxanswers->setValue($this->object->nr_max_answers);
if (!$this->object->getCategories()->getCategoryCount()) {
$this->object->getCategories()->addCategory("");
}
$answers->setValues($this->object->getCategories());
}
示例9: addToForm
public function addToForm()
{
$def = $this->getADT()->getCopyOfDefinition();
$number = new ilNumberInputGUI($this->getTitle(), $this->getElementId());
$number->setSize(10);
$min = $def->getMin();
if ($min !== null) {
$number->setMinValue($min);
}
$max = $def->getMax();
if ($max !== null) {
$number->setMaxValue($max);
$length = strlen($max);
$number->setSize($length);
$number->setMaxLength($length);
}
$this->addToParentElement($number);
}
示例10: initConfigurationForm
/**
* Init configuration form
* @global type $ilCtrl
*/
protected function initConfigurationForm()
{
global $ilCtrl, $lng;
$settings = ilFhoevEventSettings::getInstance();
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setTitle($this->getPluginObject()->txt('tbl_fhoev_event_settings'));
$form->setFormAction($ilCtrl->getFormAction($this));
$form->addCommandButton('save', $lng->txt('save'));
$form->setShowTopButtons(false);
$lock = new ilCheckboxInputGUI($this->getPluginObject()->txt('tbl_settings_active'), 'active');
$lock->setValue(1);
$lock->setChecked($settings->isActive());
$form->addItem($lock);
$dtpl = new ilNumberInputGUI($this->getPluginObject()->txt('tbl_settings_dtpl'), 'dtpl');
$dtpl->setSize(8);
$dtpl->setValue($settings->getTemplateId());
$dtpl->setRequired(TRUE);
$dtpl->setMinValue(1);
$form->addItem($dtpl);
return $form;
}
示例11: initPropertiesForm
//.........这里部分代码省略.........
$tut_grp->addOption($tut_grp_crs);
$tut_grp_inv = new ilRadioOption($this->lng->txt("survey_notification_target_group_invited"), ilObjSurvey::NOTIFICATION_INVITED_USERS);
$tut_grp_inv->setInfo(sprintf($this->lng->txt("survey_notification_target_group_invited_info"), $num_inv));
$tut_grp->addOption($tut_grp_inv);
}
// reminders
// reminder - currently not available for 360°
if (!$this->object->get360Mode()) {
$info = new ilFormSectionHeaderGUI();
$info->setTitle($this->lng->txt("svy_settings_section_reminders"));
$form->addItem($info);
$rmd = new ilCheckboxInputGUI($this->lng->txt("survey_reminder_setting"), "rmd");
$rmd->setChecked($this->object->getReminderStatus());
$form->addItem($rmd);
$rmd_start = new ilDateTimeInputGUI($this->lng->txt("survey_reminder_start"), "rmd_start");
$rmd_start->setRequired(true);
$start = $this->object->getReminderStart();
if ($start) {
$rmd_start->setDate($start);
}
$rmd->addSubItem($rmd_start);
$end = $this->object->getReminderEnd();
$rmd_end = new ilDateTimeInputGUI($this->lng->txt("survey_reminder_end"), "rmd_end");
$rmd_end->enableDateActivation("", "rmd_end_tgl", (bool) $end);
if ($end) {
$rmd_end->setDate($end);
}
$rmd->addSubItem($rmd_end);
$rmd_freq = new ilNumberInputGUI($this->lng->txt("survey_reminder_frequency"), "rmd_freq");
$rmd_freq->setRequired(true);
$rmd_freq->setSize(3);
$rmd_freq->setSuffix($this->lng->txt("survey_reminder_frequency_days"));
$rmd_freq->setValue($this->object->getReminderFrequency());
$rmd_freq->setMinValue(1);
$rmd->addSubItem($rmd_freq);
$rmd_grp = new ilRadioGroupInputGUI($this->lng->txt("survey_notification_target_group"), "rmd_grp");
$rmd_grp->setRequired(true);
$rmd_grp->setValue($this->object->getReminderTarget());
$rmd->addSubItem($rmd_grp);
$rmd_grp_crs = new ilRadioOption($this->lng->txt("survey_notification_target_group_parent_course"), ilObjSurvey::NOTIFICATION_PARENT_COURSE);
if (!$has_parent) {
$rmd_grp_crs->setInfo($this->lng->txt("survey_notification_target_group_parent_course_inactive"));
}
$rmd_grp->addOption($rmd_grp_crs);
$rmd_grp_inv = new ilRadioOption($this->lng->txt("survey_notification_target_group_invited"), ilObjSurvey::NOTIFICATION_INVITED_USERS);
$rmd_grp_inv->setInfo(sprintf($this->lng->txt("survey_notification_target_group_invited_info"), $num_inv));
$rmd_grp->addOption($rmd_grp_inv);
}
// results
$results = new ilFormSectionHeaderGUI();
$results->setTitle($this->lng->txt("results"));
$form->addItem($results);
// evaluation access
if (!$this->object->get360Mode()) {
$evaluation_access = new ilRadioGroupInputGUI($this->lng->txt('evaluation_access'), "evaluation_access");
$option = new ilCheckboxOption($this->lng->txt("evaluation_access_off"), ilObjSurvey::EVALUATION_ACCESS_OFF, '');
$option->setInfo($this->lng->txt("svy_evaluation_access_off_info"));
$evaluation_access->addOption($option);
$option = new ilCheckboxOption($this->lng->txt("evaluation_access_all"), ilObjSurvey::EVALUATION_ACCESS_ALL, '');
$option->setInfo($this->lng->txt("svy_evaluation_access_all_info"));
$evaluation_access->addOption($option);
$option = new ilCheckboxOption($this->lng->txt("evaluation_access_participants"), ilObjSurvey::EVALUATION_ACCESS_PARTICIPANTS, '');
$option->setInfo($this->lng->txt("svy_evaluation_access_participants_info"));
$evaluation_access->addOption($option);
$evaluation_access->setValue($this->object->getEvaluationAccess());
$form->addItem($evaluation_access);
示例12: populateQuestionSpecificFormPart
public function populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
{
// shuffle
$shuffle = new ilCheckboxInputGUI($this->lng->txt("shuffle_answers"), "shuffle");
$shuffle->setValue(1);
$shuffle->setChecked($this->object->getShuffle());
$shuffle->setRequired(FALSE);
$form->addItem($shuffle);
if ($this->object->getId()) {
$hidden = new ilHiddenInputGUI("", "ID");
$hidden->setValue($this->object->getId());
$form->addItem($hidden);
}
if (!$this->object->getSelfAssessmentEditingMode()) {
$isSingleline = $this->object->lastChange == 0 && !array_key_exists('types', $_POST) ? $this->object->getMultilineAnswerSetting() ? false : true : $this->object->isSingleline;
// Answer types
$types = new ilSelectInputGUI($this->lng->txt("answer_types"), "types");
$types->setRequired(false);
$types->setValue($isSingleline ? 0 : 1);
$types->setOptions(array(0 => $this->lng->txt('answers_singleline'), 1 => $this->lng->txt('answers_multiline')));
$form->addItem($types);
}
if ($isSingleline) {
// thumb size
$thumb_size = new ilNumberInputGUI($this->lng->txt("thumb_size"), "thumb_size");
$thumb_size->setMinValue(20);
$thumb_size->setDecimals(0);
$thumb_size->setSize(6);
$thumb_size->setInfo($this->lng->txt('thumb_size_info'));
$thumb_size->setValue($this->object->getThumbSize());
$thumb_size->setRequired(false);
$form->addItem($thumb_size);
return $isSingleline;
}
return $isSingleline;
}
示例13: populateAnswerSpecificFormPart
public function populateAnswerSpecificFormPart(\ilPropertyFormGUI $form)
{
// points
$points = new ilNumberInputGUI($this->lng->txt("points"), "points");
$points->allowDecimals(true);
$points->setValue($this->object->getPoints() > 0 ? $this->object->getPoints() : '');
$points->setRequired(TRUE);
$points->setSize(3);
$points->setMinValue(0.0);
$points->setMinvalueShouldBeGreater(true);
$form->addItem($points);
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("range"));
$form->addItem($header);
// lower bound
$lower_limit = new ilFormulaInputGUI($this->lng->txt("range_lower_limit"), "lowerlimit");
$lower_limit->setSize(25);
$lower_limit->setMaxLength(20);
$lower_limit->setRequired(true);
$lower_limit->setValue($this->object->getLowerLimit());
$form->addItem($lower_limit);
// upper bound
$upper_limit = new ilFormulaInputGUI($this->lng->txt("range_upper_limit"), "upperlimit");
$upper_limit->setSize(25);
$upper_limit->setMaxLength(20);
$upper_limit->setRequired(true);
$upper_limit->setValue($this->object->getUpperLimit());
$form->addItem($upper_limit);
// reset input length, if max chars are set
if ($this->object->getMaxChars() > 0) {
$lower_limit->setSize($this->object->getMaxChars());
$lower_limit->setMaxLength($this->object->getMaxChars());
$upper_limit->setSize($this->object->getMaxChars());
$upper_limit->setMaxLength($this->object->getMaxChars());
}
}
示例14: populateQuestionSpecificFormPart
public function populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
{
// points
$points = new ilNumberInputGUI($this->lng->txt("points"), "points");
$points->setValue($this->object->getPoints());
$points->setRequired(TRUE);
$points->setSize(3);
$points->setMinValue(0.0);
$form->addItem($points);
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("applet_attributes"));
$form->addItem($header);
// java applet
$javaapplet = $this->object->getJavaAppletFilename();
$applet = new ilFileInputGUI($this->lng->txt('javaapplet'), 'javaappletName');
$applet->setSuffixes(array('jar', 'class'));
$applet->setRequired(false);
if (strlen($javaapplet)) {
$filename = new ilNonEditableValueGUI($this->lng->txt('filename'), 'uploaded_javaapplet');
$filename->setValue($javaapplet);
$applet->addSubItem($filename);
$delete = new ilCheckboxInputGUI('', 'delete_applet');
$delete->setOptionTitle($this->lng->txt('delete'));
$delete->setValue(1);
$applet->addSubItem($delete);
}
$form->addItem($applet);
// Code
$code = new ilTextInputGUI($this->lng->txt("code"), "java_code");
$code->setValue($this->object->getJavaCode());
$code->setRequired(TRUE);
$form->addItem($code);
if (!strlen($javaapplet)) {
// Archive
$archive = new ilTextInputGUI($this->lng->txt("archive"), "java_archive");
$archive->setValue($this->object->getJavaArchive());
$archive->setRequired(false);
$form->addItem($archive);
// Codebase
$codebase = new ilTextInputGUI($this->lng->txt("codebase"), "java_codebase");
$codebase->setValue($this->object->getJavaCodebase());
$codebase->setRequired(false);
$form->addItem($codebase);
}
// Width
$width = new ilNumberInputGUI($this->lng->txt("width"), "java_width");
$width->setDecimals(0);
$width->setSize(6);
$width->setMinValue(50);
$width->setMaxLength(6);
$width->setValue($this->object->getJavaWidth());
$width->setRequired(TRUE);
$form->addItem($width);
// Height
$height = new ilNumberInputGUI($this->lng->txt("height"), "java_height");
$height->setDecimals(0);
$height->setSize(6);
$height->setMinValue(50);
$height->setMaxLength(6);
$height->setValue($this->object->getJavaHeight());
$height->setRequired(TRUE);
$form->addItem($height);
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("applet_parameters"));
$form->addItem($header);
include_once "./Modules/TestQuestionPool/classes/class.ilKVPWizardInputGUI.php";
$kvp = new ilKVPWizardInputGUI($this->lng->txt("applet_parameters"), "kvp");
$values = array();
for ($i = 0; $i < $this->object->getParameterCount(); $i++) {
$param = $this->object->getParameter($i);
array_push($values, array($param['name'], $param['value']));
}
if (count($values) == 0) {
array_push($values, array("", ""));
}
$kvp->setKeyName($this->lng->txt('name'));
$kvp->setValueName($this->lng->txt('value'));
$kvp->setValues($values);
$form->addItem($kvp);
}
示例15: populateQuestionSpecificFormPart
/**
* @param $form ilPropertyFormGUI
* @return \ilPropertyFormGUI|void
*/
public function populateQuestionSpecificFormPart(ilPropertyFormGUI $form)
{
// errortext
$errortext = new ilTextAreaInputGUI($this->lng->txt("errortext"), "errortext");
$errortext->setValue($this->object->getErrorText());
$errortext->setRequired(TRUE);
$errortext->setInfo($this->lng->txt("errortext_info"));
$errortext->setRows(10);
$errortext->setCols(80);
$form->addItem($errortext);
if (!$this->object->getSelfAssessmentEditingMode()) {
// textsize
$textsize = new ilNumberInputGUI($this->lng->txt("textsize"), "textsize");
$textsize->setValue(strlen($this->object->getTextSize()) ? $this->object->getTextSize() : 100.0);
$textsize->setInfo($this->lng->txt("textsize_errortext_info"));
$textsize->setSize(6);
$textsize->setSuffix("%");
$textsize->setMinValue(10);
$textsize->setRequired(true);
$form->addItem($textsize);
}
}