• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ilYuiUtil类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __construct

 /**
  * Constructor
  * @access	public
  */
 public function __construct(ilObjForumGUI $gui, ilForumTopic $topic, ilForumProperties $properties)
 {
     global $tpl, $ilCtrl;
     $this->gui = $gui;
     $this->topic = $topic;
     $this->properties = $properties;
     $this->tpl = new ilTemplate('tpl.frm_tree.html', true, true, 'Modules/Forum');
     ilYuiUtil::initConnection();
     $tpl->addJavaScript(ilYuiUtil::getLocalPath() . '/yahoo/yahoo-min.js');
     $tpl->addJavaScript(ilYuiUtil::getLocalPath() . '/event/event-min.js');
     $tpl->addJavaScript('./Modules/Forum/js/treeview.js');
     $tpl->addJavaScript('./Modules/Forum/js/treeview_extensions.js');
     $tpl->addCss('./Modules/Forum/css/forum_tree.css');
     // Set ref_id for urls
     $ilCtrl->setParameter($this->gui, 'thr_pk', $this->topic->getId());
     $ilCtrl->setParameter($this->gui, 'backurl', null);
     // Set urls for async commands
     $this->tpl->setVariable('THR_TREE_STATE_URL', $ilCtrl->getLinkTarget($this->gui, 'setTreeStateAsynch', '', true, false));
     $this->tpl->setVariable('THR_TREE_FETCH_CHILDREN_URL', $ilCtrl->getLinkTarget($this->gui, 'fetchTreeChildrenAsync', '', true, false));
     // Fetch root id of the thread node
     $this->root_id = $this->topic->getFirstPostNode()->getId();
     if (!is_array($_SESSION['frm'][$this->topic->getId()]['openTreeNodes'])) {
         $_SESSION['frm'][(int) $this->topic->getId()]['openTreeNodes'] = array(0);
     }
     // Prevent key gaps
     shuffle($_SESSION['frm'][(int) $this->topic->getId()]['openTreeNodes']);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:31,代码来源:class.ilForumExplorer.php


示例2: __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


示例3: __construct

 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
 {
     global $lng, $ilCtrl, $tpl;
     parent::__construct($a_id, $a_id_type, $a_parent_node_id);
     $lng->loadLanguageModule("dcl");
     if (isset($_REQUEST['table_id'])) {
         $this->table_id = $_REQUEST['table_id'];
     } elseif ($a_id > 0) {
         $this->table_id = $this->object->getMainTableId();
     }
     /**
      * @var ilCtrl $ilCtrl
      */
     if (!$ilCtrl->isAsynch()) {
         ilYuiUtil::initConnection();
         ilOverlayGUI::initJavascript();
         $tpl->addJavaScript('Modules/DataCollection/js/ilDataCollection.js');
         $tpl->addJavaScript("Modules/DataCollection/js/datacollection.js");
         $this->tpl->addOnLoadCode("ilDataCollection.setEditUrl('" . $ilCtrl->getLinkTargetByClass(array('ilrepositorygui', 'ilobjdatacollectiongui', 'ildatacollectionrecordeditgui'), 'edit', '', true) . "');");
         $this->tpl->addOnLoadCode("ilDataCollection.setCreateUrl('" . $ilCtrl->getLinkTargetByClass(array('ilrepositorygui', 'ilobjdatacollectiongui', 'ildatacollectionrecordeditgui'), 'create', '', true) . "');");
         $this->tpl->addOnLoadCode("ilDataCollection.setSaveUrl('" . $ilCtrl->getLinkTargetByClass(array('ilrepositorygui', 'ilobjdatacollectiongui', 'ildatacollectionrecordeditgui'), 'save', '', true) . "');");
         $this->tpl->addOnLoadCode("ilDataCollection.setDataUrl('" . $ilCtrl->getLinkTargetByClass(array('ilrepositorygui', 'ilobjdatacollectiongui', 'ildatacollectionrecordeditgui'), 'getRecordData', '', true) . "');");
     }
     $ilCtrl->saveParameter($this, "table_id");
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilObjDataCollectionGUI.php


示例4: ilBlockGUI

 /**
  * Constructor
  *
  * @param
  */
 function ilBlockGUI()
 {
     global $ilUser, $tpl, $ilCtrl;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initConnection();
     $tpl->addJavaScript("./Services/Block/js/ilblockcallback.js");
     $this->setLimit($ilUser->getPref("hits_per_page"));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:13,代码来源:class.ilBlockGUI.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");
     $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


示例6: getHTML

 /**
  * @return string
  */
 public function getHTML()
 {
     ilYuiUtil::initJson();
     $chatSetting = new ilSetting('chatroom');
     if ($this->getCurrentDetailLevel() == 0 || !$chatSetting->get('chat_enabled', 0) || !(bool) @ilChatroomServerConnector::checkServerConnection()) {
         return '';
     } else {
         return parent::getHTML();
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:13,代码来源:class.ilChatroomBlockGUI.php


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


示例8: __construct

 /**
  * Constructor
  *
  * @param
  */
 function __construct()
 {
     global $lng, $tpl;
     $this->maxdepth = -1;
     $this->multi_commands = array();
     $this->commands = array();
     $this->drag_target[] = array();
     $this->drag_content[] = array();
     $lng->loadLanguageModule("form");
     $this->setCheckboxName("cbox");
     parent::ilFormGUI();
     $this->help_items = array();
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initDragDrop();
     $tpl->addJavascript("./Services/Form/js/ServiceFormHierarchyForm.js");
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:21,代码来源:class.ilHierarchyFormGUI.php


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


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


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


示例12: insert

 /**
  * Insert property html
  */
 function insert(&$a_tpl)
 {
     global $lng;
     $template = new ilTemplate("tpl.prop_flashfile.html", true, true, "Services/Form");
     if ($this->getApplet() != "") {
         $this->outputSuffixes($template);
         if (count($this->getParameters())) {
             $index = 0;
             $params = array();
             foreach ($this->getParameters() as $name => $value) {
                 array_push($params, urlencode($name) . "=" . urlencode($value));
                 $template->setCurrentBlock("applet_param_input");
                 $template->setVariable("TEXT_NAME", $lng->txt("name"));
                 $template->setVariable("TEXT_VALUE", $lng->txt("value"));
                 $template->setVariable("PARAM_INDEX", $index);
                 $template->setVariable("POST_VAR_P", $this->getPostVar());
                 $template->setVariable("VALUE_NAME", "value=\"" . ilUtil::prepareFormOutput($name) . "\"");
                 $template->setVariable("VALUE_VALUE", "value=\"" . ilUtil::prepareFormOutput($value) . "\"");
                 $template->setVariable("TEXT_DELETE_PARAM", $lng->txt("delete_parameter"));
                 $template->parseCurrentBlock();
                 $index++;
             }
             $template->setCurrentBlock("applet_parameter");
             $template->setVariable("PARAM_VALUE", join($params, "&"));
             $template->parseCurrentBlock();
             $template->setCurrentBlock("flash_vars");
             $template->setVariable("PARAM_VALUE", join($params, "&"));
             $template->parseCurrentBlock();
         }
         $template->setCurrentBlock("applet");
         $template->setVariable("TEXT_ADD_PARAM", $lng->txt("add_parameter"));
         $template->setVariable("APPLET_WIDTH", $this->getWidth());
         $template->setVariable("APPLET_HEIGHT", $this->getHeight());
         $template->setVariable("POST_VAR_D", $this->getPostVar());
         $template->setVariable("FILENAME", $this->getApplet());
         $template->setVariable("TEXT_WIDTH", $lng->txt("width"));
         $template->setVariable("TEXT_HEIGHT", $lng->txt("height"));
         $template->setVariable("APPLET_FILE", $this->getApplet());
         $template->setVariable("APPLET_PATH", $this->getAppletPathWeb() . $this->getApplet());
         if ($this->getWidth()) {
             $template->setVariable("VALUE_WIDTH", "value=\"" . $this->getWidth() . "\"");
         }
         if ($this->getHeight()) {
             $template->setVariable("VALUE_HEIGHT", "value=\"" . $this->getHeight() . "\"");
         }
         $template->setVariable("ID", $this->getFieldId());
         $template->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
         $template->parseCurrentBlock();
     }
     $js_tpl = new ilTemplate('tpl.flashAddParam.js', true, true, 'Services/Form');
     $js_tpl->setVariable("TEXT_NAME", $lng->txt("name"));
     $js_tpl->setVariable("TEXT_VALUE", $lng->txt("value"));
     $js_tpl->setVariable("POST_VAR", $this->getPostVar());
     $js_tpl->setVariable("TEXT_DELETE_PARAM", $lng->txt("delete_parameter"));
     $js_tpl->setVariable("TEXT_CONFIRM_DELETE_PARAMETER", $lng->txt("confirm_delete_parameter"));
     $template->setVariable("POST_VAR", $this->getPostVar());
     $template->setVariable("ID", $this->getFieldId());
     $template->setVariable("TXT_MAX_SIZE", $lng->txt("file_notice") . " " . $this->getMaxFileSizeString());
     $template->setVariable("JAVASCRIPT_FLASH", $js_tpl->get());
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $template->get());
     $a_tpl->parseCurrentBlock();
     global $tpl;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initConnectionWithAnimation();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:69,代码来源:class.ilFlashFileInputGUI.php


示例13: getInitHTML

 /**
  * Get initialisation HTML to use interna link editing
  */
 function getInitHTML($a_url)
 {
     global $tpl;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initPanel(false);
     ilYuiUtil::initConnection();
     ilYuiUtil::initDragDrop();
     $tpl->addJavaScript("./Services/UIComponent/Explorer/js/ilExplorer.js");
     $tpl->addJavascript("./Services/Link/js/ilIntLink.js");
     $ltpl = new ilTemplate("tpl.int_link_panel.html", true, true, "Services/Link");
     $ltpl->setVariable("IL_INT_LINK_URL", $a_url);
     return $ltpl->get();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:16,代码来源:class.ilInternalLinkGUI.php


示例14: getTestOutput

 function getTestOutput($active_id, $pass = NULL, $is_postponed = FALSE, $use_post_solutions = FALSE, $show_feedback = FALSE)
 {
     // generate the question output
     $template = new ilTemplate("tpl.il_as_qpl_orderinghorizontal_output.html", TRUE, TRUE, "Modules/TestQuestionPool");
     $elements = $this->object->getRandomOrderingElements();
     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);
             }
         }
         $solutions =& $this->object->getSolutionValues($active_id, $pass);
         if (count($solutions) == 1) {
             $elements = split("{::}", $solutions[0]["value1"]);
         }
     }
     if (strlen($_SESSION['qst_selection'])) {
         $this->object->moveRight($_SESSION['qst_selection'], $active_id, $pass);
         unset($_SESSION['qst_selection']);
         $solutions =& $this->object->getSolutionValues($active_id, $pass);
         if (count($solutions) == 1) {
             $elements = split("{::}", $solutions[0]["value1"]);
         }
     }
     if (count($solutions) == 0) {
         $_SESSION['qst_ordering_horizontal_elements'] = $elements;
     } else {
         unset($_SESSION['qst_ordering_horizontal_elements']);
     }
     $idx = 0;
     foreach ($elements as $id => $element) {
         $template->setCurrentBlock("element");
         $template->setVariable("ELEMENT_ID", "e_" . $this->object->getId() . "_{$id}");
         $template->setVariable("ELEMENT_VALUE", ilUtil::prepareFormOutput($element));
         $this->ctrl->setParameterByClass('iltestoutputgui', 'qst_selection', $idx);
         $idx++;
         $url = $this->ctrl->getLinkTargetByClass('iltestoutputgui', 'gotoQuestion');
         $template->setVariable("MOVE_RIGHT", $url);
         $template->setVariable("TEXT_MOVE_RIGHT", $this->lng->txt('move_right'));
         $template->setVariable("RIGHT_IMAGE", ilUtil::getImagePath('nav_arr_R.png'));
         $template->parseCurrentBlock();
     }
     if ($this->object->textsize >= 10) {
         echo $template->setVariable("STYLE", " style=\"font-size: " . $this->object->textsize . "%;\"");
     }
     $template->setVariable("VALUE_ORDERRESULT", ' value="' . join($elements, '{::}') . '"');
     $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($this->object->getQuestion(), TRUE));
     $questionoutput = $template->get();
     if (!$show_question_only) {
         // get page object output
         $questionoutput = $this->getILIASPage($questionoutput);
     }
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initDragDropAnimation();
     $this->tpl->addJavascript("./Modules/TestQuestionPool/templates/default/orderinghorizontal.js");
     $questionoutput = $template->get();
     $pageoutput = $this->outQuestionPage("", $is_postponed, $active_id, $questionoutput);
     return $pageoutput;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:61,代码来源:class.assOrderingHorizontalGUI.php


示例15: addJavaScript

 /**
  * Add javascript files that are necessary to run accordion
  */
 static function addJavaScript()
 {
     global $tpl;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initEvent();
     ilYuiUtil::initDom();
     ilYuiUtil::initAnimation();
     ilYuiUtil::initConnection();
     $tpl->addJavaScript("./Services/Accordion/js/accordion.js", true, 3);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:13,代码来源:class.ilAccordionGUI.php


示例16: exportSupportScripts

 /**
  * Export support scripts
  *
  * @param
  * @return
  */
 function exportSupportScripts()
 {
     // export flv/mp3 player
     //copy(ilPlayerUtil::getFlashVideoPlayerFilename(true),
     //	$this->js_dir."/".ilPlayerUtil::getFlashVideoPlayerFilename());
     //copy("./Services/MediaObjects/flash_mp3_player/mp3player.swf",
     //	$this->mp3_dir."/mp3player.swf");
     // basic js
     copy('./Services/JavaScript/js/Basic.js', $this->js_dir . '/Basic.js');
     copy('./Services/UIComponent/Overlay/js/ilOverlay.js', $this->js_dir . '/ilOverlay.js');
     // jquery
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     copy(iljQueryUtil::getLocaljQueryPath(), $this->js_dir . '/jquery.js');
     copy(iljQueryUtil::getLocaljQueryUIPath(), $this->js_dir . '/jquery-ui-min.js');
     copy(iljQueryUtil::getLocalMaphilightPath(), $this->js_dir . '/maphilight.js');
     // yui stuff we use
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     copy(ilYuiUtil::getLocalPath('yahoo/yahoo-min.js'), $this->js_yahoo_dir . '/yahoo-min.js');
     copy(ilYuiUtil::getLocalPath('yahoo-dom-event/yahoo-dom-event.js'), $this->js_yahoo_dir . '/yahoo-dom-event.js');
     copy(ilYuiUtil::getLocalPath('animation/animation-min.js'), $this->js_yahoo_dir . '/animation-min.js');
     copy(ilYuiUtil::getLocalPath('container/container-min.js'), $this->js_yahoo_dir . '/container-min.js');
     copy(ilYuiUtil::getLocalPath('container/assets/skins/sam/container.css'), $this->css_dir . '/container.css');
     // accordion
     copy('./Services/Accordion/js/accordion.js', $this->js_dir . '/accordion.js');
     copy('./Services/Accordion/css/accordion.css', $this->css_dir . '/accordion.css');
     // page presentation js
     copy('./Services/COPage/js/ilCOPagePres.js', $this->js_dir . '/ilCOPagePres.js');
     // tooltip
     copy('./Services/UIComponent/Tooltip/js/ilTooltip.js', $this->js_dir . '/ilTooltip.js');
     // mediaelement.js
     include_once "./Services/MediaObjects/classes/class.ilPlayerUtil.php";
     ilPlayerUtil::copyPlayerFilesToTargetDirectory($this->flv_dir);
     //		copy(ilPlayerUtil::getLocalMediaElementCssPath(),
     //			$this->css_dir.'/mediaelementplayer.css');
     //		copy(ilPlayerUtil::getLocalMediaElementJsPath(),
     //			$this->js_dir.'/mediaelement-and-player.js');
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:43,代码来源:class.ilCOPageHTMLExport.php


示例17: insert

 /**
  * Insert property html
  *
  * @return	int	Size
  */
 public function insert($a_tpl)
 {
     $tpl = new ilTemplate("tpl.prop_selectbuilder.html", true, true, "Services/Form");
     $i = 0;
     foreach ($this->values as $value) {
         if (!is_string($value)) {
             continue;
         }
         if (strlen((string) $value)) {
             $tpl->setCurrentBlock("prop_text_propval");
             $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput((string) $value));
             $tpl->parseCurrentBlock();
         }
         if ($this->getAllowMove()) {
             $tpl->setCurrentBlock("move");
             $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][{$i}]");
             $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][{$i}]");
             $tpl->setVariable("ID", $this->getFieldId() . "[{$i}]");
             $tpl->setVariable("UP_BUTTON", ilUtil::getImagePath('a_up.png'));
             $tpl->setVariable("DOWN_BUTTON", ilUtil::getImagePath('a_down.png'));
             $tpl->parseCurrentBlock();
         }
         $tpl->setCurrentBlock("row");
         $class = $i % 2 == 0 ? "even" : "odd";
         if ($i == 0) {
             $class .= " first";
         }
         if ($i == count($this->values) - 1) {
             $class .= " last";
         }
         $tpl->setVariable("ROW_CLASS", $class);
         $tpl->setVariable("POST_VAR", $this->getPostVar() . "[{$i}]");
         $tpl->setVariable('POST_VAR_OPEN', $this->getPostVar() . '[open]' . '[' . $i . ']');
         if ($this->isOpenAnswerIndex($i)) {
             $tpl->setVariable('PROP_OPEN_CHECKED', 'checked="checked"');
         }
         if ($this->getDisabled()) {
             $tpl->setVariable('PROP_OPEN_DISABLED', 'disabled="disabled"');
         }
         $tpl->setVariable("ID", $this->getFieldId() . "[{$i}]");
         $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][{$i}]");
         $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][{$i}]");
         $tpl->setVariable("SIZE", $this->getSize());
         $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
         if ($this->getDisabled()) {
             $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
         }
         $tpl->setVariable("ADD_BUTTON", ilUtil::getImagePath('edit_add.png'));
         $tpl->setVariable("REMOVE_BUTTON", ilUtil::getImagePath('edit_remove.png'));
         $tpl->parseCurrentBlock();
         $i++;
     }
     $tpl->setVariable("ELEMENT_ID", $this->getFieldId());
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
     $a_tpl->parseCurrentBlock();
     global $tpl;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initDomEvent();
     $tpl->addJavascript("./Services/Form/templates/default/textwizard.js");
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:66,代码来源:class.ilSelectBuilderInputGUI.php


示例18: debugGUI

 public function debugGUI()
 {
     global $lng;
     $lng->loadLanguageModule("scormdebug");
     /*		if ($_POST['password'] == $this->slm->getDebugPw()) {
     			$_SESSION["debug_pw"] = $this->slm->getDebugPw();
     		}
     		if ($_SESSION["debug_pw"]!=$this->slm->getDebugPw()) {
     			$this->tpl = new ilTemplate("tpl.scorm2004.debug_pw.html", false, false, "./Modules/Scorm2004");
     			$this->tpl->setVariable('SUBMIT', $lng->txt("debugwindow_submit"));
     			$this->tpl->setVariable('CANCEL', $lng->txt("debugwindow_cancel"));
     			$this->tpl->setVariable('PASSWORD_ENTER', $lng->txt("debugwindow_password_enter"));
     			$this->tpl->setVariable('DEBUG_URL','ilias.php?baseClass=ilSAHSPresentationGUI' .'&cmd=debugGUI&ref_id='.$_GET["ref_id"]);
     		} else {*/
     $this->tpl = new ilTemplate("tpl.scorm2004.debug.html", false, false, "./Modules/Scorm2004");
     $this->tpl->setVariable('CONSOLE', $lng->txt("debugwindow_console"));
     $this->tpl->setVariable('LOGS', $lng->txt("debugwindow_logs"));
     $this->tpl->setVariable('COMMENT', $lng->txt("debugwindow_comment"));
     $this->tpl->setVariable('COMMENT_ENTER', $lng->txt("debugwindow_comment_enter"));
     $this->tpl->setVariable('START_RECORDING', $lng->txt("debugwindow_start_recording"));
     $this->tpl->setVariable('STOP_RECORDING', $lng->txt("debugwindow_stop_recording"));
     $this->tpl->setVariable('DELETE_LOGFILE', $lng->txt("debugwindow_delete_logfile"));
     $this->tpl->setVariable('SUBMISSION_FAILED', $lng->txt("debugwindow_submission_failed"));
     $this->tpl->setVariable('SUBMIT', $lng->txt("debugwindow_submit"));
     $this->tpl->setVariable('CANCEL', $lng->txt("debugwindow_cancel"));
     $this->tpl->setVariable('FILENAME', $lng->txt("debugwindow_filename"));
     $this->tpl->setVariable('DATE', $lng->txt("debugwindow_date"));
     $this->tpl->setVariable('ACTION', $lng->txt("debugwindow_action"));
     $this->tpl->setVariable('RECORD_IMG', ilUtil::getImagePath("record.png", "./Modules/Scorm2004"));
     $this->tpl->setVariable('STOP_IMG', ilUtil::getImagePath("stop.png", "./Modules/Scorm2004"));
     $this->tpl->setVariable('COMMENT_IMG', ilUtil::getImagePath("comment.png", "./Modules/Scorm2004"));
     $logfile = $this->logFileName() . ".html";
     $this->tpl->setVariable('LOGFILE', $this->logFileName() . ".html");
     $this->tpl->setVariable('FILES_DATA', json_encode($this->getLogFileList($lng->txt("debugwindow_delete"), $lng->txt("debugwindow_download"), $lng->txt("debugwindow_open"))));
     // path to latest yui distribution
     include_once "Services/YUI/classes/class.ilYuiUtil.php";
     $this->tpl->setVariable('PATH_YUI', ilYuiUtil::getLocalPath());
     //}
     echo $this->tpl->get("DEFAULT", true);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:40,代码来源:ilSCORM13Player.php


示例19: show

 /**
  * fill data section
  *
  * @access protected
  * 
  */
 protected function show()
 {
     global $lng, $ilUser;
     // config
     $raster = 15;
     if ($this->user_settings->getDayStart()) {
         // push starting point to last "slot" of hour BEFORE morning aggregation
         $morning_aggr = ($this->user_settings->getDayStart() - 1) * 60 + (60 - $raster);
     } else {
         $morning_aggr = 0;
     }
     $evening_aggr = $this->user_settings->getDayEnd() * 60;
     $this->tpl = new ilTemplate('tpl.day_view.html', true, true, 'Services/Calendar');
     include_once './Services/YUI/classes/class.ilYuiUtil.php';
     ilYuiUtil::initDragDrop();
     ilYuiUtil::initPanel();
     if (isset($_GET["bkid"])) {
         $user_id = $_GET["bkid"];
         $no_add = true;
     } elseif ($ilUser->getId() == ANONYMOUS_USER_ID) {
         $user_id = $ilUser->getId();
         $no_add = true;
     } else {
         $user_id = $ilUser->getId();
         $no_add = false;
     }
     include_once 'Services/Calendar/classes/class.ilCalendarSchedule.php';
     $this->scheduler = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_DAY, $user_id);
     $this->scheduler->addSubitemCalendars(true);
     $this->scheduler->calculate();
     $daily_apps = $this->scheduler->getByDay($this->seed, $this->timezone);
     $hours = $this->parseInfoIntoRaster($daily_apps, $morning_aggr, $evening_aggr, $raster);
     $colspan = $this->calculateColspan($hours);
     $navigation = new ilCalendarHeaderNavigationGUI($this, $this->seed, ilDateTime::DAY);
     $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'seed', $this->seed->get(IL_CAL_DATE));
     // add milestone link
     include_once 'Services/Calendar/classes/class.ilCalendarSettings.php';
     $settings = ilCalendarSettings::_getInstance();
     include_once "Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php";
     if (!$no_add) {
         $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'seed', $this->seed->get(IL_CAL_DATE));
         $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'idate', $this->seed->get(IL_CAL_DATE));
         $new_app_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'add');
         if ($settings->getEnableGroupMilestones()) {
             $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'seed', $this->seed->get(IL_CAL_DATE));
             $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'idate', $this->seed->get(IL_CAL_DATE));
             $new_ms_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'addMilestone');
             $this->tpl->setCurrentBlock("new_ms");
             $this->tpl->setVariable('DD_ID', $this->seed->get(IL_CAL_UNIX));
             $this->tpl->setVariable('DD_TRIGGER', ilGlyphGUI::get(ilGlyphGUI::ADD));
             $this->tpl->setVariable('URL_DD_NEW_APP', $new_app_url);
             $this->tpl->setVariable('TXT_DD_NEW_APP', $this->lng->txt('cal_new_app'));
             $this->tpl->setVariable('URL_DD_NEW_MS', $new_ms_url);
             $this->tpl->setVariable('TXT_DD_NEW_MS', $this->lng->txt('cal_new_ms'));
             $this->tpl->parseCurrentBlock();
         } else {
             $this->tpl->setCurrentBlock("new_app1" 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP iljQueryUtil类代码示例发布时间:2022-05-23
下一篇:
PHP ilXmlWriter类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap