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


PHP iljQueryUtil::initjQuery方法代码示例

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


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

 public function getHTML()
 {
     global $ilCtrl, $tpl, $lng, $ilUser;
     if (!$this->isContainer) {
         #return '';
     }
     if ($_GET['baseClass'] == 'ilSearchController') {
         //			return '';
     }
     include_once "Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery();
     iljQueryUtil::initjQueryUI();
     $this->tpl = new ilTemplate('tpl.main_menu_search.html', true, true, 'Services/Search');
     if ($ilUser->getId() != ANONYMOUS_USER_ID) {
         if (ilSearchSettings::getInstance()->isLuceneUserSearchEnabled() or (int) $_GET['ref_id']) {
             $this->tpl->setCurrentBlock("position");
             $this->tpl->setVariable('TXT_GLOBALLY', $lng->txt("search_globally"));
             $this->tpl->setVariable('ROOT_ID', ROOT_FOLDER_ID);
             $this->tpl->parseCurrentBlock();
         } else {
             $this->tpl->setCurrentBlock("position_hid");
             $this->tpl->setVariable('ROOT_ID_HID', ROOT_FOLDER_ID);
             $this->tpl->parseCurrentBlock();
         }
         if ((int) $_GET['ref_id']) {
             $this->tpl->setCurrentBlock('position_rep');
             $this->tpl->setVariable('TXT_CURRENT_POSITION', $lng->txt("search_at_current_position"));
             $this->tpl->setVariable('REF_ID', (int) $_GET["ref_id"]);
             $this->tpl->parseCurrentBlock();
         }
     }
     if ($ilUser->getId() != ANONYMOUS_USER_ID && ilSearchSettings::getInstance()->isLuceneUserSearchEnabled()) {
         $this->tpl->setCurrentBlock('usr_search');
         $this->tpl->setVariable('TXT_USR_SEARCH', $this->lng->txt('search_users'));
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setVariable('FORMACTION', 'ilias.php?baseClass=ilSearchController&cmd=post' . '&rtoken=' . $ilCtrl->getRequestToken() . '&fallbackCmd=remoteSearch');
     $this->tpl->setVariable('BTN_SEARCH', $this->lng->txt('search'));
     // $this->tpl->setVariable('ID_AUTOCOMPLETE', "mm_sr_auto");
     $this->tpl->setVariable('AC_DATASOURCE', "ilias.php?baseClass=ilSearchController&cmd=autoComplete");
     $this->tpl->setVariable('IMG_MM_SEARCH', ilUtil::img(ilUtil::getImagePath("icon_seas.svg"), $lng->txt("search")));
     if ($ilUser->getId() != ANONYMOUS_USER_ID) {
         $this->tpl->setVariable('HREF_SEARCH_LINK', "ilias.php?baseClass=ilSearchController");
         $this->tpl->setVariable('TXT_SEARCH_LINK', $lng->txt("last_search_result"));
     }
     // #10555 - we need the overlay for the autocomplete which is always active
     $this->tpl->setVariable('TXT_SEARCH', $lng->txt("search"));
     include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
     $ov = new ilOverlayGUI("mm_search_menu");
     //$ov->setTrigger("main_menu_search", "none",
     //	"main_menu_search", "tr", "br");
     //$ov->setAnchor("main_menu_search", "tr", "br");
     $ov->setAutoHide(false);
     $ov->add();
     return $this->tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:56,代码来源:class.ilMainMenuSearchGUI.php

示例3: executeCommand

 /**
  * execute command
  */
 function executeCommand()
 {
     global $ilDB, $lng, $ilPluginAdmin, $ilTabs, $tree;
     $ilTabs->clearTargets();
     $this->ctrl->saveParameter($this, "sequence");
     $this->ctrl->saveParameter($this, "active_id");
     $this->initAssessmentSettings();
     require_once 'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php';
     $this->dynamicQuestionSetConfig = new ilObjTestDynamicQuestionSetConfig($tree, $ilDB, $ilPluginAdmin, $this->object);
     $this->dynamicQuestionSetConfig->loadFromDb();
     $testSessionFactory = new ilTestSessionFactory($this->object);
     $this->testSession = $testSessionFactory->getSession($_GET['active_id']);
     $this->ensureExistingTestSession($this->testSession);
     $this->initProcessLocker($this->testSession->getActiveId());
     $testSequenceFactory = new ilTestSequenceFactory($ilDB, $lng, $ilPluginAdmin, $this->object);
     $this->testSequence = $testSequenceFactory->getSequenceByTestSession($this->testSession);
     $this->testSequence->loadFromDb();
     include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     iljQueryUtil::initjQuery();
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initConnectionWithAnimation();
     if ($this->object->getKioskMode()) {
         include_once 'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
         ilOverlayGUI::initJavascript();
     }
     $this->handlePasswordProtectionRedirect();
     $cmd = $this->ctrl->getCmd();
     $nextClass = $this->ctrl->getNextClass($this);
     switch ($nextClass) {
         case 'ilassquestionpagegui':
             $questionId = $this->testSequence->getQuestionForSequence($this->calculateSequence());
             require_once "./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
             $page_gui = new ilAssQuestionPageGUI($questionId);
             $ret = $this->ctrl->forwardCommand($page_gui);
             break;
         case 'ilassquestionhintrequestgui':
             $questionGUI = $this->object->createQuestionGUI("", $this->testSequenceFactory->getSequenceByTestSession()->getQuestionForSequence($this->calculateSequence()));
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
             $gui = new ilAssQuestionHintRequestGUI($this, self::CMD_SHOW_QUESTION, $this->testSession, $questionGUI);
             $this->ctrl->forwardCommand($gui);
             break;
         case 'ildynamicquestionsetstatistictablegui':
             $this->ctrl->forwardCommand($this->buildQuestionSetFilteredStatisticTableGUI());
             break;
         case 'iltestpasswordprotectiongui':
             require_once 'Modules/Test/classes/class.ilTestPasswordProtectionGUI.php';
             $gui = new ilTestPasswordProtectionGUI($this->ctrl, $this->tpl, $this->lng, $this, $this->passwordChecker);
             $ret = $this->ctrl->forwardCommand($gui);
             break;
         default:
             $cmd .= 'Cmd';
             $ret =& $this->{$cmd}();
             break;
     }
     return $ret;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:59,代码来源:class.ilTestPlayerDynamicQuestionSetGUI.php

示例4: render

 /**
  * Render html
  */
 function render($a_mode = "")
 {
     global $lng, $tpl, $ilUser;
     $quota_exceeded = $quota_legend = false;
     if (self::$check_wsp_quota) {
         include_once "Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
         if (!ilDiskQuotaHandler::isUploadPossible()) {
             $lng->loadLanguageModule("file");
             return $lng->txt("personal_workspace_quota_exceeded_warning");
         } else {
             $quota_legend = ilDiskQuotaHandler::getStatusLegend();
         }
     }
     // make sure jQuery is loaded
     iljQueryUtil::initjQuery();
     // add file upload scripts
     include_once "./Services/FileUpload/classes/class.ilFileUploadGUI.php";
     ilFileUploadGUI::initFileUpload();
     // load template
     $this->tpl = new ilTemplate("tpl.prop_dndfiles.html", true, true, "Services/Form");
     // general variables
     $this->tpl->setVariable("UPLOAD_ID", $this->uniqueId);
     // input
     $this->tpl->setVariable("FILE_SELECT_ICON", ilUtil::getImagePath('icon_fold.png'));
     $this->tpl->setVariable("TXT_SHOW_ALL_DETAILS", $lng->txt('show_all_details'));
     $this->tpl->setVariable("TXT_HIDE_ALL_DETAILS", $lng->txt('hide_all_details'));
     $this->tpl->setVariable("TXT_SELECTED_FILES", $lng->txt('selected_files'));
     $this->tpl->setVariable("TXT_DRAG_FILES_HERE", $lng->txt('drag_files_here'));
     $this->tpl->setVariable("TXT_NUM_OF_SELECTED_FILES", $lng->txt('num_of_selected_files'));
     $this->tpl->setVariable("TXT_SELECT_FILES_FROM_COMPUTER", $lng->txt('select_files_from_computer'));
     $this->tpl->setVariable("TXT_OR", $lng->txt('logic_or'));
     $this->tpl->setVariable("INPUT_ACCEPT_SUFFIXES", $this->getInputAcceptSuffixes($this->getSuffixes()));
     // info
     $this->tpl->setCurrentBlock("max_size");
     $this->tpl->setVariable("TXT_MAX_SIZE", $lng->txt("file_notice") . " " . $this->getMaxFileSizeString());
     $this->tpl->parseCurrentBlock();
     if ($quota_legend) {
         $this->tpl->setVariable("TXT_MAX_SIZE", $quota_legend);
         $this->tpl->parseCurrentBlock();
     }
     $this->outputSuffixes($this->tpl);
     // create file upload object
     $upload = new ilFileUploadGUI("ilFileUploadDropZone_" . $this->uniqueId, $this->uniqueId, false);
     $upload->enableFormSubmit("ilFileUploadInput_" . $this->uniqueId, $this->submit_button_name, $this->cancel_button_name);
     $upload->setDropAreaId("ilFileUploadDropArea_" . $this->uniqueId);
     $upload->setFileListId("ilFileUploadList_" . $this->uniqueId);
     $upload->setFileSelectButtonId("ilFileUploadFileSelect_" . $this->uniqueId);
     $this->tpl->setVariable("FILE_UPLOAD", $upload->getHTML());
     return $this->tpl->get();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:53,代码来源:class.ilDragDropFileInputGUI.php

示例5: executeCommand

 /**
  * execute command
  */
 function executeCommand()
 {
     global $ilDB, $lng, $ilPluginAdmin, $ilTabs, $tree;
     $ilTabs->clearTargets();
     $this->ctrl->saveParameter($this, "sequence");
     $this->ctrl->saveParameter($this, "active_id");
     require_once 'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php';
     $this->dynamicQuestionSetConfig = new ilObjTestDynamicQuestionSetConfig($tree, $ilDB, $ilPluginAdmin, $this->object);
     $this->dynamicQuestionSetConfig->loadFromDb();
     $testSessionFactory = new ilTestSessionFactory($this->object);
     $this->testSession = $testSessionFactory->getSession($_GET['active_id']);
     $testSequenceFactory = new ilTestSequenceFactory($ilDB, $lng, $ilPluginAdmin, $this->object);
     $this->testSequence = $testSequenceFactory->getSequence($this->testSession);
     $this->testSequence->loadFromDb();
     include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     iljQueryUtil::initjQuery();
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initConnectionWithAnimation();
     if ($this->object->getKioskMode()) {
         include_once 'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
         ilOverlayGUI::initJavascript();
     }
     $cmd = $this->ctrl->getCmd();
     $nextClass = $this->ctrl->getNextClass($this);
     switch ($nextClass) {
         case 'ilassquestionhintrequestgui':
             $questionGUI = $this->object->createQuestionGUI("", $this->testSequenceFactory->getSequence()->getQuestionForSequence($this->calculateSequence()));
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
             $gui = new ilAssQuestionHintRequestGUI($this, $this->testSession, $questionGUI);
             $this->ctrl->forwardCommand($gui);
             break;
         case 'ilfilteredquestionstablegui':
             $this->ctrl->forwardCommand($this->buildFilteredQuestionsTableGUI());
             break;
         default:
             $cmd .= 'Cmd';
             $ret =& $this->{$cmd}();
             break;
     }
     return $ret;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:44,代码来源:class.ilTestPlayerDynamicQuestionSetGUI.php

示例6: getHtml

 /**
  * @return string
  */
 public function getHtml()
 {
     /**
      * @var $lng    ilLanguage
      * @var $tpl ilTemplate
      */
     global $lng, $tpl;
     if ($this->getSessionReminder()->isActive()) {
         require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
         iljQueryUtil::initjQuery();
         require_once 'Services/YUI/classes/class.ilYuiUtil.php';
         ilYuiUtil::initCookie();
         $tpl->addJavaScript('./Services/Authentication/js/session_reminder.js');
         $reminder_tpl = new ilTemplate('tpl.session_reminder.html', true, true, 'Services/Authentication');
         $reminder_tpl->setVariable('DEBUG', defined('DEVMODE') && DEVMODE ? 1 : 0);
         $reminder_tpl->setVariable('CLIENT_ID', CLIENT_ID);
         $reminder_tpl->setVariable('SESSION_NAME', session_name());
         $reminder_tpl->setVariable('FREQUENCY', 60);
         $reminder_tpl->setVariable('SESSION_ID', session_id());
         $reminder_tpl->setVariable('URL', './sessioncheck.php?client_id=' . CLIENT_ID . '&lang=' . $lng->getLangKey());
         return $reminder_tpl->get();
     }
     return '';
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:27,代码来源:class.ilSessionReminderGUI.php

示例7: executeCommand

 /**
  * execute command
  */
 function executeCommand()
 {
     global $ilUser;
     $cmd = $this->ctrl->getCmd();
     $next_class = $this->ctrl->getNextClass($this);
     $this->ctrl->saveParameter($this, "sequence");
     $this->ctrl->saveParameter($this, "active_id");
     if (preg_match("/^gotoquestion_(\\d+)\$/", $cmd, $matches)) {
         $cmd = "gotoquestion";
         if (strlen($matches[1])) {
             $this->ctrl->setParameter($this, 'gotosequence', $matches[1]);
         }
     }
     if ($_GET["active_id"]) {
         $this->object->setTestSession($_GET["active_id"]);
     } else {
         $this->object->setTestSession();
     }
     include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     iljQueryUtil::initjQuery();
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initConnectionWithAnimation();
     $cmd = $this->getCommand($cmd);
     switch ($next_class) {
         case 'ilassquestionhintrequestgui':
             $questionGUI = $this->object->createQuestionGUI("", $this->object->getTestSequence()->getQuestionForSequence($this->calculateSequence()));
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
             $gui = new ilAssQuestionHintRequestGUI($this, $this->object->getTestSession(), $questionGUI);
             $ret = $this->ctrl->forwardCommand($gui);
             break;
         default:
             $ret =& $this->{$cmd}();
             break;
     }
     return $ret;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:39,代码来源:class.ilTestOutputGUI.php

示例8: initLearningProgressDetailsLayer

 protected function initLearningProgressDetailsLayer()
 {
     global $tpl;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initPanel();
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery();
     $tpl->addJavascript("./Services/Tracking/js/ilObjStat.js");
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:9,代码来源:class.ilLPObjectStatisticsLPTableGUI.php

示例9: 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

示例10: setTemplateVars

 /**
  * set all template variables (images, scripts, target frames, ...)
  */
 function setTemplateVars()
 {
     global $rbacsystem, $lng, $ilias, $tree, $ilUser, $ilSetting, $ilPluginAdmin;
     if ($this->logo_only) {
         $this->tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.png"));
         return;
     }
     // get user interface plugins
     $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
     // search
     include_once 'Services/Search/classes/class.ilSearchSettings.php';
     if ($rbacsystem->checkAccess('search', ilSearchSettings::_getSearchSettingRefId())) {
         include_once './Services/Search/classes/class.ilMainMenuSearchGUI.php';
         $main_search = new ilMainMenuSearchGUI();
         $html = "";
         // user interface plugin slot + default rendering
         include_once "./Services/UIComponent/classes/class.ilUIHookProcessor.php";
         $uip = new ilUIHookProcessor("Services/MainMenu", "main_menu_search", array("main_menu_gui" => $this, "main_menu_search_gui" => $main_search));
         if (!$uip->replaced()) {
             $html = $main_search->getHTML();
         }
         $html = $uip->getHTML($html);
         if (strlen($html)) {
             $this->tpl->setVariable('SEARCHBOX', $html);
         }
     }
     $this->renderStatusBox($this->tpl);
     // online help
     $this->renderHelpButtons();
     $mmle_html = "";
     // user interface plugin slot + default rendering
     include_once "./Services/UIComponent/classes/class.ilUIHookProcessor.php";
     $uip = new ilUIHookProcessor("Services/MainMenu", "main_menu_list_entries", array("main_menu_gui" => $this));
     if (!$uip->replaced()) {
         $mmle_tpl = new ilTemplate("tpl.main_menu_list_entries.html", true, true, "Services/MainMenu");
         $mmle_html = $this->renderMainMenuListEntries($mmle_tpl);
     }
     $mmle_html = $uip->getHTML($mmle_html);
     $this->tpl->setVariable("MAIN_MENU_LIST_ENTRIES", $mmle_html);
     $link_dir = defined("ILIAS_MODULE") ? "../" : "";
     if (!$this->small) {
         // login stuff
         if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
             include_once 'Services/Registration/classes/class.ilRegistrationSettingsGUI.php';
             if (ilRegistrationSettings::_lookupRegistrationType() != IL_REG_DISABLED) {
                 $this->tpl->setCurrentBlock("registration_link");
                 $this->tpl->setVariable("TXT_REGISTER", $lng->txt("register"));
                 $this->tpl->setVariable("LINK_REGISTER", $link_dir . "register.php?client_id=" . rawurlencode(CLIENT_ID) . "&lang=" . $ilias->account->getCurrentLanguage());
                 $this->tpl->parseCurrentBlock();
             }
             // language selection
             $selection = self::getLanguageSelection();
             if ($selection) {
                 $this->tpl->setVariable("LANG_SELECT", $selection);
             }
             $this->tpl->setCurrentBlock("userisanonymous");
             $this->tpl->setVariable("TXT_NOT_LOGGED_IN", $lng->txt("not_logged_in"));
             $this->tpl->setVariable("TXT_LOGIN", $lng->txt("log_in"));
             $target_str = "";
             if ($this->getLoginTargetPar() != "") {
                 $target_str = $this->getLoginTargetPar();
             } else {
                 if ($_GET["ref_id"] != "") {
                     if ($tree->isInTree($_GET["ref_id"]) && $_GET["ref_id"] != $tree->getRootId()) {
                         $obj_id = ilObject::_lookupObjId($_GET["ref_id"]);
                         $type = ilObject::_lookupType($obj_id);
                         $target_str = $type . "_" . $_GET["ref_id"];
                     }
                 }
             }
             $this->tpl->setVariable("LINK_LOGIN", $link_dir . "login.php?target=" . $target_str . "&client_id=" . rawurlencode(CLIENT_ID) . "&cmd=force_login&lang=" . $ilias->account->getCurrentLanguage());
             $this->tpl->parseCurrentBlock();
         } else {
             $notificationSettings = new ilSetting('notifications');
             $chatSettings = new ilSetting('chatroom');
             /**
              * @var $tpl ilTemplate
              */
             global $tpl;
             if ($chatSettings->get('chat_enabled') && $notificationSettings->get('enable_osd')) {
                 $this->tpl->touchBlock('osd_enabled');
                 $this->tpl->touchBlock('osd_container');
                 include_once "Services/jQuery/classes/class.iljQueryUtil.php";
                 iljQueryUtil::initjQuery();
                 include_once 'Services/MediaObjects/classes/class.ilPlayerUtil.php';
                 ilPlayerUtil::initMediaElementJs();
                 $tpl->addJavaScript('Services/Notifications/templates/default/notifications.js');
                 $tpl->addCSS('Services/Notifications/templates/default/osd.css');
                 require_once 'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
                 $notifications = ilNotificationOSDHandler::getNotificationsForUser($ilUser->getId());
                 $this->tpl->setVariable('INITIAL_NOTIFICATIONS', json_encode($notifications));
                 $this->tpl->setVariable('OSD_POLLING_INTERVALL', $notificationSettings->get('osd_polling_intervall') ? $notificationSettings->get('osd_polling_intervall') : '5');
                 $this->tpl->setVariable('OSD_PLAY_SOUND', $chatSettings->get('play_invitation_sound') ? 'true' : 'false');
                 foreach ($notifications as $notification) {
                     if ($notification['type'] == 'osd_maint') {
                         continue;
                     }
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilMainMenuGUI.php

示例11: getHTML

 /**
  * get html
  */
 function getHTML()
 {
     global $lng, $ilSetting, $tree, $ilAccess, $ilCtrl, $ilUser;
     $tpl = new ilTemplate("tpl.infoscreen.html", true, true, "Services/InfoScreen");
     // other class handles form action (@todo: this is not implemented/tested)
     if ($this->form_action == "") {
         $this->setFormAction($ilCtrl->getFormAction($this));
     }
     require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     iljQueryUtil::initjQuery();
     if ($this->hidden) {
         $tpl->touchBlock("hidden_js");
         if ($this->show_hidden_toggle) {
             $this->addButton($lng->txt("show_hidden_sections"), "JavaScript:toggleSections(this, '" . $lng->txt("show_hidden_sections") . "', '" . $lng->txt("hide_visible_sections") . "');");
         }
     }
     // DEPRECATED - use ilToolbarGUI
     // add top buttons
     if (count($this->top_buttons) > 0) {
         $tpl->addBlockfile("TOP_BUTTONS", "top_buttons", "tpl.buttons.html");
         foreach ($this->top_buttons as $button) {
             // view button
             $tpl->setCurrentBlock("btn_cell");
             $tpl->setVariable("BTN_LINK", $button["link"]);
             $tpl->setVariable("BTN_TARGET", $button["target"]);
             $tpl->setVariable("BTN_TXT", $button["title"]);
             if ($button["primary"]) {
                 $tpl->setVariable("BTN_CLASS", " btn-primary");
             }
             $tpl->parseCurrentBlock();
         }
     }
     // add top formbuttons
     if (count($this->top_formbuttons) > 0 && strlen($this->form_action) > 0) {
         $tpl->addBlockfile("TOP_FORMBUTTONS", "top_submitbuttons", "tpl.submitbuttons.html", "Services/InfoScreen");
         foreach ($this->top_formbuttons as $button) {
             // view button
             $tpl->setCurrentBlock("btn_submit_cell");
             $tpl->setVariable("BTN_COMMAND", $button["command"]);
             $tpl->setVariable("BTN_NAME", $button["title"]);
             $tpl->parseCurrentBlock();
         }
     }
     // add form action
     if (strlen($this->form_action) > 0) {
         if ($this->open_form_tag) {
             $tpl->setCurrentBlock("formtop");
             $tpl->setVariable("FORMACTION", $this->form_action);
             $tpl->parseCurrentBlock();
         }
         if ($this->close_form_tag) {
             $tpl->touchBlock("formbottom");
         }
     }
     if (count($this->hiddenelements)) {
         foreach ($this->hiddenelements as $hidden) {
             $tpl->setCurrentBlock("hidden_element");
             $tpl->setVariable("HIDDEN_NAME", $hidden["name"]);
             $tpl->setVariable("HIDDEN_VALUE", $hidden["value"]);
             $tpl->parseCurrentBlock();
         }
     }
     // learning progress
     if ($this->learning_progress_enabled and $html = $this->showLearningProgress($tpl)) {
         $tpl->setCurrentBlock("learning_progress");
         $tpl->setVariable("LP_TABLE", $html);
         $tpl->parseCurrentBlock();
     }
     // notes section
     if ($this->private_notes_enabled && !$ilSetting->get('disable_notes')) {
         $html = $this->showNotesSection();
         $tpl->setCurrentBlock("notes");
         $tpl->setVariable("NOTES", $html);
         $tpl->parseCurrentBlock();
     }
     // tagging
     if (is_object($this->gui_object->object)) {
         $tags_set = new ilSetting("tags");
         if ($tags_set->get("enable") && $ilUser->getId() != ANONYMOUS_USER_ID) {
             $this->addTagging();
         }
     }
     if (is_object($this->gui_object->object)) {
         $this->addObjectSections();
     }
     // render all sections
     for ($i = 1; $i <= $this->sec_nr; $i++) {
         if (is_array($this->section[$i]["properties"])) {
             // section properties
             foreach ($this->section[$i]["properties"] as $property) {
                 if ($property["name"] != "") {
                     if ($property["link"] == "") {
                         $tpl->setCurrentBlock("pv");
                         $tpl->setVariable("TXT_PROPERTY_VALUE", $property["value"]);
                         $tpl->parseCurrentBlock();
                     } else {
                         $tpl->setCurrentBlock("lpv");
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilInfoScreenGUI.php

示例12: showTree

 /**
  * Show Editing Tree
  */
 function showTree()
 {
     global $ilUser, $ilias, $ilCtrl, $lng;
     $mtree = new ilTree($this->object->getId());
     $mtree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
     $mtree->setTreeTablePK("slm_id");
     if ($_POST["expandAll"] != "") {
         $_GET["scexpand"] = "";
         $stree = $mtree->getSubTree($mtree->getNodeData($mtree->readRootId()));
         $n_arr = array();
         foreach ($stree as $n) {
             $n_arr[] = $n["child"];
         }
         $_SESSION["scexpand"] = $n_arr;
     }
     if ($_POST["collapseAll"] != "") {
         $_GET["scexpand"] = "";
         $_SESSION["scexpand"] = array($mtree->readRootId());
     }
     $this->tpl = new ilTemplate("tpl.main.html", true, true);
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $ilCtrl->setParameter($this, "active_node", $_GET["active_node"]);
     $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
     $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
     $this->tpl->setCurrentBlock("exp2_button");
     $this->tpl->setVariable("CMD_EXP2_BTN", "expandAll");
     $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("expand_all"));
     $this->tpl->parseCurrentBlock();
     $this->tpl->setCurrentBlock("exp2_button");
     $this->tpl->setVariable("CMD_EXP2_BTN", "collapseAll");
     $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("collapse_all"));
     $this->tpl->parseCurrentBlock();
     require_once "./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorer.php";
     $exp = new ilSCORM2004EditorExplorer($this->ctrl->getLinkTarget($this, "edit"), $this->object);
     $exp->setFrameUpdater("content", "ilHierarchyFormUpdater");
     $exp->setTargetGet("obj_id");
     $exp->setExpandTarget($this->ctrl->getLinkTarget($this, "showTree"));
     if ($_GET["scexpand"] == "") {
         $expanded = $mtree->readRootId();
     } else {
         $expanded = $_GET["scexpand"];
     }
     //echo "-".$_GET["active_node"]."-";
     if ($_GET["active_node"] != "") {
         $path = $mtree->getPathId($_GET["active_node"]);
         $exp->setForceOpenPath($path);
         $exp->highlightNode($_GET["active_node"]);
     }
     $exp->setExpand($expanded);
     // build html-output
     $exp->setOutput(0);
     $output = $exp->getOutput();
     // asynchronous output
     if ($ilCtrl->isAsynch()) {
         echo $output;
         exit;
     }
     $this->tpl->setCurrentBlock("content");
     $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("sahs_organization"));
     $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
     $this->tpl->setVariable("EXPLORER", $output);
     $this->ctrl->setParameter($this, "scexpand", $_GET["scexpand"]);
     $this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "showTree"));
     $this->tpl->parseCurrentBlock();
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery($this->tpl);
     $this->tpl->show(false);
     exit;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:72,代码来源:class.ilObjSCORM2004LearningModuleGUI.php

示例13: getTestOutput

 function getTestOutput($active_id, $pass = NULL, $is_postponed = FALSE, $user_post_solution = FALSE)
 {
     // shuffle output
     $keys = array();
     if (is_array($user_post_solution)) {
         $keys = $_SESSION["ordering_keys"];
     } else {
         $keys = array_keys($this->object->answers);
         shuffle($keys);
     }
     $_SESSION["ordering_keys"] = $keys;
     // generate the question output
     include_once "./Services/UICore/classes/class.ilTemplate.php";
     $template = new ilTemplate("tpl.il_as_qpl_ordering_output.html", TRUE, TRUE, "Modules/TestQuestionPool");
     if ($this->object->getOrderingType() == OQ_NESTED_TERMS || $this->object->getOrderingType() == OQ_NESTED_PICTURES) {
         $this->object->setOutputType(OUTPUT_JAVASCRIPT);
         include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
         include_once 'Modules/TestQuestionPool/classes/class.ilNestedOrderingGUI.php';
         $answers = new ilNestedOrderingGUI($this->lng->txt("answers"), "answers");
         $answers->setOrderingType($this->object->getOrderingType());
         $shuffle = 1;
         $answers->setObjAnswersArray($this->object->answers, $shuffle);
         if ($this->object->getOrderingType() == OQ_NESTED_PICTURES) {
             $answers->setImagePath($this->object->getImagePath());
             $answers->setImagePathWeb($this->object->getImagePathWeb());
             $answers->setThumbPrefix($this->object->getThumbPrefix());
         }
         $template->setCurrentBlock('nested_ordering_output');
         $template->setVariable('NESTED_ORDERING', $answers->getHtml($shuffle));
         $template->parseCurrentBlock();
         $questiontext = $this->object->getQuestion();
         $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
         $questionoutput = $template->get();
         $pageoutput = $this->outQuestionPage("", $is_postponed, $active_id, $questionoutput);
         return $pageoutput;
     } else {
         if ($this->object->getOutputType() == OUTPUT_JAVASCRIPT) {
             // BEGIN: add javascript code for javascript enabled ordering questions
             $this->tpl->addBlockFile("CONTENT_BLOCK", "head_content", "tpl.il_as_qpl_ordering_output_javascript.html", "Modules/TestQuestionPool");
             $this->tpl->touchBlock("head_content");
             require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
             iljQueryUtil::initjQuery();
             iljQueryUtil::initjQueryUI();
             // END: add javascript code for javascript enabled ordering questions
             // BEGIN: add additional stylesheet for javascript enabled ordering questions
             $this->tpl->setCurrentBlock("AdditionalStyle");
             $this->tpl->setVariable("LOCATION_ADDITIONAL_STYLESHEET", ilUtil::getStyleSheetLocation("output", "test_javascript.css", "Modules/TestQuestionPool"));
             $this->tpl->parseCurrentBlock();
             // END: add additional stylesheet for javascript enabled ordering questions
             // BEGIN: onsubmit form action for javascript enabled ordering questions
             $this->tpl->setVariable("ON_SUBMIT", "return saveOrder('orderlist');");
             // END: onsubmit form action for javascript enabled ordering questions
         }
         // get the solution of the user for the active pass or from the last pass if allowed
         if ($active_id) {
             $solutions = NULL;
             include_once "./Modules/Test/classes/class.ilObjTest.php";
             if (!ilObjTest::_getUsePreviousAnswers($active_id, true)) {
                 if (is_null($pass)) {
                     $pass = ilObjTest::_getPass($active_id);
                 }
             }
             if (is_array($user_post_solution)) {
                 $solutions = array();
                 foreach ($user_post_solution as $key => $value) {
                     if (preg_match("/order_(\\d+)/", $key, $matches)) {
                         foreach ($this->object->getAnswers() as $answeridx => $answer) {
                             if ($answer->getRandomID() == $matches[1]) {
                                 array_push($solutions, array("value1" => $answeridx, "value2" => $value));
                             }
                         }
                     }
                 }
             } else {
                 $solutions =& $this->object->getSolutionValues($active_id, $pass);
             }
             if ($this->object->getOutputType() == OUTPUT_JAVASCRIPT) {
                 $solution_script .= "";
                 $jssolutions = array();
                 foreach ($solutions as $idx => $solution_value) {
                     if (strcmp($solution_value["value2"], "") != 0 && strcmp($solution_value["value1"], "") != 0) {
                         $jssolutions[$solution_value["value2"]] = $solution_value["value1"];
                     }
                 }
                 if (count($jssolutions)) {
                     ksort($jssolutions);
                     $js = "";
                     foreach ($jssolutions as $key => $value) {
                         if (is_object($this->object->getAnswer($value))) {
                             $js .= "initialorder.push('id_" . $this->object->getAnswer($value)->getRandomID() . "');";
                         }
                     }
                     $js .= "restoreInitialOrder();";
                 }
                 if (strlen($js)) {
                     $template->setCurrentBlock("javascript_restore_order");
                     $template->setVariable("RESTORE_ORDER", $js);
                     $template->parseCurrentBlock();
                 }
             }
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.assOrderingQuestionGUI.php

示例14: getPerformTriggerHtml

 public function getPerformTriggerHtml()
 {
     /**
      * @var $ilCtrl ilCtrl
      */
     global $ilCtrl;
     include_once "Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery();
     $trigger_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.perform_trigger.html", true, true);
     $target = $ilCtrl->getLinkTarget($this, 'performCrsGrpTrigger', '', true, false);
     $trigger_tpl->setVariable('TRIGGER_TARGET', $target);
     $trigger_tpl->parseCurrentBlock();
     return $trigger_tpl->get();
 }
开发者ID:KamuiXenom,项目名称:ILIAS_AdobeConnectPlugin,代码行数:14,代码来源:class.ilObjAdobeConnectGUI.php

示例15: 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


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