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


PHP ilTextInputGUI::setSuffix方法代码示例

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


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

示例1: buildForm


//.........这里部分代码省略.........
     $showfinal->setOptionTitle($this->lng->txt("final_statement_show"));
     $showfinal->setInfo($this->lng->txt("final_statement_show_desc"));
     $finalstatement->addSubItem($showfinal);
     $form->addItem($finalstatement);
     // examview
     $enable_examview = new ilCheckboxInputGUI($this->lng->txt("enable_examview"), 'enable_examview');
     $enable_examview->setValue(1);
     $enable_examview->setChecked($this->testOBJ->getEnableExamview());
     $enable_examview->setInfo($this->lng->txt("enable_examview_desc"));
     $show_examview_html = new ilCheckboxInputGUI('', 'show_examview_html');
     $show_examview_html->setValue(1);
     $show_examview_html->setChecked($this->testOBJ->getShowExamviewHtml());
     $show_examview_html->setOptionTitle($this->lng->txt("show_examview_html"));
     $show_examview_html->setInfo($this->lng->txt("show_examview_html_desc"));
     $enable_examview->addSubItem($show_examview_html);
     $show_examview_pdf = new ilCheckboxInputGUI('', 'show_examview_pdf');
     $show_examview_pdf->setValue(1);
     $show_examview_pdf->setChecked($this->testOBJ->getShowExamviewPdf());
     $show_examview_pdf->setOptionTitle($this->lng->txt("show_examview_pdf"));
     $show_examview_pdf->setInfo($this->lng->txt("show_examview_pdf_desc"));
     $enable_examview->addSubItem($show_examview_pdf);
     $form->addItem($enable_examview);
     if (!$this->settingsTemplate || $this->formShowSessionSection($this->settingsTemplate->getSettings())) {
         // session properties
         $sessionheader = new ilFormSectionHeaderGUI();
         $sessionheader->setTitle($this->lng->txt("tst_session_settings"));
         $form->addItem($sessionheader);
     }
     // max. number of passes
     $nr_of_tries = new ilTextInputGUI($this->lng->txt("tst_nr_of_tries"), "nr_of_tries");
     $nr_of_tries->setSize(3);
     $nr_of_tries->setValue($this->testOBJ->getNrOfTries());
     $nr_of_tries->setRequired(true);
     $nr_of_tries->setSuffix($this->lng->txt("0_unlimited"));
     $total = $this->testOBJ->evalTotalPersons();
     if ($total) {
         $nr_of_tries->setDisabled(true);
     }
     $form->addItem($nr_of_tries);
     // enable max. processing time
     $processing = new ilCheckboxInputGUI($this->lng->txt("tst_processing_time"), "chb_processing_time");
     $processing->setValue(1);
     //$processing->setOptionTitle($this->lng->txt("enabled"));
     if ($this->settingsTemplate && $this->getTemplateSettingValue('chb_processing_time')) {
         $processing->setChecked(true);
     } else {
         $processing->setChecked($this->testOBJ->getEnableProcessingTime());
     }
     // max. processing time
     $processingtime = new ilDurationInputGUI('', 'processing_time');
     $ptime = $this->testOBJ->getProcessingTimeAsArray();
     $processingtime->setHours($ptime['hh']);
     $processingtime->setMinutes($ptime['mm']);
     $processingtime->setSeconds($ptime['ss']);
     $processingtime->setShowMonths(false);
     $processingtime->setShowDays(false);
     $processingtime->setShowHours(true);
     $processingtime->setShowMinutes(true);
     $processingtime->setShowSeconds(true);
     $processingtime->setInfo($this->lng->txt("tst_processing_time_desc"));
     $processing->addSubItem($processingtime);
     // reset max. processing time
     $resetprocessing = new ilCheckboxInputGUI('', "chb_reset_processing_time");
     $resetprocessing->setValue(1);
     $resetprocessing->setOptionTitle($this->lng->txt("tst_reset_processing_time"));
     $resetprocessing->setChecked($this->testOBJ->getResetProcessingTime());
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:67,代码来源:class.ilObjTestSettingsGeneralGUI.php

示例2: addQuestionBehaviourProperties

 /**
  * @param ilPropertyFormGUI $form
  */
 private function addQuestionBehaviourProperties(ilPropertyFormGUI $form)
 {
     $fields = array('title_output', 'autosave', 'chb_shuffle_questions', 'chb_shuffle_questions', 'offer_hints', 'instant_feedback', 'obligations_enabled');
     if ($this->isSectionHeaderRequired($fields) || $this->isCharSelectorPropertyRequired()) {
         // sequence properties
         $seqheader = new ilFormSectionHeaderGUI();
         $seqheader->setTitle($this->lng->txt("tst_presentation_properties"));
         $form->addItem($seqheader);
     }
     // question title output
     $title_output = new ilRadioGroupInputGUI($this->lng->txt("tst_title_output"), "title_output");
     $title_output->addOption(new ilRadioOption($this->lng->txt("tst_title_output_full"), 0, ''));
     $title_output->addOption(new ilRadioOption($this->lng->txt("tst_title_output_hide_points"), 1, ''));
     $title_output->addOption(new ilRadioOption($this->lng->txt("tst_title_output_no_title"), 2, ''));
     $title_output->setValue($this->testOBJ->getTitleOutput());
     $form->addItem($title_output);
     // Autosave
     $autosave_output = new ilCheckboxInputGUI($this->lng->txt('autosave'), 'autosave');
     $autosave_output->setValue(1);
     $autosave_output->setChecked($this->testOBJ->getAutosave());
     $autosave_output->setInfo($this->lng->txt('autosave_info'));
     $autosave_interval = new ilTextInputGUI($this->lng->txt('autosave_ival'), 'autosave_ival');
     $autosave_interval->setSize(10);
     $autosave_interval->setValue($this->testOBJ->getAutosaveIval() / 1000);
     $autosave_interval->setSuffix($this->lng->txt('seconds'));
     $autosave_output->addSubItem($autosave_interval);
     $form->addItem($autosave_output);
     // shuffle questions
     $shuffle = new ilCheckboxInputGUI($this->lng->txt("tst_shuffle_questions"), "chb_shuffle_questions");
     $shuffle->setValue(1);
     $shuffle->setChecked($this->testOBJ->getShuffleQuestions());
     $shuffle->setInfo($this->lng->txt("tst_shuffle_questions_description"));
     $form->addItem($shuffle);
     // offer hints
     $checkBoxOfferHints = new ilCheckboxInputGUI($this->lng->txt('tst_setting_offer_hints_label'), 'offer_hints');
     $checkBoxOfferHints->setChecked($this->testOBJ->isOfferingQuestionHintsEnabled());
     $checkBoxOfferHints->setInfo($this->lng->txt('tst_setting_offer_hints_info'));
     if ($this->testOBJ->participantDataExist()) {
         $checkBoxOfferHints->setDisabled(true);
     }
     $form->addItem($checkBoxOfferHints);
     // instant feedback
     $instant_feedback = new ilCheckboxGroupInputGUI($this->lng->txt('tst_instant_feedback'), 'instant_feedback');
     $instant_feedback->addOption(new ilCheckboxOption($this->lng->txt('tst_instant_feedback_results'), 'instant_feedback_points', $this->lng->txt('tst_instant_feedback_results_desc')));
     $instant_feedback->addOption(new ilCheckboxOption($this->lng->txt('tst_instant_feedback_answer_generic'), 'instant_feedback_generic', $this->lng->txt('tst_instant_feedback_answer_generic_desc')));
     $instant_feedback->addOption(new ilCheckboxOption($this->lng->txt('tst_instant_feedback_answer_specific'), 'instant_feedback_specific', $this->lng->txt('tst_instant_feedback_answer_specific_desc')));
     $instant_feedback->addOption(new ilCheckboxOption($this->lng->txt('tst_instant_feedback_solution'), 'instant_feedback_solution', $this->lng->txt('tst_instant_feedback_solution_desc')));
     $instant_feedback->addOption(new ilCheckboxOption($this->lng->txt('tst_instant_feedback_fix_usr_answer'), 'instant_feedback_answer_fixation', $this->lng->txt('tst_instant_feedback_fix_usr_answer_desc')));
     $values = array();
     if ($this->testOBJ->getSpecificAnswerFeedback()) {
         array_push($values, 'instant_feedback_specific');
     }
     if ($this->testOBJ->getGenericAnswerFeedback()) {
         array_push($values, 'instant_feedback_generic');
     }
     if ($this->testOBJ->getAnswerFeedbackPoints()) {
         array_push($values, 'instant_feedback_points');
     }
     if ($this->testOBJ->getInstantFeedbackSolution()) {
         array_push($values, 'instant_feedback_solution');
     }
     if ($this->testOBJ->isInstantFeedbackAnswerFixationEnabled()) {
         array_push($values, 'instant_feedback_answer_fixation');
     }
     $instant_feedback->setValue($values);
     $form->addItem($instant_feedback);
     // enable obligations
     $checkBoxEnableObligations = new ilCheckboxInputGUI($this->lng->txt('tst_setting_enable_obligations_label'), 'obligations_enabled');
     $checkBoxEnableObligations->setChecked($this->testOBJ->areObligationsEnabled());
     $checkBoxEnableObligations->setInfo($this->lng->txt('tst_setting_enable_obligations_info'));
     if ($this->testOBJ->participantDataExist()) {
         $checkBoxEnableObligations->setDisabled(true);
     }
     $form->addItem($checkBoxEnableObligations);
     // selector for unicode characters
     if ($this->isCharSelectorPropertyRequired()) {
         require_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
         $char_selector = new ilCharSelectorGUI(ilCharSelectorConfig::CONTEXT_TEST);
         $char_selector->getConfig()->setAvailability($this->testOBJ->getCharSelectorAvailability());
         $char_selector->getConfig()->setDefinition($this->testOBJ->getCharSelectorDefinition());
         $char_selector->addFormProperties($form);
         $char_selector->setFormValues($form);
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:87,代码来源:class.ilObjTestSettingsGeneralGUI.php

示例3: initAddCodesForm

 function initAddCodesForm()
 {
     global $rbacreview, $ilObjDataCache, $lng;
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'createCodes'));
     $this->form_gui->setTitle($this->lng->txt('registration_codes_edit_header'));
     $count = new ilNumberInputGUI($this->lng->txt('registration_codes_number'), 'reg_codes_number');
     $count->setSize(4);
     $count->setMaxLength(4);
     $count->setMinValue(1);
     $count->setMaxValue(1000);
     $count->setRequired(true);
     $this->form_gui->addItem($count);
     $sec = new ilFormSectionHeaderGUI();
     $sec->setTitle($this->lng->txt('registration_codes_roles_title'));
     $this->form_gui->addItem($sec);
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $options = array("" => $this->lng->txt('registration_codes_no_assigned_role'));
     foreach ($rbacreview->getGlobalRoles() as $role_id) {
         if (!in_array($role_id, array(SYSTEM_ROLE_ID, ANONYMOUS_ROLE_ID))) {
             $options[$role_id] = $ilObjDataCache->lookupTitle($role_id);
         }
     }
     $roles = new ilSelectInputGUI($this->lng->txt("registration_codes_roles"), "reg_codes_role");
     $roles->setInfo($this->lng->txt("registration_codes_override_info"));
     $roles->setOptions($options);
     $this->form_gui->addItem($roles);
     $local = new ilTextInputGUI($this->lng->txt("registration_codes_roles_local"), "reg_codes_local");
     $local->setMulti(true);
     $local->setDataSource($this->ctrl->getLinkTarget($this, "getLocalRoleAutoComplete", "", true));
     $this->form_gui->addItem($local);
     $sec = new ilFormSectionHeaderGUI();
     $sec->setTitle($this->lng->txt('reg_access_limitations'));
     $this->form_gui->addItem($sec);
     $limit = new ilRadioGroupInputGUI($this->lng->txt("reg_access_limitation_mode"), "reg_limit");
     $limit->setInfo($this->lng->txt("registration_codes_override_info"));
     $this->form_gui->addItem($limit);
     $opt = new ilRadioOption($this->lng->txt("registration_codes_roles_limitation_none"), "none");
     $limit->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_none"), "unlimited");
     $limit->addOption($opt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_mode_absolute"), "absolute");
     $limit->addOption($opt);
     $dt = new ilDateTimeInputGUI($this->lng->txt("reg_access_limitation_mode_absolute_target"), "abs_date");
     $dt->setRequired(true);
     $opt->addSubItem($dt);
     $opt = new ilRadioOption($this->lng->txt("reg_access_limitation_mode_relative"), "relative");
     $limit->addOption($opt);
     $days = new ilTextInputGUI("", "rel_date[d]");
     $days->setSize(5);
     $days->setSuffix($this->lng->txt("days"));
     $mon = new ilTextInputGUI("", "rel_date[m]");
     $mon->setSize(5);
     $mon->setSuffix($this->lng->txt("months"));
     $yr = new ilTextInputGUI("", "rel_date[y]");
     $yr->setSize(5);
     $yr->setSuffix($this->lng->txt("years"));
     // custom input won't reload
     if (is_array($_POST["rel_date"])) {
         $days->setValue($_POST["rel_date"]["d"]);
         $mon->setValue($_POST["rel_date"]["m"]);
         $yr->setValue($_POST["rel_date"]["y"]);
     }
     $dur = new ilCustomInputGUI($this->lng->txt("reg_access_limitation_mode_relative_target"));
     $dur->setRequired(true);
     $dur->setHTML($days->getToolbarHTML() . " " . $mon->getToolbarHTML() . " " . $yr->getToolbarHTML());
     $opt->addSubItem($dur);
     $this->form_gui->addCommandButton('createCodes', $this->lng->txt('create'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:70,代码来源:class.ilRegistrationSettingsGUI.php

示例4: propertiesObject


//.........这里部分代码省略.........
     $showinfo->setOptionTitle($this->lng->txt("showinfo"));
     $showinfo->setInfo($this->lng->txt("showinfo_desc"));
     $intro->addSubItem($showinfo);
     $form->addItem($intro);
     // final statement
     $finalstatement = new ilTextAreaInputGUI($this->lng->txt("final_statement"), "finalstatement");
     $finalstatement->setValue($this->object->prepareTextareaOutput($this->object->getFinalStatement()));
     $finalstatement->setRows(10);
     $finalstatement->setCols(80);
     $finalstatement->setUseRte(TRUE);
     $finalstatement->addPlugin("latex");
     $finalstatement->addButton("latex");
     $finalstatement->setRTESupport($this->object->getId(), "tst", "assessment", null, false, '3.4.7');
     $finalstatement->setRteTagSet('full');
     // show final statement
     $showfinal = new ilCheckboxInputGUI('', "showfinalstatement");
     $showfinal->setValue(1);
     $showfinal->setChecked($this->object->getShowFinalStatement());
     $showfinal->setOptionTitle($this->lng->txt("final_statement_show"));
     $showfinal->setInfo($this->lng->txt("final_statement_show_desc"));
     $finalstatement->addSubItem($showfinal);
     $form->addItem($finalstatement);
     if (!$template || $template && $this->formShowSessionSection($template_settings)) {
         // session properties
         $sessionheader = new ilFormSectionHeaderGUI();
         $sessionheader->setTitle($this->lng->txt("tst_session_settings"));
         $form->addItem($sessionheader);
     }
     // max. number of passes
     $nr_of_tries = new ilTextInputGUI($this->lng->txt("tst_nr_of_tries"), "nr_of_tries");
     $nr_of_tries->setSize(3);
     $nr_of_tries->setValue($this->object->getNrOfTries());
     $nr_of_tries->setRequired(true);
     $nr_of_tries->setSuffix($this->lng->txt("0_unlimited"));
     if ($total) {
         $nr_of_tries->setDisabled(true);
     }
     $form->addItem($nr_of_tries);
     // enable max. processing time
     $processing = new ilCheckboxInputGUI($this->lng->txt("tst_processing_time"), "chb_processing_time");
     $processing->setValue(1);
     //$processing->setOptionTitle($this->lng->txt("enabled"));
     if ($template_settings && $template_settings['chb_processing_time'] && $template_settings['chb_processing_time']['value']) {
         $processing->setChecked(true);
     } else {
         $processing->setChecked($this->object->getEnableProcessingTime());
     }
     // max. processing time
     $processingtime = new ilDurationInputGUI('', 'processing_time');
     $ptime = $this->object->getProcessingTimeAsArray();
     $processingtime->setHours($ptime['hh']);
     $processingtime->setMinutes($ptime['mm']);
     $processingtime->setSeconds($ptime['ss']);
     $processingtime->setShowMonths(false);
     $processingtime->setShowDays(false);
     $processingtime->setShowHours(true);
     $processingtime->setShowMinutes(true);
     $processingtime->setShowSeconds(true);
     $processingtime->setInfo($this->lng->txt("tst_processing_time_desc"));
     $processing->addSubItem($processingtime);
     // reset max. processing time
     $resetprocessing = new ilCheckboxInputGUI('', "chb_reset_processing_time");
     $resetprocessing->setValue(1);
     $resetprocessing->setOptionTitle($this->lng->txt("tst_reset_processing_time"));
     $resetprocessing->setChecked($this->object->getResetProcessingTime());
     $resetprocessing->setInfo($this->lng->txt("tst_reset_processing_time_desc"));
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:67,代码来源:class.ilObjTestGUI.php

示例5: editQuestion


//.........这里部分代码省略.........
             $form->addItem($range_min);
             $form->addItem($range_max);
             $form->addItem($units);
             $form->addItem($precision);
             $form->addItem($intprecision);
         }
     }
     $results = $this->object->getResults();
     if (count($results)) {
         require_once 'Services/Form/classes/class.ilMultiSelectInputGUI.php';
         uasort($results, function (assFormulaQuestionResult $r1, assFormulaQuestionResult $r2) {
             $num_r1 = (int) substr($r1->getResult(), 2);
             $num_r2 = (int) substr($r2->getResult(), 2);
             if ($num_r1 > $num_r2) {
                 return 1;
             } else {
                 if ($num_r1 < $num_r2) {
                     return -1;
                 }
             }
             return 0;
         });
         foreach ($results as $result) {
             /**
              * @var $result assFormulaQuestionResult
              */
             $result_header = new ilFormSectionHeaderGUI();
             $result_header->setTitle(sprintf($this->lng->txt('result_x'), $result->getResult()));
             $formula = new ilTextInputGUI($this->lng->txt('formula'), 'formula_' . $result->getResult());
             $formula->setInfo($this->lng->txt('fq_formula_desc'));
             $formula->setRequired(true);
             $formula->setSize(50);
             $formula->setValue($result->getFormula());
             $formula->setSuffix(' = ' . $result->getResult());
             if (preg_match("/suggestrange_(.*)/", $this->ctrl->getCmd(), $matches) && strcmp($matches[1], $result->getResult()) == 0) {
                 // suggest a range for the result
                 if (strlen($result->substituteFormula($variables, $results))) {
                     $result->suggestRange($variables, $results);
                 }
             }
             $range_min = new ilNumberInputGUI($this->lng->txt('range_min'), 'range_min_' . $result->getResult());
             $range_min->allowDecimals(true);
             $range_min->setSize(3);
             $range_min->setRequired(true);
             $range_min->setValue($result->getRangeMin());
             $range_max = new ilNumberInputGUI($this->lng->txt('range_max'), 'range_max_' . $result->getResult());
             $range_max->allowDecimals(true);
             $range_max->setSize(3);
             $range_max->setRequired(true);
             $range_max->setValue($result->getRangeMax());
             $matches = array();
             $precision = new ilNumberInputGUI($this->lng->txt('precision'), 'precision_' . $result->getResult());
             $precision->setRequired(true);
             $precision->setSize(3);
             $precision->setMinValue(0);
             $precision->setInfo($this->lng->txt('fq_precision_info'));
             $precision->setValue($result->getPrecision());
             $tolerance = new ilNumberInputGUI($this->lng->txt('tolerance'), 'tolerance_' . $result->getResult());
             $tolerance->setSize(3);
             $tolerance->setMinValue(0);
             $tolerance->setMaxValue(100);
             $tolerance->allowDecimals(false);
             $tolerance->setInfo($this->lng->txt('tolerance_info'));
             $tolerance->setValue($result->getTolerance());
             $suggest_range_button = new ilCustomInputGUI('', '');
             $suggest_range_button->setHtml('<input type="submit" class="btn btn-default" name="cmd[suggestrange_' . $result->getResult() . ']" value="' . $this->lng->txt("suggest_range") . '" />');
开发者ID:arlendotcn,项目名称:ilias,代码行数:67,代码来源:class.assFormulaQuestionGUI.php


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