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


PHP ilCustomInputGUI::setHtml方法代码示例

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


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

示例1: showDetails

 /**
  * @param ilObjBibliographic $bibl_obj
  * @return void
  *
  */
 public function showDetails(ilObjBibliographic $bibl_obj)
 {
     global $tpl, $ilTabs, $ilCtrl, $lng;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $ilTabs->clearTargets();
     $ilTabs->setBackTarget("back", $ilCtrl->getLinkTarget($this, 'showContent'));
     $form->setTitle($lng->txt('detail_view'));
     $entry = new ilBibliographicEntry($bibl_obj->getFiletype(), $_GET['entryId']);
     $attributes = $entry->getAttributes();
     //translate array key in order to sort by those keys
     foreach ($attributes as $key => $attribute) {
         //Check if there is a specific language entry
         if ($lng->exists($key)) {
             $strDescTranslated = $lng->txt($key);
         } else {
             $arrKey = explode("_", $key);
             $strDescTranslated = $lng->txt($arrKey[0] . "_default_" . $arrKey[2]);
         }
         unset($attributes[$key]);
         $attributes[$strDescTranslated] = $attribute;
     }
     // sort attributes alphabetically by their array-key
     ksort($attributes, SORT_STRING);
     // render attributes to html
     foreach ($attributes as $key => $attribute) {
         $ci = new ilCustomInputGUI($key);
         $ci->setHtml($attribute);
         $form->addItem($ci);
     }
     // set content and title
     $tpl->setContent($form->getHTML());
     //Permanent Link
     $tpl->setPermanentLink("bibl", $bibl_obj->getRefId(), "_" . $_GET['entryId']);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:40,代码来源:class.ilBibliographicDetailsGUI.php

示例2: 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());
 }
开发者ID:ba-al,项目名称:ILIAS-ChemistryQuestion44,代码行数:39,代码来源:class.assJSMEQuestionGUI.php

示例3: initForm

 /**
  * Init form
  *
  * @return ilPropertyFormGUI
  */
 public function initForm()
 {
     global $lng, $ilCtrl;
     /** @var $ilCtrl ilCtrl */
     $ilCtrl = $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $item = new ilCustomInputGUI();
     $item->setHtml($lng->txt('dcl_file_format_description'));
     $item->setTitle("Info");
     $form->addItem($item);
     $file = new ilFileInputGUI($lng->txt("import_file"), "import_file");
     $file->setRequired(true);
     $form->addItem($file);
     $cb = new ilCheckboxInputGUI($lng->txt("dcl_simulate_import"), "simulate");
     $cb->setInfo($lng->txt("dcl_simulate_info"));
     $form->addItem($cb);
     $form->addCommandButton("importExcel", $lng->txt("save"));
     return $form;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:25,代码来源:class.ilDataCollectionRecordListGUI.php

示例4: initForm

 /**
  * initEditCustomForm
  *
  * @param string $a_mode
  */
 public function initForm($a_mode = "create")
 {
     global $ilCtrl, $ilErr, $lng;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $item = new ilTextInputGUI($lng->txt('title'), 'title');
     $item->setRequired(true);
     $this->form->addItem($item);
     $item = new ilCheckboxInputGUI($lng->txt('dcl_visible'), 'is_visible');
     $this->form->addItem($item);
     $item = new ilTextAreaInputGUI($lng->txt('additional_info'), 'description');
     $item->setUseRte(true);
     //        $item->setRTESupport($this->table->getId(), 'dcl', 'table_settings');
     $item->setRteTagSet('mini');
     $this->form->addItem($item);
     $section = new ilFormSectionHeaderGUI();
     $section->setTitle($lng->txt('dcl_permissions_form'));
     $this->form->addItem($section);
     $item = new ilCustomInputGUI();
     $item->setHtml($lng->txt('dcl_table_info'));
     $item->setTitle($lng->txt('dcl_table_info_title'));
     $this->form->addItem($item);
     $item = new ilCheckboxInputGUI($lng->txt('dcl_add_perm'), 'add_perm');
     //		$item->setInfo($lng->txt("dcl_add_perm_info"));
     $this->form->addItem($item);
     $item = new ilCheckboxInputGUI($lng->txt('dcl_edit_perm'), 'edit_perm');
     //		$item->setInfo($lng->txt("dcl_edit_perm_info"));
     $this->form->addItem($item);
     $item = new ilCheckboxInputGUI($lng->txt('dcl_delete_perm'), 'delete_perm');
     //		$item->setInfo($lng->txt("dcl_delete_perm_info"));
     $this->form->addItem($item);
     $item = new ilCheckboxInputGUI($lng->txt('dcl_edit_by_owner'), 'edit_by_owner');
     //		$item->setInfo($lng->txt("dcl_edit_by_owner_info"));
     $this->form->addItem($item);
     $item = new ilCheckboxInputGUI($lng->txt('dcl_export_enabled'), 'export_enabled');
     $this->form->addItem($item);
     $item = new ilCheckboxInputGUI($lng->txt('dcl_limited'), 'limited');
     $sitem1 = new ilDateTimeInputGUI($lng->txt('dcl_limit_start'), 'limit_start');
     $sitem2 = new ilDateTimeInputGUI($lng->txt('dcl_limit_end'), 'limit_end');
     //		$item->setInfo($lng->txt("dcl_limited_info"));
     $item->addSubItem($sitem1);
     $item->addSubItem($sitem2);
     $this->form->addItem($item);
     if ($a_mode == "edit") {
         $this->form->addCommandButton('update', $lng->txt('dcl_table_' . $a_mode));
     } else {
         $this->form->addCommandButton('save', $lng->txt('dcl_table_' . $a_mode));
     }
     $this->form->addCommandButton('cancel', $lng->txt('cancel'));
     $this->form->setFormAction($ilCtrl->getFormAction($this, $a_mode));
     if ($a_mode == "edit") {
         $this->form->setTitle($lng->txt('dcl_edit_table'));
     } else {
         $this->form->setTitle($lng->txt('dcl_new_table'));
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:61,代码来源:class.ilDataCollectionTableEditGUI.php

示例5: parseFieldDefinition

 protected static function parseFieldDefinition($a_type, ilPropertyFormGUI $a_form, ilObjectGUI $a_gui, $a_data)
 {
     global $lng, $rbacsystem, $ilCtrl;
     if (!is_array($a_data)) {
         return;
     }
     foreach ($a_data as $area_caption => $fields) {
         if (is_numeric($area_caption) || !trim($area_caption)) {
             $area_caption = "obj_" . $a_type;
         }
         if (is_array($fields) && sizeof($fields) == 2) {
             $cmd = $fields[0];
             $fields = $fields[1];
             if (is_array($fields)) {
                 $ftpl = new ilTemplate("tpl.external_settings.html", true, true, "Services/Administration");
                 $stack = array();
                 foreach ($fields as $field_caption_id => $field_value) {
                     $field_type = $subitems = null;
                     if (is_array($field_value)) {
                         $field_type = $field_value[1];
                         $subitems = $field_value[2];
                         $field_value = $field_value[0];
                     }
                     if (self::parseFieldValue($field_type, $field_value)) {
                         $ftpl->setCurrentBlock("value_bl");
                         $ftpl->setVariable("VALUE", $field_value);
                         $ftpl->parseCurrentBlock();
                     }
                     if (is_array($subitems)) {
                         $ftpl->setCurrentBlock("subitem_bl");
                         foreach ($subitems as $sub_caption_id => $sub_value) {
                             $sub_type = null;
                             if (is_array($sub_value)) {
                                 $sub_type = $sub_value[1];
                                 $sub_value = $sub_value[0];
                             }
                             self::parseFieldValue($sub_type, $sub_value);
                             $ftpl->setVariable("SUBKEY", $lng->txt($sub_caption_id));
                             $ftpl->setVariable("SUBVALUE", $sub_value);
                             $ftpl->parseCurrentBlock();
                         }
                     }
                     $ftpl->setCurrentBlock("row_bl");
                     $ftpl->setVariable("KEY", $lng->txt($field_caption_id));
                     $ftpl->parseCurrentBlock();
                 }
                 if ($rbacsystem->checkAccess("visible,read", $a_gui->object->getRefId())) {
                     if (!$cmd) {
                         $cmd = "view";
                     }
                     $ilCtrl->setParameter($a_gui, "ref_id", $a_gui->object->getRefId());
                     $ftpl->setCurrentBlock("edit_bl");
                     $ftpl->setVariable("URL_EDIT", $ilCtrl->getLinkTargetByClass(array("ilAdministrationGUI", get_class($a_gui)), $cmd));
                     $ftpl->setVariable("TXT_EDIT", $lng->txt("adm_external_setting_edit"));
                     $ftpl->parseCurrentBlock();
                 }
                 $ext = new ilCustomInputGUI($lng->txt($area_caption));
                 $ext->setHtml($ftpl->get());
                 $a_form->addItem($ext);
             }
         }
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:63,代码来源:class.ilAdministrationSettingsFormHandler.php

示例6: fillMembershipLimitation

 /**
  * Show membership limitations
  *
  * @access protected
  * @return
  */
 protected function fillMembershipLimitation()
 {
     global $ilAccess, $ilCtrl;
     include_once 'Modules/Course/classes/class.ilObjCourseGrouping.php';
     if (!($items = ilObjCourseGrouping::_getGroupingItems($this->container))) {
         return true;
     }
     $mem = new ilCustomInputGUI($this->lng->txt('groupings'));
     $tpl = new ilTemplate('tpl.membership_limitation_form.html', true, true, 'Services/Membership');
     $tpl->setVariable('LIMIT_INTRO', $this->lng->txt($this->type . '_grp_info_reg'));
     foreach ($items as $ref_id) {
         $obj_id = ilObject::_lookupObjId($ref_id);
         $type = ilObject::_lookupType($obj_id);
         $title = ilObject::_lookupTitle($obj_id);
         if ($ilAccess->checkAccess('visible', '', $ref_id, $type)) {
             include_once './Services/Link/classes/class.ilLink.php';
             $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
             $tpl->setVariable('LINK_ITEM', $ilCtrl->getLinkTargetByClass("ilrepositorygui", ""));
             $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
             $tpl->setVariable('ITEM_LINKED_TITLE', $title);
         } else {
             $tpl->setVariable('ITEM_TITLE');
         }
         $tpl->setCurrentBlock('items');
         $tpl->setVariable('TYPE_ICON', ilObject::_getIcon($obj_id, tiny, $type));
         $tpl->setVariable('ALT_ICON', $this->lng->txt('obj_' . $type));
         $tpl->parseCurrentBlock();
     }
     $mem->setHtml($tpl->get());
     if (!ilObjCourseGrouping::_checkGroupingDependencies($this->container)) {
         $mem->setAlert($this->container->getMessage());
         $this->enableRegistration(false);
     }
     $this->form->addItem($mem);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:41,代码来源:class.ilRegistrationGUI.php

示例7: initServerInfoForm

 /**
  * Init server info form.
  *
  * @param        int        $a_mode        Edit Mode
  */
 public function initServerInfoForm()
 {
     global $lng, $ilClientIniFile, $ilSetting;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     // installation name
     $ne = new ilNonEditableValueGUI($lng->txt("inst_name"), "");
     $ne->setValue($ilClientIniFile->readVariable("client", "name"));
     $ne->setInfo($ilClientIniFile->readVariable("client", "description"));
     $this->form->addItem($ne);
     // client id
     $ne = new ilNonEditableValueGUI($lng->txt("client_id"), "");
     $ne->setValue(CLIENT_ID);
     $this->form->addItem($ne);
     // installation id
     $ne = new ilNonEditableValueGUI($lng->txt("inst_id"), "");
     $ne->setValue($ilSetting->get("inst_id"));
     $this->form->addItem($ne);
     // database version
     $ne = new ilNonEditableValueGUI($lng->txt("db_version"), "");
     $ne->setValue($ilSetting->get("db_version"));
     include_once "./Services/Database/classes/class.ilDBUpdate.php";
     $this->form->addItem($ne);
     // ilias version
     $ne = new ilNonEditableValueGUI($lng->txt("ilias_version"), "");
     $ne->setValue($ilSetting->get("ilias_version"));
     $this->form->addItem($ne);
     // version controll information, object can be created by factory in later revisions (if we support git etc.)
     require_once 'Services/Administration/classes/class.ilSubversionInformation.php';
     $vc = new ilSubversionInformation();
     $revision_info = $vc->getInformationAsHtml();
     if ($revision_info) {
         $ne = new ilCustomInputGUI($lng->txt('vc_information'), '');
         $ne->setHtml($revision_info);
         $this->form->addItem($ne);
     }
     // host
     $ne = new ilNonEditableValueGUI($lng->txt("host"), "");
     $ne->setValue($_SERVER["SERVER_NAME"]);
     $this->form->addItem($ne);
     // ip & port
     $ne = new ilNonEditableValueGUI($lng->txt("ip_address") . " & " . $this->lng->txt("port"), "");
     $ne->setValue($_SERVER["SERVER_ADDR"] . ":" . $_SERVER["SERVER_PORT"]);
     $this->form->addItem($ne);
     // server
     $ne = new ilNonEditableValueGUI($lng->txt("server_software"), "");
     $ne->setValue($_SERVER["SERVER_SOFTWARE"]);
     $this->form->addItem($ne);
     // http path
     $ne = new ilNonEditableValueGUI($lng->txt("http_path"), "");
     $ne->setValue(ILIAS_HTTP_PATH);
     $this->form->addItem($ne);
     // absolute path
     $ne = new ilNonEditableValueGUI($lng->txt("absolute_path"), "");
     $ne->setValue(ILIAS_ABSOLUTE_PATH);
     $this->form->addItem($ne);
     $not_set = $lng->txt("path_not_set");
     // convert
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_convert"), "");
     $ne->setValue(PATH_TO_CONVERT ? PATH_TO_CONVERT : $not_set);
     $this->form->addItem($ne);
     // zip
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_zip"), "");
     $ne->setValue(PATH_TO_ZIP ? PATH_TO_ZIP : $not_set);
     $this->form->addItem($ne);
     // unzip
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_unzip"), "");
     $ne->setValue(PATH_TO_UNZIP ? PATH_TO_UNZIP : $not_set);
     $this->form->addItem($ne);
     // java
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_java"), "");
     $ne->setValue(PATH_TO_JAVA ? PATH_TO_JAVA : $not_set);
     $this->form->addItem($ne);
     // htmldoc
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_htmldoc"), "");
     $ne->setValue(PATH_TO_HTMLDOC ? PATH_TO_HTMLDOC : $not_set);
     $this->form->addItem($ne);
     // mkisofs
     $ne = new ilNonEditableValueGUI($lng->txt("path_to_mkisofs"), "");
     $ne->setValue(PATH_TO_MKISOFS ? PATH_TO_MKISOFS : $not_set);
     $this->form->addItem($ne);
     // latex
     $ne = new ilNonEditableValueGUI($lng->txt("url_to_latex"), "");
     $ne->setValue(URL_TO_LATEX ? URL_TO_LATEX : $not_set);
     $this->form->addItem($ne);
     $this->form->setTitle($lng->txt("server_data"));
     $this->form->setFormAction($this->ctrl->getFormAction($this));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:93,代码来源:class.ilObjSystemFolderGUI.php

示例8: buildForm

 /**
  * {@inheritdoc}
  */
 public function buildForm(ilPropertyFormGUI $form)
 {
     /**
      * @var $lng ilLanguage
      */
     global $lng;
     $header = new ilFormSectionHeaderGUI();
     $header->setTitle($lng->txt('passwd_encoder_' . $this->getName()));
     $form->addItem($header);
     $salt = new ilCustomInputGUI($lng->txt('passwd_encoder_bcrypt_client_salt'), 'bcrypt_salt');
     $info = array($lng->txt('passwd_encoder_client_bcrypt_salt_info'));
     if (!$this->isBcryptSupported()) {
         $info[] = sprintf($lng->txt('passwd_encoder_client_bcrypt_salt_info_php537'), PHP_VERSION);
     }
     if (1 == count($info)) {
         $salt->setInfo(current($info));
     } else {
         $salt->setInfo('<ul><li>' . implode('</li><li>', $info) . '</li></ul>');
     }
     $salt->setHtml($this->getClientSaltLocation());
     $form->addItem($salt);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilBcryptPasswordEncoder.php

示例9: getHTML

 /**
  * @return string
  */
 public function getHTML()
 {
     global $tpl, $ilTabs, $ilCtrl, $lng, $ilHelp;
     /**
      * @var $ilHelp ilHelpGUI
      */
     $ilHelp->setScreenIdComponent('bibl');
     $form = new ilPropertyFormGUI();
     $ilTabs->clearTargets();
     $ilTabs->setBackTarget($lng->txt("back"), $ilCtrl->getLinkTarget($this, 'showContent'));
     $form->setTitle($lng->txt('detail_view'));
     // add link button if a link is defined in the settings
     $set = new ilSetting("bibl");
     $link = $set->get(strtolower($this->bibl_obj->getFiletype()));
     if (!empty($link)) {
         $form->addCommandButton('autoLink', 'Link');
     }
     $attributes = $this->entry->getAttributes();
     //translate array key in order to sort by those keys
     foreach ($attributes as $key => $attribute) {
         //Check if there is a specific language entry
         if ($lng->exists($key)) {
             $strDescTranslated = $lng->txt($key);
         } else {
             $arrKey = explode("_", $key);
             $is_standard_field = false;
             switch ($arrKey[0]) {
                 case 'bib':
                     $is_standard_field = ilBibTex::isStandardField($arrKey[2]);
                     break;
                 case 'ris':
                     $is_standard_field = ilRis::isStandardField($arrKey[2]);
                     break;
             }
             //				var_dump($is_standard_field); // FSX
             if ($is_standard_field) {
                 $strDescTranslated = $lng->txt($arrKey[0] . "_default_" . $arrKey[2]);
             } else {
                 $strDescTranslated = $arrKey[2];
             }
         }
         unset($attributes[$key]);
         $attributes[$strDescTranslated] = $attribute;
     }
     // sort attributes alphabetically by their array-key
     ksort($attributes, SORT_STRING);
     // render attributes to html
     foreach ($attributes as $key => $attribute) {
         $ci = new ilCustomInputGUI($key);
         $ci->setHtml($attribute);
         $form->addItem($ci);
     }
     // generate/render links to libraries
     $settings = ilBibliographicSetting::getAll();
     foreach ($settings as $set) {
         $ci = new ilCustomInputGUI($set->getName());
         $ci->setHtml($set->getButton($this->bibl_obj, $this->entry));
         $form->addItem($ci);
     }
     $tpl->setPermanentLink("bibl", $this->bibl_obj->getRefId(), "_" . $_GET[ilObjBibliographicGUI::P_ENTRY_ID]);
     // set content and title
     return $form->getHTML();
     //Permanent Link
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:67,代码来源:class.ilBibliographicDetailsGUI.php

示例10: initFormLimits

 /**
  * init limit form
  *
  * @access protected
  * @param string mode selfAssessment or final
  * @return
  */
 protected function initFormLimits($a_mode)
 {
     if (!is_object($this->form)) {
         include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
         $this->form = new ilPropertyFormGUI();
     }
     $this->form->setFormAction($this->ctrl->getFormAction($this));
     $this->form->setTableWidth('100%');
     $this->form->setTitleIcon(ilUtil::getImagePath('icon_lobj.png'), $this->lng->txt('crs_objective'));
     switch ($a_mode) {
         case 'selfAssessment':
             $this->form->setTitle($this->lng->txt('crs_objective_wiz_self_limit'));
             $this->form->addCommandButton('updateSelfAssessmentLimits', $this->lng->txt('crs_wiz_next'));
             $this->form->addCommandButton('selfAssessmentAssignment', $this->lng->txt('crs_wiz_back'));
             $tests = $this->objectives_qst_obj->getSelfAssessmentTests();
             $max_points = $this->objectives_qst_obj->getSelfAssessmentPoints();
             break;
         case 'final':
             $this->form->setTitle($this->lng->txt('crs_objective_wiz_final_limit'));
             $this->form->addCommandButton('updateFinalTestLimits', $this->lng->txt('crs_wiz_next'));
             $this->form->addCommandButton('finalTestAssignment', $this->lng->txt('crs_wiz_back'));
             $tests = $this->objectives_qst_obj->getFinalTests();
             $max_points = $this->objectives_qst_obj->getFinalTestPoints();
             break;
     }
     $over = new ilCustomInputGUI($this->lng->txt('crs_objective_qst_summary'), '');
     $tpl = new ilTemplate('tpl.crs_objective_qst_summary.html', true, true, 'Modules/Course');
     $limit = 0;
     foreach ($tests as $test) {
         $limit = $test['limit'];
         foreach ($this->objectives_qst_obj->getQuestionsOfTest($test['obj_id']) as $question) {
             $tpl->setCurrentBlock('qst');
             $tpl->setVariable('QST_TITLE', $question['title']);
             if (strlen($question['description'])) {
                 $tpl->setVariable('QST_DESCRIPTION', $question['description']);
             }
             $tpl->setVariable('QST_POINTS', $question['points'] . ' ' . $this->lng->txt('crs_objective_points'));
             $tpl->parseCurrentBlock();
         }
         $tpl->setCurrentBlock('tst');
         $tpl->setVariable('TST_TITLE', ilObject::_lookupTitle($test['obj_id']));
         if ($desc = ilObject::_lookupDescription($test['obj_id'])) {
             $tpl->setVariable('TST_DESC', $desc);
         }
         $tpl->setVariable('TST_TYPE_IMG', ilUtil::getTypeIconPath('tst', $test['obj_id'], 'tiny'));
         $tpl->setVariable('TST_ALT_IMG', $this->lng->txt('obj_tst'));
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable('TXT_ALL_POINTS', $this->lng->txt('crs_objective_all_points'));
     $tpl->setVariable('TXT_POINTS', $this->lng->txt('crs_objective_points'));
     $tpl->setVariable('POINTS', $max_points);
     $over->setHtml($tpl->get());
     $this->form->addItem($over);
     $req = new ilTextInputGUI($this->lng->txt('crs_obj_required_points'), 'limit');
     $req->setValue($limit);
     $req->setMaxLength(5);
     $req->setSize(3);
     $req->setRequired(true);
     switch ($a_mode) {
         case 'selfAssessment':
             $req->setInfo($this->lng->txt('crs_obj_initial_req_info'));
             break;
         case 'final':
             $req->setInfo($this->lng->txt('crs_obj_final_req_info'));
             break;
     }
     $this->form->addItem($req);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:75,代码来源:class.ilCourseObjectivesGUI.php

示例11: initForm

 function initForm()
 {
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'save'));
     $this->form_gui->setTitle($this->lng->txt('reg_settings_header'));
     $reg_type = new ilRadioGroupInputGUI($this->lng->txt('reg_type'), 'reg_type');
     $reg_type->addOption(new ilRadioOption($this->lng->txt('reg_disabled'), IL_REG_DISABLED));
     $option = new ilRadioOption($this->lng->txt('reg_direct'), IL_REG_DIRECT);
     $option->setInfo($this->lng->txt('reg_direct_info'));
     $cd = new ilCheckboxInputGUI($this->lng->txt('reg_allow_codes'), 'reg_codes_' . IL_REG_DIRECT);
     $cd->setInfo($this->lng->txt('reg_allow_codes_info'));
     $option->addSubItem($cd);
     $reg_type->addOption($option);
     $option = new ilRadioOption($this->lng->txt('reg_approve'), IL_REG_APPROVE);
     $option->setInfo($this->lng->txt('reg_approve_info'));
     $cd = new ilCheckboxInputGUI($this->lng->txt('reg_allow_codes'), 'reg_codes_' . IL_REG_APPROVE);
     $cd->setInfo($this->lng->txt('reg_allow_codes_info'));
     $option->addSubItem($cd);
     $reg_type->addOption($option);
     $option = new ilRadioOption($this->lng->txt('reg_type_confirmation'), IL_REG_ACTIVATION);
     $option->setInfo($this->lng->txt('reg_type_confirmation_info'));
     $lt = new ilNumberInputGUI($this->lng->txt('reg_confirmation_hash_life_time'), 'reg_hash_life_time');
     $lt->setSize(5);
     $lt->setMaxLength(5);
     $lt->setMinValue(ilRegistrationSettings::REG_HASH_LIFETIME_MIN_VALUE);
     $lt->setRequired(true);
     $lt->setInfo($this->lng->txt('reg_confirmation_hash_life_time_info'));
     $lt->setSuffix($this->lng->txt('seconds'));
     $option->addSubItem($lt);
     $cd = new ilCheckboxInputGUI($this->lng->txt('reg_allow_codes'), 'reg_codes_' . IL_REG_ACTIVATION);
     $cd->setInfo($this->lng->txt('reg_allow_codes_info'));
     $option->addSubItem($cd);
     $reg_type->addOption($option);
     $option = new ilRadioOption($this->lng->txt('registration_reg_type_codes'), IL_REG_CODES);
     $option->setInfo($this->lng->txt('registration_reg_type_codes_info'));
     $reg_type->addOption($option);
     $this->form_gui->addItem($reg_type);
     $pwd_gen = new ilCheckboxInputGUI($this->lng->txt('passwd_generation'), 'reg_pwd');
     $pwd_gen->setValue(1);
     $pwd_gen->setInfo($this->lng->txt('reg_info_pwd'));
     $this->form_gui->addItem($pwd_gen);
     require_once 'Services/Captcha/classes/class.ilCaptchaUtil.php';
     $cap = new ilCheckboxInputGUI($this->lng->txt('adm_captcha_anonymous_short'), 'activate_captcha_anonym');
     $cap->setInfo($this->lng->txt('adm_captcha_anonymous_reg'));
     $cap->setValue(1);
     if (!ilCaptchaUtil::checkFreetype()) {
         $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
     }
     $this->form_gui->addItem($cap);
     $approver = new ilTextInputGUI($this->lng->txt('reg_notification'), 'reg_approver');
     $approver->setSize(32);
     $approver->setMaxLength(50);
     $approver->setInfo($this->lng->txt('reg_notification_info'));
     $this->form_gui->addItem($approver);
     $roles = new ilRadioGroupInputGUI($this->lng->txt('reg_role_assignment'), 'reg_role_type');
     $option = new ilRadioOption($this->lng->txt('reg_fixed'), IL_REG_ROLES_FIXED);
     $list = new ilCustomInputGUI($this->lng->txt('reg_available_roles'));
     $edit = $this->ctrl->getLinkTarget($this, 'editRoles');
     $list->setHtml($this->__parseRoleList($this->__prepareRoleList(), $edit));
     $option->addSubItem($list);
     $roles->addOption($option);
     $option = new ilRadioOption($this->lng->txt('reg_email'), IL_REG_ROLES_EMAIL);
     $list = new ilCustomInputGUI($this->lng->txt('reg_available_roles'));
     $edit = $this->ctrl->getLinkTarget($this, 'editEmailAssignments');
     $list->setHtml($this->__parseRoleList($this->__prepareAutomaticRoleList(), $edit));
     $option->addSubItem($list);
     $roles->addOption($option);
     $roles->setInfo($this->lng->txt('registration_codes_override_global_info'));
     $this->form_gui->addItem($roles);
     $limit = new ilCheckboxInputGUI($this->lng->txt('reg_access_limitations'), 'reg_access_limitation');
     $limit->setValue(1);
     $list = new ilCustomInputGUI($this->lng->txt('reg_available_roles'));
     $edit = $this->ctrl->getLinkTarget($this, 'editRoleAccessLimitations');
     $list->setHtml($this->__parseRoleList($this->__prepareAccessLimitationRoleList(), $edit));
     $list->setInfo($this->lng->txt('registration_codes_override_global_info'));
     $limit->addSubItem($list);
     $this->form_gui->addItem($limit);
     $domains = new ilTextInputGUI($this->lng->txt('reg_allowed_domains'), 'reg_allowed_domains');
     $domains->setInfo($this->lng->txt('reg_allowed_domains_info'));
     $this->form_gui->addItem($domains);
     $this->form_gui->addCommandButton('save', $this->lng->txt('save'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:83,代码来源:class.ilRegistrationSettingsGUI.php

示例12: initIliasSettingsForm

 public function initIliasSettingsForm()
 {
     /**
      * @var $ilCtrl ilCtrl
      */
     global $lng, $ilCtrl;
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($ilCtrl->getFormAction($this, 'saveIliasSettings'));
     $this->form->setTitle($this->getPluginObject()->txt('general_settings'));
     $this->form->addCommandButton('saveIliasSettings', $lng->txt('save'));
     $this->form->addCommandButton('cancelIliasSettings', $lng->txt('cancel'));
     $cb_group = new ilCheckboxGroupInputGUI($this->pluginObj->txt('object_creation_settings'), 'obj_creation_settings');
     include_once "Services/Administration/classes/class.ilSettingsTemplate.php";
     $templates = ilSettingsTemplate::getAllSettingsTemplates("xavc");
     if ($templates) {
         foreach ($templates as $item) {
             $cb_simple = new ilCheckboxOption($this->pluginObj->txt($item["title"]), $item["id"]);
             $cb_group->addOption($cb_simple);
         }
     }
     $cb_group->setInfo($this->pluginObj->txt('template_info'));
     $this->form->addItem($cb_group);
     $obj_title_suffix = new ilCheckboxInputGUI($this->pluginObj->txt('obj_title_suffix'), 'obj_title_suffix');
     $obj_title_suffix->setInfo($this->pluginObj->txt('obj_title_suffix_info'));
     $this->form->addItem($obj_title_suffix);
     $crs_grp_trigger = new ilCheckboxInputGUI($this->pluginObj->txt('allow_crs_grp_trigger'), 'allow_crs_grp_trigger');
     $crs_grp_trigger->setInfo($this->pluginObj->txt('allow_crs_grp_trigger_info'));
     $this->form->addItem($crs_grp_trigger);
     $show_free_slots = new ilCheckboxInputGUI($this->pluginObj->txt('show_free_slots'), 'show_free_slots');
     $show_free_slots->setInfo($this->pluginObj->txt('show_free_slots_info'));
     $this->form->addItem($show_free_slots);
     $enable_perm_room = new ilCheckboxInputGUI($this->pluginObj->txt('enable_perm_room'), 'enable_perm_room');
     $enable_perm_room->setInfo($this->pluginObj->txt('enable_perm_room_info'));
     $default_perm_room = new ilCheckboxInputGUI($this->pluginObj->txt('default_perm_room'), 'default_perm_room');
     $default_perm_room->setInfo($this->pluginObj->txt('default_perm_room_info'));
     $enable_perm_room->addSubItem($default_perm_room);
     $this->form->addItem($enable_perm_room);
     $add_to_desktop = new ilCheckboxInputGUI($this->pluginObj->txt('add_to_desktop'), 'add_to_desktop');
     $add_to_desktop->setInfo($this->pluginObj->txt('add_to_desktop_info'));
     $this->form->addItem($add_to_desktop);
     $content_file_types = new ilTextInputGUI($this->pluginObj->txt('content_file_types'), 'content_file_types');
     $content_file_types->setRequired(true);
     $content_file_types->setInfo($this->pluginObj->txt('content_file_types_info'));
     $this->form->addItem($content_file_types);
     $user_folders = new ilCheckboxInputGUI($this->pluginObj->txt('use_user_folders'), 'use_user_folders');
     $user_folders->setInfo($this->pluginObj->txt('use_user_folders_info'));
     if (ilAdobeConnectServer::getSetting('user_assignment_mode') == ilAdobeConnectServer::ASSIGN_USER_DFN_EMAIL) {
         $user_folders->setDisabled(true);
     }
     $this->form->addItem($user_folders);
     $xavc_options = array("host" => $this->pluginObj->txt("presenter"), "mini-host" => $this->pluginObj->txt("moderator"), "view" => $this->pluginObj->txt("participant"), "denied" => $this->pluginObj->txt('denied'));
     $mapping_crs = new ilNonEditableValueGUI($this->pluginObj->txt('default_crs_mapping'), 'default_crs_mapping');
     //		$crs_owner = new ilSelectInputGUI($lng->txt('owner'), 'crs_owner');
     //		$crs_owner->setOptions($xavc_options);
     //		$mapping_crs->addSubItem($crs_owner);
     $crs_admin = new ilSelectInputGUI($lng->txt('il_crs_admin'), 'crs_admin');
     $crs_admin->setOptions($xavc_options);
     $mapping_crs->addSubItem($crs_admin);
     $crs_tutor = new ilSelectInputGUI($lng->txt('il_crs_tutor'), 'crs_tutor');
     $crs_tutor->setOptions($xavc_options);
     $mapping_crs->addSubItem($crs_tutor);
     $crs_member = new ilSelectInputGUI($lng->txt('il_crs_member'), 'crs_member');
     $crs_member->setOptions($xavc_options);
     $mapping_crs->addSubItem($crs_member);
     $this->form->addItem($mapping_crs);
     $mapping_grp = new ilNonEditableValueGUI($this->pluginObj->txt('default_grp_mapping'), 'default_grp_mapping');
     //		$grp_owner = new ilSelectInputGUI($lng->txt('owner'), 'grp_owner');
     //		$grp_owner->setOptions($xavc_options);
     //		$mapping_grp->addSubItem($grp_owner);
     $grp_admin = new ilSelectInputGUI($lng->txt('il_grp_admin'), 'grp_admin');
     $grp_admin->setOptions($xavc_options);
     $mapping_grp->addSubItem($grp_admin);
     $grp_member = new ilSelectInputGUI($lng->txt('il_grp_member'), 'grp_member');
     $grp_member->setOptions($xavc_options);
     $mapping_grp->addSubItem($grp_member);
     $this->form->addItem($mapping_grp);
     $ac_permissions = ilXAVCPermissions::getPermissionsArray();
     //@todo nahmad: in Template auslagern!
     $tbl = "<table width='100%' >\n\t\t<tr>\n\t\t<td> </td> \n\t\t<td>" . $this->pluginObj->txt('presenter') . "</td>\n\t\t<td>" . $this->pluginObj->txt('moderator') . "</td>\n\t\t<td>" . $this->pluginObj->txt('participant') . "</td>\n\t\t<td>" . $this->pluginObj->txt('denied') . "</td>\n\t\t\n\t\t</tr>";
     foreach ($ac_permissions as $ac_permission => $ac_roles) {
         $tbl .= "<tr> <td>" . $this->pluginObj->txt($ac_permission) . "</td>";
         foreach ($ac_roles as $ac_role => $ac_access) {
             $tbl .= "<td>";
             $tbl .= ilUtil::formCheckbox((bool) $ac_access, 'permissions[' . $ac_permission . '][' . $ac_role . ']', $ac_role, false);
             $tbl .= "</td>";
         }
         $tbl .= "</tr>";
     }
     $tbl .= "</table>";
     $matrix = new ilCustomInputGUI($this->pluginObj->txt('ac_permissions'), '');
     $matrix->setHtml($tbl);
     $this->form->addItem($matrix);
 }
开发者ID:KamuiXenom,项目名称:ILIAS_AdobeConnectPlugin,代码行数:94,代码来源:class.ilAdobeConnectConfigGUI.php

示例13: fillAgreement

 /**
  * Show user agreement
  *
  * @access protected
  * @return
  */
 protected function fillAgreement()
 {
     global $ilUser;
     if (!$this->isRegistrationPossible()) {
         return true;
     }
     include_once 'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
     if (!$this->privacy->confirmationRequired($this->type) and !ilCourseDefinedFieldDefinition::_hasFields($this->container->getId())) {
         return true;
     }
     $this->lng->loadLanguageModule('ps');
     include_once 'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php';
     $fields_info = ilExportFieldsInfo::_getInstanceByType(ilObject::_lookupType($this->container->getId()));
     if (!count($fields_info->getExportableFields())) {
         return true;
     }
     $section = new ilFormSectionHeaderGUI();
     $section->setTitle($this->lng->txt('usr_agreement'));
     $this->form->addItem($section);
     $fields = new ilCustomInputGUI($this->lng->txt($this->type . '_user_agreement'), '');
     $tpl = new ilTemplate('tpl.agreement_form.html', true, true, 'Services/Membership');
     $tpl->setVariable('TXT_INFO_AGREEMENT', $this->lng->txt($this->type . '_info_agreement'));
     foreach ($fields_info->getExportableFields() as $field) {
         $tpl->setCurrentBlock('field_item');
         $tpl->setVariable('FIELD_NAME', $this->lng->txt($field));
         $tpl->parseCurrentBlock();
     }
     $fields->setHtml($tpl->get());
     $this->form->addItem($fields);
     $this->showCustomFields();
     // Checkbox agreement
     if ($this->privacy->confirmationRequired($this->type)) {
         $agreement = new ilCheckboxInputGUI($this->lng->txt($this->type . '_agree'), 'agreement');
         $agreement->setRequired(true);
         $agreement->setOptionTitle($this->lng->txt($this->type . '_info_agree'));
         $agreement->setValue(1);
         $this->form->addItem($agreement);
     }
     return true;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:46,代码来源:class.ilRegistrationGUI.php

示例14: editQuestion


//.........这里部分代码省略.........
             $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") . '" />');
             $sel_result_units = new ilSelectInputGUI($this->lng->txt('unit'), 'unit_' . $result->getResult());
             $sel_result_units->setOptions(array(0 => $this->lng->txt('no_selection')) + $unit_options);
             $sel_result_units->setInfo($this->lng->txt('result_unit_info'));
             if (is_object($result->getUnit())) {
                 $sel_result_units->setValue($result->getUnit()->getId());
             }
             $mc_result_units = new ilMultiSelectInputGUI($this->lng->txt('result_units'), 'units_' . $result->getResult());
             $mc_result_units->setOptions($unit_options);
             $mc_result_units->setInfo($this->lng->txt('result_units_info'));
             $selectedvalues = array();
             foreach ($unit_options as $unit_id => $txt) {
                 if ($this->hasResultUnit($result, $unit_id, $result_units)) {
                     $selectedvalues[] = $unit_id;
                 }
             }
             $mc_result_units->setValue($selectedvalues);
             $result_type = new ilRadioGroupInputGUI($this->lng->txt('result_type_selection'), 'result_type_' . $result->getResult());
             $result_type->setRequired(true);
             $no_type = new ilRadioOption($this->lng->txt('no_result_type'), 0);
             $no_type->setInfo($this->lng->txt('fq_no_restriction_info'));
             $result_dec = new ilRadioOption($this->lng->txt('result_dec'), 1);
             $result_dec->setInfo($this->lng->txt('result_dec_info'));
             $result_frac = new ilRadioOption($this->lng->txt('result_frac'), 2);
             $result_frac->setInfo($this->lng->txt('result_frac_info'));
             $result_co_frac = new ilRadioOption($this->lng->txt('result_co_frac'), 3);
             $result_co_frac->setInfo($this->lng->txt('result_co_frac_info'));
             $result_type->addOption($no_type);
             $result_type->addOption($result_dec);
             $result_type->addOption($result_frac);
             $result_type->addOption($result_co_frac);
             $result_type->setValue(strlen($result->getResultType()) ? $result->getResultType() : 0);
             $points = new ilNumberInputGUI($this->lng->txt('points'), 'points_' . $result->getResult());
开发者ID:arlendotcn,项目名称:ilias,代码行数:67,代码来源:class.assFormulaQuestionGUI.php

示例15: initPropertiesForm

 /**
  * Init  form.
  *
  * @param        int        $a_mode        Edit Mode
  */
 public function initPropertiesForm()
 {
     global $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     // title
     $ti = new ilTextInputGUI($this->txt("title"), "title");
     $ti->setRequired(true);
     $this->form->addItem($ti);
     // description
     $ta = new ilTextAreaInputGUI($this->txt("description"), "desc");
     $this->form->addItem($ta);
     // online
     $cb = new ilCheckboxInputGUI($this->lng->txt("online"), "online");
     $this->form->addItem($cb);
     // online
     //$rd = new ilCheckboxInputGUI($this->lng->txt("learners_see_rpt_details"), "learners_see_rpt_details");
     $rd = new ilCheckboxInputGUI("Learners See Report Details", "learners_see_rpt_details");
     $this->form->addItem($rd);
     // version
     $v = new ilNonEditableValueGUI($this->lng->txt("version"), "version");
     $this->form->addItem($v);
     // SCORM PIF
     if ($this->object->getExistsOnCloud()) {
         $uploadTxt = $this->txt("upload_new_package_version");
     } else {
         $uploadTxt = $this->txt("upload_package");
     }
     $sf = new ilCustomInputGUI($uploadTxt, "scormfile");
     $id = $this->object->getId();
     $mode = "";
     // "update" if package already exists
     $uploadFormHtml = '<form action="' . $CFG->wwwroot . '/mod/rscloud/uploadhandler.php?id=' . $id . '&mode=' . $mode . '" method="post" ' . 'enctype="multipart/form-data">' . '<input type="file" name="file" id="file" /> ' . '<br />' . '<input type="submit" name="submit" value="Submit" />' . '</form>';
     $uploadInputItem = '<input type="file" name="scormcloudfile" id="scormcloudfile" /> ';
     $sf->setHtml($uploadInputItem);
     $this->form->addItem($sf);
     $this->form->setMultipart(true);
     $this->form->addCommandButton("updateProperties", $this->txt("save"));
     $this->form->setTitle($this->txt("edit_properties"));
     $this->form->setFormAction($ilCtrl->getFormAction($this));
 }
开发者ID:RusticiSoftware,项目名称:SCORMCloud_IliasPlugin,代码行数:46,代码来源:class.ilObjScormCloudGUI.php


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