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


PHP ilYuiUtil::initOverlay方法代码示例

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


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

示例1: __construct

 /**
  * @param ilObjectGUI $a_parent_obj
  * @param string      $a_parent_cmd
  */
 public function __construct(ilObjectGUI $a_parent_obj, $a_parent_cmd)
 {
     /**
      * @var $ilCtrl ilCtrl
      */
     global $ilCtrl;
     $this->ctrl = $ilCtrl;
     // Call this immediately in constructor
     $this->setId('tos_agreement_by_lng');
     $this->setDefaultOrderDirection('ASC');
     $this->setDefaultOrderField('language');
     $this->setExternalSorting(false);
     $this->setExternalSegmentation(false);
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setTitle($this->lng->txt('tos_agreement_by_lng'));
     $this->addColumn($this->lng->txt('language'), 'language');
     $this->addColumn($this->lng->txt('tos_agreement'), 'agreement');
     $this->addColumn($this->lng->txt('tos_agreement_document'), 'agreement_document');
     $this->optionalColumns = (array) $this->getSelectableColumns();
     $this->visibleOptionalColumns = (array) $this->getSelectedColumns();
     foreach ($this->visibleOptionalColumns as $column) {
         $this->addColumn($this->optionalColumns[$column]['txt'], $column);
     }
     $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, 'applyAgreementByLanguageFilter'));
     $this->setRowTemplate('tpl.tos_agreement_by_lng_table_row.html', 'Services/TermsOfService');
     $this->setShowRowsSelector(true);
     require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     require_once 'Services/YUI/classes/class.ilYuiUtil.php';
     iljQueryUtil::initjQuery();
     ilYuiUtil::initPanel();
     ilYuiUtil::initOverlay();
     $this->initFilter();
     $this->setFilterCommand('applyAgreementByLanguageFilter');
     $this->setResetCommand('resetAgreementByLanguageFilter');
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilTermsOfServiceAgreementByLanguageTableGUI.php

示例2: initOverlay

 protected function initOverlay()
 {
     include_once 'Services/YUI/classes/class.ilYuiUtil.php';
     ilYuiUtil::initOverlay();
     $this->tpl->addCss('Modules/TestQuestionPool/templates/default/lac_legend.css');
     //$this->setAnchor('fixed_content', 'tr', 'tr');
     // we use css instead, does not hoppel over screen for initially visible overlays
     //$this->setTrigger('lac_legend_toggle_btn', 'click');
     // is done by own listener that also changes the toggle label
     $this->setVisible($this->isInitialVisibilityEnabled());
     $this->setAutoHide(false);
     $this->add();
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:13,代码来源:class.ilAssLacLegendGUI.php

示例3: buildAdjustQuestionForm

 /**
  * @param $question_id
  * @param $question_pool_id
  *
  * @return ilPropertyFormGUI
  */
 protected function buildAdjustQuestionForm($question_id, $question_pool_id)
 {
     require_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     require_once './Modules/TestQuestionPool/classes/class.assQuestion.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setMultipart(FALSE);
     $form->setTableWidth("100%");
     $form->setId("adjustment");
     /** @var $question assQuestionGUI|ilGuiQuestionScoringAdjustable|ilGuiAnswerScoringAdjustable */
     $question = assQuestion::instantiateQuestionGUI($question_id);
     $form->setTitle($question->object->getTitle() . '<br /><small>(' . $question->outQuestionType() . ')</small>');
     $hidden_question_id = new ilHiddenInputGUI('q_id');
     $hidden_question_id->setValue($question_id);
     $form->addItem($hidden_question_id);
     $hidden_qpl_id = new ilHiddenInputGUI('qpl_id');
     $hidden_qpl_id->setValue($question_pool_id);
     $form->addItem($hidden_qpl_id);
     $this->populateScoringAdjustments($question, $form);
     $manscoring_section = new ilFormSectionHeaderGUI();
     $manscoring_section->setTitle($this->lng->txt('manscoring'));
     $form->addItem($manscoring_section);
     $manscoring_preservation = new ilCheckboxInputGUI($this->lng->txt('preserve_manscoring'), 'preserve_manscoring');
     $manscoring_preservation->setChecked(true);
     $manscoring_preservation->setInfo($this->lng->txt('preserve_manscoring_info'));
     $form->addItem($manscoring_preservation);
     $form->addCommandButton("savescoringfortest", $this->lng->txt("save"));
     $participants = $this->object->getParticipants();
     $active_ids = array_keys($participants);
     $results = array();
     foreach ($active_ids as $active_id) {
         $passes[] = $this->object->_getPass($active_id);
         foreach ($passes as $key => $pass) {
             for ($i = 0; $i <= $pass; $i++) {
                 $results[] = $question->object->getSolutionValues($active_id, $i);
             }
         }
     }
     $relevant_answers = array();
     foreach ($results as $result) {
         foreach ($result as $answer) {
             if ($answer['question_fi'] == $question->object->getId()) {
                 $relevant_answers[] = $answer;
             }
         }
     }
     $answers_view = $question->getAggregatedAnswersView($relevant_answers);
     include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     iljQueryUtil::initjQuery();
     include_once 'Services/YUI/classes/class.ilYuiUtil.php';
     ilYuiUtil::initPanel();
     ilYuiUtil::initOverlay();
     $this->tpl->addJavascript('./Services/UIComponent/Overlay/js/ilOverlay.js');
     $this->tpl->addJavaScript("./Services/JavaScript/js/Basic.js");
     $container = new ilTemplate('tpl.il_as_tst_adjust_answer_aggregation_container.html', true, true, 'Modules/Test');
     $container->setVariable('FORM_ELEMENT_NAME', 'aggr_usr_answ');
     $container->setVariable('CLOSE_HTML', json_encode(ilGlyphGUI::get(ilGlyphGUI::CLOSE, $this->lng->txt('close'))));
     $container->setVariable('TXT_SHOW_ANSWER_OVERVIEW', $this->lng->txt('show_answer_overview'));
     $container->setVariable('TXT_CLOSE', $this->lng->txt('close'));
     $container->setVariable('ANSWER_OVERVIEW', $answers_view);
     $custom_input = new ilCustomInputGUI('', 'aggr_usr_answ');
     $custom_input->setHtml($container->get());
     $form->addItem($custom_input);
     return $form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:71,代码来源:class.ilScoringAdjustmentGUI.php

示例4: initJavascript

 /**
  * Init javascript
  *
  * @param
  * @return
  */
 static function initJavascript()
 {
     global $tpl;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initOverlay();
     $tpl->addJavascript("./Services/UIComponent/Overlay/js/ilOverlay.js");
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:13,代码来源:class.ilOverlayGUI.php

示例5: getHTML

 /**
  * Get selection list HTML
  */
 public function getHTML($a_only_cmd_list_asynch = false)
 {
     $items = $this->getItems();
     // do not show list, if no item is in list
     if (count($items) == 0 && !$this->getAsynch()) {
         return "";
     }
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initOverlay();
     $GLOBALS["tpl"]->addJavascript("./Services/UIComponent/Overlay/js/ilOverlay.js");
     $GLOBALS["tpl"]->addJavascript("./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
     $tpl = new ilTemplate("tpl.adv_selection_list.html", true, true, "Services/UIComponent/AdvancedSelectionList", "DEFAULT", false, true);
     reset($items);
     $cnt = 0;
     if ($this->getAsynch()) {
         $tpl->setCurrentBlock("asynch_request");
         $tpl->setVariable("IMG_LOADER", ilUtil::getImagePath("loader.gif"));
         $tpl->parseCurrentBlock();
     } else {
         foreach ($items as $item) {
             if (isset($item["ref_id"])) {
                 $sel_arr[$item["ref_id"]] = isset($item["title"]) ? $item["title"] : "";
             }
             $this->css_row = $this->css_row != "tblrow1_mo" ? "tblrow1_mo" : "tblrow2_mo";
             if ($this->getUseImages()) {
                 if ($item["img"]) {
                     $tpl->setCurrentBlock("image");
                     $tpl->setVariable("IMG_ITEM", $item["img"]);
                     $tpl->setVariable("ALT_ITEM", $item["alt"]);
                     $tpl->parseCurrentBlock();
                 } else {
                     $tpl->touchBlock("no_image");
                 }
             }
             if ($this->getOnClickMode() == ilAdvancedSelectionListGUI::ON_ITEM_CLICK_HREF || $this->getItemLinkClass() != "") {
                 if ($item["frame"]) {
                     $tpl->setCurrentBlock("frame");
                     $tpl->setVariable("TARGET_ITEM", $item["frame"]);
                     $tpl->parseCurrentBlock();
                 }
                 if ($this->getItemLinkClass() != "") {
                     $tpl->setCurrentBlock("item_link_class");
                     $tpl->setVariable("ITEM_LINK_CLASS", $this->getItemLinkClass());
                     $tpl->parseCurrentBlock();
                 }
                 $tpl->setCurrentBlock("href_s");
                 $tpl->setVariable("HREF_ITEM", 'href="' . $item["link"] . '"');
                 $tpl->setVariable("ID_ITEM", $this->getId() . "_" . $item["value"]);
                 $tpl->parseCurrentBlock();
                 $tpl->touchBlock("href_e");
             }
             $tpl->setCurrentBlock("item");
             if ($this->getOnClickMode() == ilAdvancedSelectionListGUI::ON_ITEM_CLICK_HREF) {
                 if ($item["prevent_background_click"]) {
                     $tpl->setVariable("ONCLICK_ITEM", '');
                 } else {
                     if ($item["onclick"] == "") {
                         $tpl->setVariable("ONCLICK_ITEM", 'onclick="' . "return il.AdvancedSelectionList.openTarget('" . $item["link"] . "','" . $item["frame"] . "');" . '"');
                     } else {
                         $tpl->setVariable("ONCLICK_ITEM", 'onclick="' . "return " . $item["onclick"] . ";" . '"');
                     }
                 }
             } else {
                 if ($this->getOnClickMode() == ilAdvancedSelectionListGUI::ON_ITEM_CLICK_FORM_SUBMIT) {
                     $tpl->setVariable("ONCLICK_ITEM", 'onclick="return il.AdvancedSelectionList.submitForm(\'' . $this->getId() . '\'' . ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," . "'" . $this->on_click_form_id . "','" . $this->form_mode["button_cmd"] . "');\"");
                 } else {
                     if ($this->getOnClickMode() == ilAdvancedSelectionListGUI::ON_ITEM_CLICK_FORM_SELECT) {
                         $tpl->setVariable("ONCLICK_ITEM", 'onclick="return il.AdvancedSelectionList.selectForm(\'' . $this->getId() . '\'' . ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," . "'" . $item["title"] . "');\"");
                     } else {
                         if ($this->getOnClickMode() == ilAdvancedSelectionListGUI::ON_ITEM_CLICK_NOP) {
                             $tpl->setVariable("ONCLICK_ITEM", 'onclick="il.AdvancedSelectionList.clickNop(\'' . $this->getId() . '\'' . ", '" . $this->form_mode["select_name"] . "','" . $item["value"] . "'," . "'" . $item["title"] . "');\"");
                         }
                     }
                 }
             }
             $tpl->setVariable("CSS_ROW", $this->css_row);
             if ($item["html"] == "") {
                 $tpl->setVariable("TXT_ITEM", $item["title"]);
             } else {
                 $tpl->setVariable("TXT_ITEM", $item["html"]);
             }
             $tpl->setVariable("ID_ITEM_TR", $this->getId() . "_" . $item["value"] . "_tr");
             if ($item["ttip"] != "") {
                 include_once "./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
                 ilTooltipGUI::addTooltip($this->getId() . "_" . $item["value"] . "_tr", $item["ttip"], "", $item["tt_my"], $item["tt_at"], $item["tt_use_htmlspecialchars"]);
             }
             $tpl->parseCurrentBlock();
             // add item to js object
             $tpl->setCurrentBlock("js_item");
             $tpl->setVariable("IT_ID", $this->getId());
             $tpl->setVariable("IT_HID_NAME", $this->form_mode["select_name"]);
             $tpl->setVariable("IT_HID_VAL", $item["value"]);
             $tpl->setVariable("IT_TITLE", str_replace("'", "\\'", $item["title"]));
             $tpl->parseCurrentBlock();
         }
     }
     $tpl->setCurrentBlock("cmd_table");
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilAdvancedSelectionListGUI.php

示例6: showManScoringByQuestionParticipantsTable

 /**
  *
  */
 private function showManScoringByQuestionParticipantsTable($manPointsPost = array())
 {
     /**
      * @var $tpl      ilTemplate
      * @var $ilAccess ilAccessHandler
      */
     global $tpl, $ilAccess;
     if (!$ilAccess->checkAccess('write', '', $this->ref_id)) {
         ilUtil::sendInfo($this->lng->txt('cannot_edit_test'), true);
         $this->ctrl->redirectByClass('ilobjtestgui', 'infoScreen');
     }
     include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     iljQueryUtil::initjQuery();
     include_once 'Services/YUI/classes/class.ilYuiUtil.php';
     ilYuiUtil::initPanel();
     ilYuiUtil::initOverlay();
     $mathJaxSetting = new ilSetting('MathJax');
     if ($mathJaxSetting->get("enable")) {
         $tpl->addJavaScript($mathJaxSetting->get("path_to_mathjax"));
     }
     $tpl->addJavascript('./Services/UIComponent/Overlay/js/ilOverlay.js');
     $tpl->addJavaScript("./Services/JavaScript/js/Basic.js");
     $tpl->addJavaScript("./Services/Form/js/Form.js");
     $tpl->addCss($this->object->getTestStyleLocation("output"), "screen");
     require_once 'Modules/Test/classes/tables/class.ilTestManScoringParticipantsBySelectedQuestionAndPassTableGUI.php';
     $table = new ilTestManScoringParticipantsBySelectedQuestionAndPassTableGUI($this);
     $table->setManualScoringPointsPostData($manPointsPost);
     $qst_id = $table->getFilterItemByPostVar('question')->getValue();
     $pass_id = $table->getFilterItemByPostVar('pass')->getValue();
     $table_data = array();
     $selected_questionData = null;
     if (is_numeric($qst_id)) {
         $scoring = ilObjAssessmentFolder::_getManualScoring();
         $info = assQuestion::_getQuestionInfo($qst_id);
         $selected_questionData = $info;
         $type = $info["question_type_fi"];
         if (in_array($type, $scoring)) {
             $selected_questionData = $info;
         }
     }
     if ($selected_questionData && is_numeric($pass_id)) {
         $data = $this->object->getCompleteEvaluationData(FALSE);
         foreach ($data->getParticipants() as $active_id => $participant) {
             $testResultData = $this->object->getTestResult($active_id, $pass_id - 1);
             foreach ($testResultData as $questionData) {
                 if (!isset($questionData['qid']) || $questionData['qid'] != $selected_questionData['question_id']) {
                     continue;
                 }
                 $table_data[] = array('pass_id' => $pass_id - 1, 'active_id' => $active_id, 'qst_id' => $questionData['qid'], 'reached_points' => assQuestion::_getReachedPoints($active_id, $questionData['qid'], $pass_id - 1), 'maximum_points' => assQuestion::_getMaximumPoints($questionData['qid']), 'participant' => $participant);
             }
         }
     } else {
         $table->disable('header');
     }
     if ($selected_questionData) {
         $maxpoints = assQuestion::_getMaximumPoints($selected_questionData['question_id']);
         if ($maxpoints == 1) {
             $maxpoints = ' (' . $maxpoints . ' ' . $this->lng->txt('point') . ')';
         } else {
             $maxpoints = ' (' . $maxpoints . ' ' . $this->lng->txt('points') . ')';
         }
         $table->setTitle($this->lng->txt('tst_man_scoring_by_qst') . ': ' . $selected_questionData['title'] . $maxpoints . ' [' . $this->lng->txt('question_id_short') . ': ' . $selected_questionData['question_id'] . ']');
     } else {
         $table->setTitle($this->lng->txt('tst_man_scoring_by_qst'));
     }
     $table->setData($table_data);
     $tpl->setContent($table->getHTML());
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:71,代码来源:class.ilTestScoringByQuestionsGUI.php


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