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


PHP ilTemplate::setContent方法代码示例

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


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

示例1: showCmd

 private function showCmd()
 {
     $selectedSkillProfile = ilTestSkillEvaluationToolbarGUI::fetchSkillProfileParam($_POST);
     $testSession = $this->testSessionFactory->getSession();
     $this->skillEvaluation->init()->evaluate($testSession->getActiveId(), $testSession->getLastFinishedPass(), $testSession->getUserId());
     $evaluationToolbarGUI = $this->buildEvaluationToolbarGUI($testSession->getUserId(), $selectedSkillProfile);
     $personalSkillsGUI = $this->buildPersonalSkillsGUI($testSession->getUserId(), $selectedSkillProfile);
     $this->tpl->setContent($this->ctrl->getHTML($evaluationToolbarGUI) . $this->ctrl->getHTML($personalSkillsGUI));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:9,代码来源:class.ilTestSkillEvaluationGUI.php

示例2: showSkillThresholdsCmd

 private function showSkillThresholdsCmd()
 {
     $table = $this->buildTableGUI();
     $skillLevelThresholdList = $this->buildSkillLevelThresholdList();
     $skillLevelThresholdList->loadFromDb();
     $table->setSkillLevelThresholdList($skillLevelThresholdList);
     $assignmentList = $this->buildSkillQuestionAssignmentList();
     $assignmentList->loadFromDb();
     $table->setData($assignmentList->getUniqueAssignedSkills());
     $this->tpl->setContent($this->ctrl->getHTML($table));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:11,代码来源:class.ilTestSkillLevelThresholdsGUI.php

示例3: save

 /**
  * Save config
  */
 public function save()
 {
     $form = new ilCertificateConfigFormGUI($this);
     if ($form->saveObject()) {
         ilUtil::sendSuccess($this->pl->txt('msg_save_config'), true);
         $this->ctrl->redirect($this, 'configure');
     } else {
         $form->setValuesByPost();
         $this->tpl->setContent($form->getHTML());
     }
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:14,代码来源:class.ilCertificateConfigGUI.php

示例4: startImport

 public function startImport()
 {
     $form = $this->initForm("startImport");
     if (!$form->checkInput()) {
         $this->tpl->setContent($form->getHTML());
     } else {
         $file = $form->getInput("import_file");
         $importer = new ilOrgUnitSimpleImport();
         try {
             $file_path = $file["tmp_name"];
             $file_type = pathinfo($file["name"], PATHINFO_EXTENSION);
             $file_name = pathinfo($file["name"], PATHINFO_FILENAME);
             if ($file_type == "zip") {
                 $extract_path = $file_path . '_extracted/';
                 $extracted_file = $extract_path . $file_name . '/manifest.xml';
                 $zip = new ZipArchive();
                 $res = $zip->open($file_path);
                 if ($res === true) {
                     $zip->extractTo($extract_path);
                     $zip->close();
                     if (file_exists($extracted_file)) {
                         $file_path = $extracted_file;
                     }
                 }
             }
             $importer->simpleImport($file_path);
         } catch (Exception $e) {
             $this->ilLog->write($e->getMessage() . " - " . $e->getTraceAsString());
             ilUtil::sendFailure($this->lng->txt("import_failed"), true);
             $this->ctrl->redirect($this, "render");
         }
         $this->displayImportResults($importer);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:34,代码来源:class.ilOrgUnitSimpleImportGUI.php

示例5: listFields

 /**
  * list fields
  */
 public function listFields()
 {
     // Show tables
     require_once "./Modules/DataCollection/classes/class.ilDataCollectionTable.php";
     $tables = $this->parent_obj->object->getTables();
     foreach ($tables as $table) {
         $options[$table->getId()] = $table->getTitle();
     }
     include_once './Services/Form/classes/class.ilSelectInputGUI.php';
     $table_selection = new ilSelectInputGUI('', 'table_id');
     $table_selection->setOptions($options);
     $table_selection->setValue($this->table_id);
     $this->toolbar->setFormAction($this->ctrl->getFormActionByClass("ilDataCollectionFieldListGUI", "doTableSwitch"));
     $this->toolbar->addText($this->lng->txt("dcl_table"));
     $this->toolbar->addInputItem($table_selection);
     $this->toolbar->addFormButton($this->lng->txt('change'), 'doTableSwitch');
     $this->toolbar->addSeparator();
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "create"));
     $this->toolbar->addSeparator();
     $this->ctrl->setParameterByClass("ildatacollectiontableeditgui", "table_id", $this->table_id);
     $this->toolbar->addButton($this->lng->txt("dcl_table_settings"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "edit"));
     $this->toolbar->addButton($this->lng->txt("dcl_delete_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "confirmDelete"));
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_field"), $this->ctrl->getLinkTargetByClass("ildatacollectionfieldeditgui", "create"));
     // requested not to implement this way...
     //        $tpl->addJavaScript("Modules/DataCollection/js/fastTableSwitcher.js");
     require_once './Modules/DataCollection/classes/class.ilDataCollectionFieldListTableGUI.php';
     $list = new ilDataCollectionFieldListTableGUI($this, $this->ctrl->getCmd(), $this->table_id);
     $this->tpl->setContent($list->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilDataCollectionFieldListGUI.php

示例6: showMarkSchema

 /**
  * Display mark schema
  * @param ilPropertyFormGUI $ects_form
  */
 protected function showMarkSchema(ilPropertyFormGUI $ects_form = null)
 {
     if (!$this->object->canEditMarks()) {
         ilUtil::sendInfo($this->lng->txt('cannot_edit_marks'));
     }
     $this->toolbar->setFormAction($this->ctrl->getFormAction($this, 'showMarkSchema'));
     if ($this->object->canEditMarks()) {
         require_once 'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
         $create_simple_mark_schema_button = ilSubmitButton::getInstance();
         $create_simple_mark_schema_button->setCaption($this->lng->txt('tst_mark_create_simple_mark_schema'), false);
         $create_simple_mark_schema_button->setCommand('addSimpleMarkSchema');
         $this->toolbar->addButtonInstance($create_simple_mark_schema_button);
     }
     require_once 'Modules/Test/classes/tables/class.ilMarkSchemaTableGUI.php';
     $mark_schema_table = new ilMarkSchemaTableGUI($this, 'showMarkSchema', '', $this->object);
     $content_parts = array($mark_schema_table->getHTML());
     if ($this->objectSupportsEctsGrades() && $this->object->canEditEctsGrades()) {
         if (!$ects_form instanceof ilPropertyFormGUI) {
             $ects_form = $this->getEctsForm();
             $this->populateEctsForm($ects_form);
         }
         $content_parts[] = $ects_form->getHTML();
     }
     $this->tpl->setContent(implode('<br />', $content_parts));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:29,代码来源:class.ilMarkSchemaGUI.php

示例7: showFormCmd

 private function showFormCmd(ilPropertyFormGUI $form = null)
 {
     if ($form === null) {
         $form = $this->buildForm();
     }
     $this->tpl->setContent($this->ctrl->getHTML($form));
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:7,代码来源:class.ilObjQuestionPoolSettingsGeneralGUI.php

示例8: showAttachments

 public function showAttachments()
 {
     /**
      * @var $ilToolbar ilToolbarGUI
      */
     global $ilToolbar;
     $this->tpl->setTitle($this->lng->txt('mail'));
     require_once 'Services/Form/classes/class.ilFileInputGUI.php';
     $attachment = new ilFileInputGUI($this->lng->txt('upload'), 'userfile');
     $attachment->setRequired(true);
     $attachment->setSize(20);
     $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 'uploadFile'), true);
     $ilToolbar->addInputItem($attachment);
     $ilToolbar->addFormButton($this->lng->txt('upload'), 'uploadFile');
     require_once 'Services/Mail/classes/class.ilMailAttachmentTableGUI.php';
     $table = new ilMailAttachmentTableGUI($this, 'showAttachments');
     $mailData = $this->umail->getSavedData();
     $files = $this->mfile->getUserFilesData();
     $data = array();
     $counter = 0;
     foreach ($files as $file) {
         $checked = false;
         if (is_array($mailData['attachments']) && in_array($file['name'], $mailData['attachments'])) {
             $checked = true;
         }
         $data[$counter] = array('checked' => $checked, 'filename' => $file['name'], 'filesize' => (int) $file['size'], 'filecreatedate' => (int) $file['ctime']);
         ++$counter;
     }
     $table->setData($data);
     $this->tpl->setContent($table->getHtml());
     $this->tpl->show();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:32,代码来源:class.ilMailAttachmentGUI.php

示例9: confirmDelete

 public function confirmDelete()
 {
     $conf = new ilConfirmationGUI();
     $conf->setFormAction($this->ctrl->getFormAction($this));
     $conf->setHeaderText($this->pl->txt('msg_confirm_delete'));
     $conf->setConfirm($this->pl->txt('check_delete'), self::CMD_DELETE);
     $conf->setCancel($this->pl->txt('check_cancel'), self::CMD_INDEX);
     $this->tpl->setContent($conf->getHTML());
 }
开发者ID:JKN-INC,项目名称:UserDefaults,代码行数:9,代码来源:class.ilUDFCheckGUI.php

示例10: showConfirmation

 private function showConfirmation(ilPropertyFormGUI $form)
 {
     require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
     $confirmation = new ilConfirmationGUI();
     $confirmation->setHeaderText($this->lng->txt('tst_trigger_result_refreshing'));
     $confirmation->setFormAction($this->ctrl->getFormAction($this));
     $confirmation->setCancel($this->lng->txt('cancel'), self::CMD_SHOW_FORM);
     $confirmation->setConfirm($this->lng->txt('confirm'), self::CMD_CONFIRMED_SAVE_FORM);
     foreach ($form->getInputItemsRecursive() as $key => $item) {
         //vd("$key // {$item->getType()} // ".json_encode($_POST[$item->getPostVar()]));
         switch ($item->getType()) {
             case 'section_header':
                 continue;
             case 'datetime':
                 list($date, $time) = explode(' ', $item->getDate()->get(IL_CAL_DATETIME));
                 if ($item->getMode() == ilDateTimeInputGUI::MODE_SELECT) {
                     list($y, $m, $d) = explode('-', $date);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date][y]", $y);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date][m]", $m);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date][d]", $d);
                     if ($item->getShowTime()) {
                         list($h, $m, $s) = explode(':', $time);
                         $confirmation->addHiddenItem("{$item->getPostVar()}[time][h]", $h);
                         $confirmation->addHiddenItem("{$item->getPostVar()}[time][m]", $m);
                         $confirmation->addHiddenItem("{$item->getPostVar()}[time][s]", $s);
                     }
                 } else {
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date]", $date);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[time]", $time);
                 }
                 break;
             case 'duration':
                 $confirmation->addHiddenItem("{$item->getPostVar()}[MM]", (int) $item->getMonths());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[dd]", (int) $item->getDays());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[hh]", (int) $item->getHours());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[mm]", (int) $item->getMinutes());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[ss]", (int) $item->getSeconds());
                 break;
             case 'checkboxgroup':
                 if (is_array($item->getValue())) {
                     foreach ($item->getValue() as $option) {
                         $confirmation->addHiddenItem("{$item->getPostVar()}[]", $option);
                     }
                 }
                 break;
             case 'checkbox':
                 if ($item->getChecked()) {
                     $confirmation->addHiddenItem($item->getPostVar(), 1);
                 }
                 break;
             default:
                 $confirmation->addHiddenItem($item->getPostVar(), $item->getValue());
         }
     }
     $this->tpl->setContent($this->ctrl->getHTML($confirmation));
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:56,代码来源:class.ilObjTestSettingsScoringResultsGUI.php

示例11: showSkillQuestionAssignmentsCmd

 private function showSkillQuestionAssignmentsCmd()
 {
     $table = $this->buildTableGUI();
     $assignmentList = $this->buildSkillQuestionAssignmentList();
     $assignmentList->loadFromDb();
     $assignmentList->loadAdditionalSkillData();
     $table->setSkillQuestionAssignmentList($assignmentList);
     $table->setData($this->testOBJ->getTestQuestions());
     $this->tpl->setContent($this->ctrl->getHTML($table));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilTestSkillQuestionAssignmentsGUI.php

示例12: update

 /**
  * Update (save) type
  */
 protected function update()
 {
     $form = new ilOrgUnitTypeFormGUI($this, new ilOrgUnitType((int) $_GET['type_id']));
     if ($form->saveObject()) {
         ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
         $this->ctrl->redirect($this);
     } else {
         $this->tpl->setContent($form->getHTML());
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:13,代码来源:class.ilOrgUnitTypeGUI.php

示例13: showResetTemplateConfirmationCmd

 /**
  * Enable all settings - Confirmation
  */
 private function showResetTemplateConfirmationCmd()
 {
     require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
     $confirmationGUI = new ilConfirmationGUI();
     $confirmationGUI->setFormAction($this->ctrl->getFormAction($this));
     $confirmationGUI->setHeaderText($this->lng->txt("test_confirm_template_reset"));
     $confirmationGUI->setCancel($this->lng->txt('cancel'), self::CMD_SHOW_FORM);
     $confirmationGUI->setConfirm($this->lng->txt('confirm'), self::CMD_CONFIRMED_RESET_TPL);
     $this->tpl->setContent($this->ctrl->getHTML($confirmationGUI));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:13,代码来源:class.ilObjTestSettingsGeneralGUI.php

示例14: confirmDelete

 /**
  * confirmDelete
  */
 public function confirmDelete()
 {
     include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
     $conf = new ilConfirmationGUI();
     $conf->setFormAction($this->ctrl->getFormAction($this));
     $conf->setHeaderText($this->lng->txt('dcl_confirm_delete_table'));
     $conf->addItem('table', (int) $this->table->getId(), $this->table->getTitle());
     $conf->setConfirm($this->lng->txt('delete'), 'delete');
     $conf->setCancel($this->lng->txt('cancel'), 'cancelDelete');
     $this->tpl->setContent($conf->getHTML());
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:14,代码来源:class.ilDataCollectionTableEditGUI.php

示例15: confirmTypeChange

 /**
  * Display INFO/Warning Screen if the type was changed by user
  *
  */
 public function confirmTypeChange()
 {
     $new_type_id = (int) $_POST['type_id'];
     $conf_gui = new ilConfirmationGUI();
     $conf_gui->setFormAction($this->ctrl->getFormAction($this));
     $conf_gui->setHeaderText($this->pl->txt('confirm_type_change'));
     $conf_gui->addItem('type_id', $new_type_id, $this->pl->txt('confirm_type_change_text'));
     $conf_gui->setConfirm($this->lng->txt('change'), 'updateType');
     $conf_gui->setCancel($this->lng->txt('cancel'), 'showDefinition');
     $this->tpl->setContent($conf_gui->getHTML());
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:15,代码来源:class.srCertificateDefinitionGUI.php


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