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


PHP ilTextAreaInputGUI::setCols方法代码示例

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


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

示例1: addToForm

 public function addToForm()
 {
     $def = $this->getADT()->getCopyOfDefinition();
     if (!$this->isMulti()) {
         $text = new ilTextInputGUI($this->getTitle(), $this->getElementId());
         if ($def->getMaxLength()) {
             $max = $def->getMaxLength();
             $size = $text->getSize();
             $text->setMaxLength($max);
             if ($size && $max < $size) {
                 $text->setSize($max);
             }
         }
     } else {
         $text = new ilTextAreaInputGUI($this->getTitle(), $this->getElementId());
         if ($this->multi_rows) {
             $text->setRows($this->multi_rows);
         }
         if ($this->multi_cols) {
             $text->setCols($this->multi_cols);
         }
     }
     $this->addBasicFieldProperties($text, $def);
     $text->setValue($this->getADT()->getText());
     $this->addToParentElement($text);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilADTTextFormBridge.php

示例2: createObject

 /**
  * create
  */
 function createObject()
 {
     global $rbacsystem, $lng, $tpl, $ilHelp;
     $forms = array();
     $ilHelp->setScreenIdComponent("sty");
     $ilHelp->setDefaultScreenId(ilHelpGUI::ID_PART_SCREEN, "create");
     // --- create
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->lng->txt("sty_create_new_stylesheet"));
     // title
     $ti = new ilTextInputGUI($this->lng->txt("title"), "style_title");
     $ti->setMaxLength(128);
     $ti->setSize(40);
     $ti->setRequired(true);
     $form->addItem($ti);
     // description
     $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "style_description");
     $ta->setCols(40);
     $ta->setRows(2);
     $form->addItem($ta);
     $form->addCommandButton("save", $this->lng->txt("save"));
     $form->addCommandButton("cancel", $this->lng->txt("cancel"));
     $forms[] = $form;
     // --- import
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->lng->txt("sty_import_stylesheet"));
     // title
     $ti = new ilFileInputGUI($this->lng->txt("import_file"), "stylefile");
     $ti->setRequired(true);
     $form->addItem($ti);
     $form->addCommandButton("importStyle", $this->lng->txt("import"));
     $form->addCommandButton("cancel", $this->lng->txt("cancel"));
     $forms[] = $form;
     // --- clone
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->lng->txt("sty_copy_other_stylesheet"));
     // source
     $ti = new ilSelectInputGUI($this->lng->txt("sty_source"), "source_style");
     $ti->setRequired(true);
     $ti->setOptions(ilObjStyleSheet::_getClonableContentStyles());
     $form->addItem($ti);
     $form->addCommandButton("copyStyle", $this->lng->txt("copy"));
     $form->addCommandButton("cancel", $this->lng->txt("cancel"));
     $forms[] = $form;
     $this->tpl->setContent($this->getCreationFormsHTML($forms));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:55,代码来源:class.ilObjStyleSheetGUI.php

示例3: initConfigurationForm

 /**
  * Init configuration form.
  *
  * @return object form object
  */
 public function initConfigurationForm()
 {
     global $lng, $ilCtrl;
     $pl = $this->getPluginObject();
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     // Setting for the ephorus logging
     $ephorus_logging = new ilCheckboxInputGUI($pl->txt("ephorus_logging"), "ephorus_logging");
     $ephorus_logging->setValue(1);
     $ephorus_logging->setInfo($pl->txt("ephorus_logging_description"));
     $form->addItem($ephorus_logging);
     // Setting for the hand-in code
     $handin_code = new ilTextInputGUI($pl->txt("handin_code"), "handin_code");
     $handin_code->setRequired(true);
     $form->addItem($handin_code);
     // Setting for the hand-in address
     $handin_address = new ilTextInputGUI($pl->txt("handin_address"), "handin_address");
     $handin_address->setSize(80);
     $handin_address->setRequired(true);
     $form->addItem($handin_address);
     // Setting for the index address
     $index_address = new ilTextInputGUI($pl->txt("index_address"), "index_address");
     $index_address->setSize(80);
     $index_address->setRequired(true);
     $form->addItem($index_address);
     // Setting for the processtype
     $processtype = new ilSelectInputGUI($pl->txt("default_processtype"), "processtype");
     $processtype->setOptions(array(1 => $pl->txt("default"), 3 => $pl->txt("private")));
     $processtype->setInfo($pl->txt("default_processtype_description"));
     $form->addItem($processtype);
     // Setting for the disclosure
     $disclosure = new ilTextAreaInputGUI($pl->txt("disclosure"), "disclosure");
     $disclosure->setCols(79);
     $disclosure->setRows(4);
     $form->addItem($disclosure);
     $form->addCommandButton("save", $lng->txt("save") . " / " . $pl->txt("check_connection"));
     $form->setTitle($pl->txt("ephorus_plugin_configuration"));
     $form->setFormAction($ilCtrl->getFormAction($this));
     return $form;
 }
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:45,代码来源:class.ilEphorusConfigGUI.php

示例4: initFormSequence


//.........这里部分代码省略.........
     ilYuiUtil::initDomEvent();
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this));
     switch ($a_mode) {
         case self::MODE_CREATE:
             $this->form->setTitle($this->lng->txt('cal_ch_add_sequence'));
             $this->form->addCommandButton('saveSequence', $this->lng->txt('save'));
             $this->form->addCommandButton('appointmentList', $this->lng->txt('cancel'));
             break;
             /*
             			case self::MODE_UPDATE:
             				$this->form->setTitle($this->lng->txt('cal_ch_edit_sequence'));
             				$this->form->addCommandButton('updateSequence', $this->lng->txt('save'));
             				$this->form->addCommandButton('appointmentList', $this->lng->txt('cancel'));
             				break;
             */
         /*
         			case self::MODE_UPDATE:
         				$this->form->setTitle($this->lng->txt('cal_ch_edit_sequence'));
         				$this->form->addCommandButton('updateSequence', $this->lng->txt('save'));
         				$this->form->addCommandButton('appointmentList', $this->lng->txt('cancel'));
         				break;
         */
         case self::MODE_MULTI:
             $this->form->setTitle($this->lng->txt('cal_ch_multi_edit_sequence'));
             $this->form->addCommandButton('updateMulti', $this->lng->txt('save'));
             $this->form->addCommandButton('appointmentList', $this->lng->txt('cancel'));
             break;
     }
     // in case of existing groups show a selection
     include_once './Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php';
     if (count($options = ilConsultationHourGroups::getGroupSelectOptions($this->getUserId()))) {
         $group = new ilSelectInputGUI($this->lng->txt('cal_ch_grp_selection'), 'grp');
         $group->setOptions($options);
         $group->setRequired(false);
         $this->form->addItem($group);
     }
     // Title
     $ti = new ilTextInputGUI($this->lng->txt('title'), 'ti');
     $ti->setSize(32);
     $ti->setMaxLength(128);
     $ti->setRequired(true);
     $this->form->addItem($ti);
     if ($a_mode != self::MODE_MULTI) {
         // Start
         include_once './Services/Form/classes/class.ilDateTimeInputGUI.php';
         $dur = new ilDateTimeInputGUI($this->lng->txt('cal_start'), 'st');
         $dur->setShowTime(true);
         $dur->setMinuteStepSize(5);
         $this->form->addItem($dur);
         // Duration
         $du = new ilDurationInputGUI($this->lng->txt('cal_ch_duration'), 'du');
         $du->setShowMinutes(true);
         $du->setShowHours(true);
         $this->form->addItem($du);
         // Number of appointments
         $nu = new ilNumberInputGUI($this->lng->txt('cal_ch_num_appointments'), 'ap');
         $nu->setInfo($this->lng->txt('cal_ch_num_appointments_info'));
         $nu->setSize(2);
         $nu->setMaxLength(2);
         $nu->setRequired(true);
         $nu->setMinValue(1);
         $this->form->addItem($nu);
         // Recurrence
         include_once './Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php';
         $rec = new ilRecurrenceInputGUI($this->lng->txt('cal_recurrences'), 'frequence');
         $rec->setEnabledSubForms(array(IL_CAL_FREQ_DAILY, IL_CAL_FREQ_WEEKLY, IL_CAL_FREQ_MONTHLY));
         $this->form->addItem($rec);
     }
     // Number of bookings
     $nu = new ilNumberInputGUI($this->lng->txt('cal_ch_num_bookings'), 'bo');
     $nu->setSize(2);
     $nu->setMaxLength(2);
     $nu->setMinValue(1);
     $nu->setRequired(true);
     $this->form->addItem($nu);
     // Deadline
     $dead = new ilDurationInputGUI($this->lng->txt('cal_ch_deadline'), 'dead');
     $dead->setInfo($this->lng->txt('cal_ch_deadline_info'));
     $dead->setShowMinutes(false);
     $dead->setShowHours(true);
     $dead->setShowDays(true);
     $this->form->addItem($dead);
     // Location
     $lo = new ilTextInputGUI($this->lng->txt('cal_where'), 'lo');
     $lo->setSize(32);
     $lo->setMaxLength(128);
     $this->form->addItem($lo);
     // Description
     $de = new ilTextAreaInputGUI($this->lng->txt('description'), 'de');
     $de->setRows(10);
     $de->setCols(60);
     $this->form->addItem($de);
     // Target Object
     $tgt = new ilTextInputGUI($this->lng->txt('cal_ch_target_object'), 'tgt');
     $tgt->setInfo($this->lng->txt('cal_ch_target_object_info'));
     $tgt->setSize(16);
     $tgt->setMaxLength(128);
     $this->form->addItem($tgt);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilConsultationHoursGUI.php

示例5: editPriceObject

 public function editPriceObject()
 {
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     $price_id = $_GET['price_id'] ? $_GET['price_id'] : $_POST['price_id'];
     $price = ilPaymentPrices::_getPrice($price_id);
     $this->ctrl->setParameter($this, 'pobject_id', (int) $_GET['pobject_id']);
     $tmp_pobject = ilPaymentObject::_getObjectData($_GET['pobject_id']);
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $tmp_obj = ilObjectFactory::getInstanceByRefId($tmp_pobject['ref_id'], false);
     if ($tmp_obj) {
         $form->setTitle($tmp_obj->getTitle());
     } else {
         $form->setTitle($this->lng->txt('object_not_found'));
     }
     //price_type
     $radio_group = new ilRadioGroupInputGUI('', 'price_type');
     $radio_group->setTitle($this->lng->txt('duration'));
     $radio_group->setRequired(true);
     $radio_group->setValue($price['price_type']);
     $radio_group->setPostVar('price_type');
     $radio_option_1 = new ilRadioOption($this->lng->txt('duration_month'), ilPaymentPrices::TYPE_DURATION_MONTH);
     // duration month
     $oDuration = new ilNumberInputGUI();
     $oDuration->setTitle($this->lng->txt('paya_months'));
     $oDuration->setSize('20%');
     $oDuration->setValue($price['duration']);
     $oDuration->setPostVar('duration_month');
     $radio_option_1->addSubItem($oDuration);
     $radio_group->addOption($radio_option_1);
     $radio_option_3 = new ilRadioOption($this->lng->txt('duration_date'), ilPaymentPrices::TYPE_DURATION_DATE);
     // duration_date from
     $o_date_from = new ilDateTimeInputGUI();
     $o_date_from->setTitle($this->lng->txt('cal_from'));
     $o_date_from->setDate(new ilDate($price['duration_from'], IL_CAL_DATE));
     $o_date_from->setPostVar('duration_date_from');
     $radio_option_3->addSubItem($o_date_from);
     // duration_date until
     $o_date_until = new ilDateTimeInputGUI();
     $o_date_until->setTitle($this->lng->txt('cal_until'));
     $o_date_until->setDate(new ilDate($price['duration_until'], IL_CAL_DATE));
     $o_date_until->setPostVar('duration_date_until');
     $radio_option_3->addSubItem($o_date_until);
     $radio_group->addOption($radio_option_3);
     $radio_option_2 = new ilRadioOption($this->lng->txt('unlimited_duration'), ilPaymentPrices::TYPE_UNLIMITED_DURATION);
     $radio_group->addOption($radio_option_2);
     $form->addItem($radio_group);
     // description
     $oDescription = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
     $oDescription->setRows(4);
     $oDescription->setCols(35);
     $oDescription->setValue($price['description']);
     $form->addItem($oDescription);
     // price
     $oPrice = new ilNumberInputGUI();
     $oPrice->setTitle($this->lng->txt('price_a'));
     $oPrice->setSize('20%');
     $oPrice->setRequired(true);
     $oPrice->setValue($price['price']);
     include_once './Services/Payment/classes/class.ilPaymentSettings.php';
     $genSet = ilPaymentSettings::_getInstance();
     $oPrice->setInfo($genSet->get('currency_unit'));
     $oPrice->setPostVar('price');
     $oPrice->allowDecimals(true);
     $form->addItem($oPrice);
     //extension
     $oExtension = new ilCheckboxInputGUI($this->lng->txt('extension_price'), 'extension');
     $oExtension->setChecked($price['extension']);
     $form->addItem($oExtension);
     $o_hidden_1 = new ilHiddenInputGUI('pobject_id');
     $o_hidden_1->setValue((int) $_GET['pobject_id']);
     $o_hidden_1->setPostVar('pobject_id');
     $o_hidden_2 = new ilHiddenInputGUI('price_id');
     $o_hidden_2->setValue((int) $_GET['price_id']);
     $o_hidden_2->setPostVar('price_id');
     $form->addItem($o_hidden_1);
     $form->addItem($o_hidden_2);
     $form->addCommandButton('updatePrice', $this->lng->txt('save'));
     $form->addCommandButton('editPrices', $this->lng->txt('cancel'));
     $this->tpl->setVariable('FORM', $form->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:82,代码来源:class.ilObjPaymentSettingsGUI.php

示例6: 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);
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:26,代码来源:class.assErrorTextGUI.php

示例7: initFormNewsItem

 /**
  * FORM NewsItem: Init form.
  *
  * @param	int	$a_mode	Form Edit Mode (IL_FORM_EDIT | IL_FORM_CREATE)
  */
 public function initFormNewsItem($a_mode)
 {
     global $lng, $ilTabs;
     $ilTabs->clearTargets();
     //$this->setTabs();
     $lng->loadLanguageModule("news");
     include "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form_gui = new ilPropertyFormGUI();
     // Property Title
     $text_input = new ilTextInputGUI($lng->txt("news_news_item_title"), "news_title");
     $text_input->setInfo("");
     $text_input->setRequired(true);
     $text_input->setMaxLength(200);
     $this->form_gui->addItem($text_input);
     // Property Content
     $text_area = new ilTextAreaInputGUI($lng->txt("news_news_item_content"), "news_content");
     $text_area->setInfo("");
     $text_area->setRequired(false);
     $this->form_gui->addItem($text_area);
     // Property Visibility
     $radio_group = new ilRadioGroupInputGUI($lng->txt("news_news_item_visibility"), "news_visibility");
     $radio_option = new ilRadioOption($lng->txt("news_visibility_users"), "users");
     $radio_group->addOption($radio_option);
     $radio_option = new ilRadioOption($lng->txt("news_visibility_public"), "public");
     $radio_group->addOption($radio_option);
     $radio_group->setInfo($lng->txt("news_news_item_visibility_info"));
     $radio_group->setRequired(false);
     $radio_group->setValue("users");
     $this->form_gui->addItem($radio_group);
     // Property ContentLong
     $text_area = new ilTextAreaInputGUI($lng->txt("news_news_item_content_long"), "news_content_long");
     $text_area->setInfo($lng->txt("news_news_item_content_long_info"));
     $text_area->setRequired(false);
     $text_area->setCols("40");
     $text_area->setRows("8");
     $text_area->setUseRte(true);
     $this->form_gui->addItem($text_area);
     // save and cancel commands
     if (in_array($a_mode, array(IL_FORM_CREATE, IL_FORM_RE_CREATE))) {
         $this->form_gui->addCommandButton("saveNewsItem", $lng->txt("save"));
         $this->form_gui->addCommandButton("cancelSaveNewsItem", $lng->txt("cancel"));
     } else {
         $this->form_gui->addCommandButton("updateNewsItem", $lng->txt("save"));
         $this->form_gui->addCommandButton("cancelUpdateNewsItem", $lng->txt("cancel"));
     }
     $this->form_gui->setTitle($lng->txt("news_news_item_head"));
     $this->form_gui->setFormAction($this->ctrl->getFormAction($this));
     $this->form_gui->setTitleIcon(ilUtil::getImagePath("icon_news.png"));
     $news_set = new ilSetting("news");
     if (!$news_set->get("enable_rss_for_internal")) {
         $this->form_gui->removeItemByPostVar("news_visibility");
     } else {
         $nv = $this->form_gui->getItemByPostVar("news_visibility");
         if (is_object($nv)) {
             $nv->setValue(ilNewsItem::_getDefaultVisibilityForRefId($_GET["ref_id"]));
         }
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:63,代码来源:class.ilNewsItemGUI.php

示例8: buildForm

 /**
  * builds the questions hints form
  * 
  * @access	private
  * @global	ilCtrl				$ilCtrl
  * @global	ilLanguage			$lng
  * @return	ilPropertyFormGUI	$form
  */
 private function buildForm(ilAssQuestionHint $questionHint = null)
 {
     global $ilCtrl, $lng;
     require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     require_once 'Services/Form/classes/class.ilTextAreaInputGUI.php';
     require_once 'Services/Form/classes/class.ilNumberInputGUI.php';
     require_once 'Services/Form/classes/class.ilHiddenInputGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setTableWidth('100%');
     if (!$this->questionOBJ->isAdditionalContentEditingModePageObject()) {
         // form input: hint text
         $areaInp = new ilTextAreaInputGUI($lng->txt('tst_question_hints_form_label_hint_text'), 'hint_text');
         $areaInp->setRequired(true);
         $areaInp->setRows(10);
         $areaInp->setCols(80);
         if (!$this->questionOBJ->getPreventRteUsage()) {
             $areaInp->setUseRte(true);
         }
         include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
         $areaInp->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
         $areaInp->setRTESupport($this->questionOBJ->getId(), 'qpl', 'assessment');
         $areaInp->addPlugin("latex");
         $areaInp->addButton("latex");
         $areaInp->addButton("pastelatex");
         $form->addItem($areaInp);
     }
     // form input: hint points
     $numInp = new ilNumberInputGUI($lng->txt('tst_question_hints_form_label_hint_points'), 'hint_points');
     $numInp->allowDecimals(true);
     $numInp->setRequired(true);
     $numInp->setSize(3);
     $form->addItem($numInp);
     if ($questionHint instanceof ilAssQuestionHint) {
         // build form title for an existing hint
         $form->setTitle(sprintf($lng->txt('tst_question_hints_form_header_edit'), $questionHint->getIndex(), $this->questionOBJ->getTitle()));
         // hidden input: hint id
         $hiddenInp = new ilHiddenInputGUI('hint_id');
         $form->addItem($hiddenInp);
         // init values
         require_once 'Services/Utilities/classes/class.ilUtil.php';
         if (!$this->questionOBJ->isAdditionalContentEditingModePageObject()) {
             $areaInp->setValue(ilUtil::prepareTextareaOutput($questionHint->getText(), true));
         }
         $numInp->setValue($questionHint->getPoints());
         $hiddenInp->setValue($questionHint->getId());
     } else {
         // build form title for a new hint
         $form->setTitle(sprintf($lng->txt('tst_question_hints_form_header_create'), $this->questionOBJ->getTitle()));
     }
     if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
         if ($questionHint instanceof ilAssQuestionHint) {
             $saveCmdLabel = $lng->txt('tst_question_hints_form_cmd_save_points');
         } else {
             $saveCmdLabel = $lng->txt('tst_question_hints_form_cmd_save_points_and_edit_page');
         }
     } else {
         $saveCmdLabel = $lng->txt('tst_question_hints_form_cmd_save');
     }
     $form->setFormAction($ilCtrl->getFormAction($this));
     $form->addCommandButton(self::CMD_CANCEL_FORM, $lng->txt('cancel'));
     $form->addCommandButton(self::CMD_SAVE_FORM, $saveCmdLabel);
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:71,代码来源:class.ilAssQuestionHintGUI.php

示例9: suggestedsolution


//.........这里部分代码省略.........
                 if (!file_exists($this->object->getSuggestedSolutionPath())) {
                     ilUtil::makeDirParents($this->object->getSuggestedSolutionPath());
                 }
                 $res = ilUtil::moveUploadedFile($_FILES["file"]["tmp_name"], $_FILES["file"]["name"], $this->object->getSuggestedSolutionPath() . $_FILES["file"]["name"]);
                 if ($res) {
                     ilUtil::renameExecutables($this->object->getSuggestedSolutionPath());
                     // remove an old file download
                     if (is_array($solution_array["value"])) {
                         @unlink($this->object->getSuggestedSolutionPath() . $solution_array["value"]["name"]);
                     }
                     $file->setValue($_FILES["file"]["name"]);
                     $this->object->saveSuggestedSolution("file", "", 0, array("name" => $_FILES["file"]["name"], "type" => $_FILES["file"]["type"], "size" => $_FILES["file"]["size"], "filename" => $_POST["filename"]));
                     $originalexists = $this->object->_questionExistsInPool($this->object->original_id);
                     if (($_GET["calling_test"] || isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
                         return $this->originalSyncForm("suggestedsolution");
                     } else {
                         ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), TRUE);
                         $this->ctrl->redirect($this, "suggestedsolution");
                     }
                 } else {
                     // BH: $res as info string? wtf? it holds a bool or something else!!?
                     ilUtil::sendInfo($res);
                 }
             } else {
                 if (is_array($solution_array["value"])) {
                     $file->setValue($solution_array["value"]["name"]);
                     $file->setFilename(strlen($solution_array["value"]["filename"]) ? $solution_array["value"]["filename"] : $solution_array["value"]["name"]);
                 }
             }
             $form->addItem($file);
             $hidden = new ilHiddenInputGUI("solutiontype");
             $hidden->setValue("file");
             $form->addItem($hidden);
         } else {
             if (strcmp($solution_array["type"], "text") == 0) {
                 $question = new ilTextAreaInputGUI($this->lng->txt("solutionText"), "solutiontext");
                 $question->setValue($this->object->prepareTextareaOutput($solution_array["value"]));
                 $question->setRequired(TRUE);
                 $question->setRows(10);
                 $question->setCols(80);
                 $question->setUseRte(TRUE);
                 $question->addPlugin("latex");
                 $question->addButton("latex");
                 $question->setRTESupport($this->object->getId(), "qpl", "assessment");
                 $hidden = new ilHiddenInputGUI("solutiontype");
                 $hidden->setValue("text");
                 $form->addItem($hidden);
                 $form->addItem($question);
             }
         }
         if ($ilAccess->checkAccess("write", "", $_GET['ref_id'])) {
             $form->addCommandButton("suggestedsolution", $this->lng->txt("save"));
         }
         if ($save) {
             if ($form->checkInput()) {
                 switch ($solution_array["type"]) {
                     case "file":
                         $this->object->saveSuggestedSolution("file", "", 0, array("name" => $solution_array["value"]["name"], "type" => $solution_array["value"]["type"], "size" => $solution_array["value"]["size"], "filename" => $_POST["filename"]));
                         break;
                     case "text":
                         $this->object->saveSuggestedSolution("text", "", 0, $solution_array["value"]);
                         break;
                 }
                 $originalexists = $this->object->_questionExistsInPool($this->object->original_id);
                 if (($_GET["calling_test"] || isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
                     return $this->originalSyncForm("suggestedsolution");
                 } else {
                     ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
                     $this->ctrl->redirect($this, "suggestedsolution");
                 }
             }
         }
         $output = $form->getHTML();
     }
     $savechange = strcmp($this->ctrl->getCmd(), "saveSuggestedSolution") == 0 ? TRUE : FALSE;
     $changeoutput = "";
     if ($ilAccess->checkAccess("write", "", $_GET['ref_id'])) {
         $formchange = new ilPropertyFormGUI();
         $formchange->setFormAction($this->ctrl->getFormAction($this));
         $formchange->setTitle(count($solution_array) ? $this->lng->txt("changeSuggestedSolution") : $this->lng->txt("addSuggestedSolution"));
         $formchange->setMultipart(FALSE);
         $formchange->setTableWidth("100%");
         $formchange->setId("suggestedsolution");
         $solutiontype = new ilRadioGroupInputGUI($this->lng->txt("suggestedSolutionType"), "solutiontype");
         foreach ($options as $opt_value => $opt_caption) {
             $solutiontype->addOption(new ilRadioOption($opt_caption, $opt_value));
         }
         if (count($solution_array)) {
             $solutiontype->setValue($solution_array["type"]);
         }
         $solutiontype->setRequired(TRUE);
         $formchange->addItem($solutiontype);
         $formchange->addCommandButton("saveSuggestedSolution", $this->lng->txt("select"));
         if ($savechange) {
             $formchange->checkInput();
         }
         $changeoutput = $formchange->getHTML();
     }
     $this->tpl->setVariable("ADM_CONTENT", $changeoutput . $output);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.assQuestionGUI.php

示例10: initRoleMappingForm

 /**
  * init propertyformgui for Assignment of LDAP Attributes to ILIAS User Profile
  * @param string $command command methode
  * @return \ilPropertyFormGUI 
  */
 private function initRoleMappingForm($command)
 {
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->setSubTabs();
     $this->tabs_gui->setSubTabActive('ldap_role_mapping');
     if (isset($_GET["mapping_id"])) {
         $this->ctrl->setParameter($this, 'mapping_id', $_GET["mapping_id"]);
     }
     $propertie_form = new ilPropertyFormGUI();
     $propertie_form->setFormAction($this->ctrl->getFormAction($this, $command));
     $propertie_form->addCommandButton($command, $this->lng->txt('save'));
     $propertie_form->addCommandButton("roleMapping", $this->lng->txt('cancel'));
     $url = new ilTextInputGUI($this->lng->txt('ldap_server'));
     $url->setPostVar("url");
     $url->setSize(50);
     $url->setMaxLength(255);
     $url->setRequired(true);
     $group_dn = new ilTextInputGUI($this->lng->txt('ldap_group_dn'));
     $group_dn->setPostVar("dn");
     $group_dn->setSize(50);
     $group_dn->setMaxLength(255);
     $group_dn->setInfo($this->lng->txt('ldap_dn_info'));
     $group_dn->setRequired(true);
     $member = new ilTextInputGUI($this->lng->txt('ldap_group_member'));
     $member->setPostVar("member");
     $member->setSize(32);
     $member->setMaxLength(255);
     $member->setInfo($this->lng->txt('ldap_member_info'));
     $member->setRequired(true);
     $member_isdn = new ilCheckboxInputGUI("");
     $member_isdn->setPostVar("memberisdn");
     $member_isdn->setOptionTitle($this->lng->txt('ldap_memberisdn'));
     $role = new ilTextInputGUI($this->lng->txt('ldap_ilias_role'));
     $role->setPostVar("role");
     $role->setSize(32);
     $role->setMaxLength(255);
     $role->setInfo($this->lng->txt('ldap_role_info'));
     $role->setRequired(true);
     $info = new ilTextAreaInputGUI($this->lng->txt('ldap_info_text'));
     $info->setPostVar("info");
     $info->setCols(50);
     $info->setRows(3);
     $info->setInfo($this->lng->txt('ldap_info_text_info'));
     $info_type = new ilCheckboxInputGUI("");
     $info_type->setPostVar("info_type");
     $info_type->setOptionTitle($this->lng->txt('ldap_mapping_info_type'));
     $propertie_form->addItem($url);
     $propertie_form->addItem($group_dn);
     $propertie_form->addItem($member);
     $propertie_form->addItem($member_isdn);
     $propertie_form->addItem($role);
     $propertie_form->addItem($info);
     $propertie_form->addItem($info_type);
     return $propertie_form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:60,代码来源:class.ilLDAPSettingsGUI.php

示例11: initSettingsForm

 /**
  * Init  form.
  *
  * @param        int        $a_mode        Edit Mode
  */
 public function initSettingsForm()
 {
     global $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     // title
     $title = new ilTextInputGUI($this->txt("title"), "title");
     $title->setRequired(true);
     $this->form->addItem($title);
     // description
     $description = new ilTextAreaInputGUI($this->txt("description"), "description");
     $description->setCols(39);
     $description->setRows(4);
     $this->form->addItem($description);
     // show submissions
     $show_submissions = new ilCheckboxInputGUI($this->txt("show_submissions"), "show_submissions");
     $show_submissions->setInfo($this->txt("show_submissions_info"));
     $this->form->addItem($show_submissions);
     // pass mode
     $pass_mode = new ilRadioGroupInputGUI($this->txt("pass_mode"), "pass_mode");
     $pass_all = new ilRadioOption($this->txt("pass_all"), "all", $this->txt("pass_all_info"));
     $pass_mode->addOption($pass_all);
     $pass_min = new ilRadioOption($this->txt("pass_minimum_nr"), "pass_min", $this->txt("pass_minimum_nr_info"));
     $pass_mode->addOption($pass_min);
     // minimum number of assignments to pass
     $min_number = new ilNumberInputGUI($this->txt("min_nr"), "min_number");
     $min_number->setSize(4);
     $min_number->setMaxLength(4);
     $min_number->setRequired(true);
     include_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus/classes/class.ilEphAssignment.php";
     $mand = ilEphAssignment::countMandatory($this->object->getId());
     $min = max($mand, 1);
     $min_number->setMinValue($min);
     $pass_min->addSubItem($min_number);
     $this->form->addItem($pass_mode);
     $notification = new ilCheckboxInputGUI($this->txt("submission_notification"), "notification");
     $notification->setInfo($this->txt("submission_notification_info"));
     $this->form->addItem($notification);
     $copletion_by_submission = new ilCheckboxInputGUI($this->txt('completion_by_submission'), 'completion_by_submission');
     $copletion_by_submission->setInfo($this->txt('completion_by_submission_info'));
     $copletion_by_submission->setValue(1);
     $this->form->addItem($copletion_by_submission);
     $processtype = new ilSelectInputGUI($this->txt("processtype"), "processtype");
     $processtype->setOptions(array(1 => $this->txt("default"), 2 => $this->txt("reference"), 3 => $this->txt("private")));
     $processtype->setInfo($this->txt("processtype_description"));
     $this->form->addItem($processtype);
     $this->form->addCommandButton("updateSettings", $this->txt("save"));
     $this->form->setTitle($this->txt("edit_ephorus_exercise"));
     $this->form->setFormAction($ilCtrl->getFormAction($this));
 }
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:55,代码来源:class.ilObjEphorusGUI.php

示例12: initSettingsForm

 /**
  * Init settings form.
  */
 public function initSettingsForm()
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     // title
     $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
     $ti->setMaxLength(128);
     $ti->setSize(40);
     $ti->setRequired(true);
     $this->form->addItem($ti);
     // description
     $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
     $ta->setCols(40);
     $ta->setRows(2);
     $this->form->addItem($ta);
     // online
     $cb = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
     $cb->setOptionTitle($lng->txt(""));
     $cb->setValue("y");
     $this->form->addItem($cb);
     // startfile
     require_once "./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php";
     $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
     $ne = new ilNonEditableValueGUI($lng->txt("cont_startfile"), "");
     if ($startfile != "") {
         $ne->setValue(basename($startfile));
     } else {
         $ne->setValue(basename($this->lng->txt("no_start_file")));
     }
     $this->form->addItem($ne);
     $this->form->addCommandButton("saveProperties", $lng->txt("save"));
     $this->form->addCommandButton("toFilesystem", $lng->txt("cont_set_start_file"));
     $this->form->setTitle($lng->txt("cont_lm_properties"));
     $this->form->setFormAction($ilCtrl->getFormAction($this, "saveProperties"));
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:39,代码来源:class.ilObjFileBasedLMGUI.php

示例13: createClassDescriptionTextArea

 private function createClassDescriptionTextArea()
 {
     $description_area = new ilTextAreaInputGUI($this->lng->txt("description"), "description");
     $description_area->setCols(40);
     $description_area->setRows(3);
     return $description_area;
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:7,代码来源:class.ilRoomSharingPrivilegesGUI.php

示例14: initEditForm

 protected function initEditForm()
 {
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "save"));
     $form->setTitle($this->lng->txt($this->getQuestionType()));
     $form->setMultipart(FALSE);
     $form->setTableWidth("100%");
     // $form->setId("essay");
     // title
     $title = new ilTextInputGUI($this->lng->txt("title"), "title");
     $title->setRequired(TRUE);
     $form->addItem($title);
     // label
     $label = new ilTextInputGUI($this->lng->txt("label"), "label");
     $label->setInfo($this->lng->txt("label_info"));
     $label->setRequired(false);
     $form->addItem($label);
     // author
     $author = new ilTextInputGUI($this->lng->txt("author"), "author");
     $author->setRequired(TRUE);
     $form->addItem($author);
     // description
     $description = new ilTextInputGUI($this->lng->txt("description"), "description");
     $description->setRequired(FALSE);
     $form->addItem($description);
     // questiontext
     $question = new ilTextAreaInputGUI($this->lng->txt("question"), "question");
     $question->setRequired(TRUE);
     $question->setRows(10);
     $question->setCols(80);
     $question->setUseRte(TRUE);
     include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
     $question->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("survey"));
     $question->addPlugin("latex");
     $question->addButton("latex");
     $question->addButton("pastelatex");
     $question->setRTESupport($this->object->getId(), "spl", "survey");
     $form->addItem($question);
     // obligatory
     $shuffle = new ilCheckboxInputGUI($this->lng->txt("obligatory"), "obligatory");
     $shuffle->setValue(1);
     $shuffle->setRequired(FALSE);
     $form->addItem($shuffle);
     $this->addFieldsToEditForm($form);
     $this->addCommandButtons($form);
     // values
     $title->setValue($this->object->getTitle());
     $label->setValue($this->object->label);
     $author->setValue($this->object->getAuthor());
     $description->setValue($this->object->getDescription());
     $question->setValue($this->object->prepareTextareaOutput($this->object->getQuestiontext()));
     $shuffle->setChecked($this->object->getObligatory());
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:55,代码来源:class.SurveyQuestionGUI.php

示例15: editQuestion

 /**
  * Creates an output of the edit form for the question
  *
  * @access public
  */
 public function editQuestion($checkonly = FALSE)
 {
     $save = $this->isSaveCommand();
     $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("orderinghorizontal");
     $this->addBasicQuestionFormProperties($form);
     // ordertext
     $ordertext = new ilTextAreaInputGUI($this->lng->txt("ordertext"), "ordertext");
     $ordertext->setValue($this->object->prepareTextareaOutput($this->object->getOrderText()));
     $ordertext->setRequired(TRUE);
     $ordertext->setInfo(sprintf($this->lng->txt("ordertext_info"), $this->object->separator));
     $ordertext->setRows(10);
     $ordertext->setCols(80);
     $form->addItem($ordertext);
     // textsize
     $textsize = new ilNumberInputGUI($this->lng->txt("textsize"), "textsize");
     $textsize->setValue($this->object->getTextSize());
     $textsize->setInfo($this->lng->txt("textsize_info"));
     $textsize->setSize(6);
     $textsize->setMinValue(10);
     $textsize->setRequired(FALSE);
     $form->addItem($textsize);
     // points
     $points = new ilNumberInputGUI($this->lng->txt("points"), "points");
     // mbecker: Fix for mantis bug 7866: Predefined values schould make sense.
     // This implements a default value of "1" for this question type.
     if ($this->object->getPoints() == null) {
         $points->setValue("1");
     } else {
         $points->setValue($this->object->getPoints());
     }
     $points->setRequired(TRUE);
     $points->setSize(3);
     $points->setMinValue(0.0);
     $points->setMinvalueShouldBeGreater(true);
     $form->addItem($points);
     $this->addQuestionFormCommandButtons($form);
     $errors = false;
     if ($save) {
         $form->setValuesByPost();
         $errors = !$form->checkInput();
         $form->setValuesByPost();
         // again, because checkInput now performs the whole stripSlashes handling and we need this if we don't want to have duplication of backslashes
         if ($errors) {
             $checkonly = false;
         }
     }
     if (!$checkonly) {
         $this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
     }
     return $errors;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:63,代码来源:class.assOrderingHorizontalGUI.php


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