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


PHP ilUtil::getStyleSheetLocation方法代码示例

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


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

示例1: export

 /**
  * Export
  *
  * @param
  * @return
  */
 function export()
 {
     global $ilUser;
     $this->createDirectories();
     // export system style sheet
     $location_stylesheet = ilUtil::getStyleSheetLocation("filesystem");
     $style_name = $ilUser->prefs["style"] . ".css";
     copy($location_stylesheet, $this->style_dir . "/" . $style_name);
     $fh = fopen($location_stylesheet, "r");
     $css = fread($fh, filesize($location_stylesheet));
     preg_match_all("/url\\(([^\\)]*)\\)/", $css, $files);
     foreach (array_unique($files[1]) as $fileref) {
         $fileref = dirname($location_stylesheet) . "/" . $fileref;
         if (is_file($fileref)) {
             copy($fileref, $this->style_img_dir . "/" . basename($fileref));
         }
     }
     fclose($fh);
     // export (icon) images
     foreach ($this->images as $im) {
         $from = $to = $im["file"];
         if ($im["exp_file_name"] != "") {
             $to = $im["exp_file_name"];
         }
         copy(ilUtil::getImagePath($from, false, "filesystem"), $this->img_dir . "/" . $to);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:class.ilSystemStyleHTMLExport.php

示例2: show

 function show()
 {
     global $lng, $tree;
     $tpl = new ilTemplate("tpl.container_link_help.html", true, true, "Services/Container");
     $type_ordering = array("cat", "fold", "crs", "icrs", "icla", "grp", "chat", "frm", "lres", "glo", "webr", "file", "exc", "tst", "svy", "mep", "qpl", "spl");
     $childs = $tree->getChilds($_GET["ref_id"]);
     foreach ($childs as $child) {
         if (in_array($child["type"], array("lm", "dbk", "sahs", "htlm"))) {
             $cnt["lres"]++;
         } else {
             $cnt[$child["type"]]++;
         }
     }
     $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
     foreach ($type_ordering as $type) {
         $tpl->setCurrentBlock("row");
         $tpl->setVariable("ROWCOL", "tblrow" . ($i++ % 2 + 1));
         if ($type != "lres") {
             $tpl->setVariable("TYPE", $lng->txt("objs_" . $type) . " (" . (int) $cnt[$type] . ")");
         } else {
             $tpl->setVariable("TYPE", $lng->txt("learning_resources") . " (" . (int) $cnt["lres"] . ")");
         }
         $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
         $tpl->parseCurrentBlock();
     }
     $tpl->show();
     exit;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:29,代码来源:class.ilContainerLinkListGUI.php

示例3: initFileUpload

 /**
  * Initializes the file upload and loads the needed javascripts and styles.
  */
 public static function initFileUpload()
 {
     global $tpl;
     // needed scripts
     $tpl->addJavaScript("./Services/FileUpload/js/tmpl.js");
     $tpl->addJavaScript("./Services/FileUpload/js/jquery.ui.widget.js");
     $tpl->addJavaScript("./Services/FileUpload/js/jquery.iframe-transport.js");
     $tpl->addJavaScript("./Services/FileUpload/js/jquery.fileupload.js");
     $tpl->addJavaScript("./Services/FileUpload/js/jquery.ba-dotimeout.min.js");
     $tpl->addJavaScript("./Services/FileUpload/js/ilFileUpload.js");
     // needed styles
     $tpl->addCss(ilUtil::getStyleSheetLocation("filesystem", "fileupload.css", "Services/FileUpload"));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:16,代码来源:class.ilFileUploadGUI.php

示例4: saveFileLink

 /**
  * Save file link
  */
 function saveFileLink()
 {
     $mtpl =& new ilTemplate("tpl.link_help.html", true, true, "Modules/LearningModule");
     $mtpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     if ($_FILES["link_file"]["name"] != "") {
         include_once "./Modules/File/classes/class.ilObjFile.php";
         $fileObj = new ilObjFile();
         $fileObj->setType("file");
         $fileObj->setTitle($_FILES["link_file"]["name"]);
         $fileObj->setDescription("");
         $fileObj->setFileName($_FILES["link_file"]["name"]);
         $fileObj->setFileType($_FILES["link_file"]["type"]);
         $fileObj->setFileSize($_FILES["link_file"]["size"]);
         $fileObj->setMode("filelist");
         $fileObj->create();
         // upload file to filesystem
         $fileObj->createDirectory();
         $fileObj->raiseUploadError(false);
         $fileObj->getUploadFile($_FILES["link_file"]["tmp_name"], $_FILES["link_file"]["name"]);
         $this->uploaded_file = $fileObj;
     }
     $this->showLinkHelp();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:26,代码来源:class.ilInternalLinkGUI.php

示例5: 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->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->setCurrentBlock("head_content");
         $this->tpl->setVariable("JS_LOCATION", "./Modules/TestQuestionPool/js/toolman/");
         $this->tpl->parseCurrentBlock();
         // 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();
             }
         }
     }
     if ($this->object->getOutputType() != OUTPUT_JAVASCRIPT) {
         foreach ($keys as $idx) {
             $answer = $this->object->answers[$idx];
             if ($this->object->getOrderingType() == OQ_PICTURES) {
                 $template->setCurrentBlock("ordering_row_standard_pictures");
                 $template->setVariable("PICTURE_HREF", $this->object->getImagePathWeb() . $answer->getAnswertext());
                 $thumbweb = $this->object->getImagePathWeb() . $this->object->getThumbPrefix() . $answer->getAnswertext();
                 $thumb = $this->object->getImagePath() . $this->object->getThumbPrefix() . $answer->getAnswertext();
                 if (!@file_exists($thumb)) {
                     $this->object->rebuildThumbnails();
                 }
                 $template->setVariable("THUMB_HREF", $thumbweb);
                 $template->setVariable("THUMB_ALT", $this->lng->txt("thumbnail"));
                 $template->setVariable("THUMB_TITLE", $this->lng->txt("enlarge"));
                 $template->setVariable("ANSWER_ID", $answer->getRandomID());
                 $template->parseCurrentBlock();
             } else {
                 $template->setCurrentBlock("ordering_row_standard_text");
                 $template->setVariable("ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(), TRUE));
                 $template->setVariable("ANSWER_ID", $answer->getRandomID());
                 $template->parseCurrentBlock();
             }
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.assOrderingQuestionGUI.php

示例6: showAbstract

 /**
  * show abstract of digilib book
  */
 function showAbstract($a_target_id)
 {
     if (count($_POST["tr_id"]) > 1) {
         $message = true;
         $message_text = $this->lng->txt("cont_select_one_translation_warning");
         $show_full = false;
     } else {
         if (!$a_target_id and ($_POST["action"] == "show" or $_POST["action"] == "details")) {
             $message = true;
             $message_text = $this->lng->txt("cont_select_one_edition");
             $show_full = false;
         } else {
             if (is_array($a_target_id) and count($a_target_id) > 1) {
                 $message = true;
                 $message_text = $this->lng->txt("cont_msg_multiple_editions");
                 $show_full = false;
             } else {
                 if (is_array($a_target_id)) {
                     $a_target_id = $a_target_id[0];
                     $show_full = true;
                 } else {
                     $a_target_id = 0;
                     $show_full = false;
                 }
             }
         }
     }
     $this->object->initBibItemObject();
     // content style
     $this->tpl->setCurrentBlock("ContentStyle");
     $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
     $this->tpl->parseCurrentBlock();
     // syntax style
     $this->tpl->setCurrentBlock("SyntaxStyle");
     $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $this->tpl->parseCurrentBlock();
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $this->tpl->setCurrentBlock("ilPage");
     $tmp_tpl = new ilTemplate("tpl.bibliography.xsl", true, true, "Modules/LearningModule");
     $tmp_tpl->setVariable("TITLE", $this->lng->txt("title"));
     $tmp_tpl->setVariable("EDITION", $this->lng->txt("cont_edition"));
     $tmp_tpl->setVariable("AUTHORS", $this->lng->txt("authors"));
     if ($show_full) {
         $this->ctrl->setParameterByClass("illmpresentationgui", "frame", "maincontent");
         $action = $this->ctrl->getLinkTargetByClass("illmpresentationgui", "layout");
         $params = array('mode' => "view_full", 'action' => $action, 'target_id' => "{$a_target_id}");
         $tmp_tpl->setVariable("BOOKTITLE", $this->lng->txt("cont_booktitle"));
         $tmp_tpl->setVariable("CROSS_REFERENCE", $this->lng->txt("cont_cross_reference"));
         $tmp_tpl->setVariable("DETAILS", $this->lng->txt("cont_details"));
         $tmp_tpl->setVariable("EDITOR", $this->lng->txt("editor"));
         $tmp_tpl->setVariable("HOW_PUBLISHED", $this->lng->txt("cont_how_published"));
         $tmp_tpl->setVariable("WHERE_PUBLISHED", $this->lng->txt("cont_where_published"));
         $tmp_tpl->setVariable("INSTITUTION", $this->lng->txt("institution"));
         $tmp_tpl->setVariable("JOURNAL", $this->lng->txt("cont_journal"));
         $tmp_tpl->setVariable("KEYWORD", $this->lng->txt("cont_keyword"));
         $tmp_tpl->setVariable("PAGES", $this->lng->txt("cont_pages"));
         $tmp_tpl->setVariable("SCHOOL", $this->lng->txt("cont_school"));
         $tmp_tpl->setVariable("MONTH", $this->lng->txt("cont_month"));
         $tmp_tpl->setVariable("PUBLISHER", $this->lng->txt("cont_publisher"));
         $tmp_tpl->setVariable("SERIES", $this->lng->txt("cont_series"));
         $tmp_tpl->setVariable("SERIES_TITLE", $this->lng->txt("cont_series_title"));
         $tmp_tpl->setVariable("SERIES_EDITOR", $this->lng->txt("cont_series_editor"));
         $tmp_tpl->setVariable("SERIES_VOLUME", $this->lng->txt("cont_series_volume"));
         $tmp_tpl->setVariable("YEAR", $this->lng->txt("cont_year"));
         $tmp_tpl->setVariable("ISBN", $this->lng->txt("cont_isbn"));
         $tmp_tpl->setVariable("URL", $this->lng->txt("cont_url"));
     } else {
         $this->ctrl->setParameterByClass("illmpresentationgui", "frame", "maincontent");
         $action = $this->ctrl->getLinkTargetByClass("illmpresentationgui", "layout");
         $params = array('mode' => "view_simple", 'action' => $action);
         $this->ctrl->clearParametersByClass("illmpresentationgui");
         if ($translations = $this->object->getTranslations()) {
             foreach ($translations as $tr_id) {
                 $tmp_obj = ilObjectFactory::getInstanceByRefId($tr_id);
                 $tmp_tpl->setCurrentBlock("TRANSLATION_ROW");
                 $tmp_tpl->setVariable("ROW_TITLE", $tmp_obj->getTitle());
                 $tmp_tpl->setVariable("ROW_ID", $tr_id);
                 $tmp_tpl->parseCurrentBlock();
                 unset($tmp_obj);
             }
             $tmp_tpl->setCurrentBlock("TRANSLATION");
             $tmp_tpl->setVariable("TRANSLATION_HEADER", $this->lng->txt("cont_translations"));
             $tmp_tpl->parseCurrentBlock();
         }
         $tmp_tpl->setVariable("DETAILS", $this->lng->txt("cont_details"));
         $tmp_tpl->setVariable("SHOW", $this->lng->txt("cont_show"));
         $tmp_tpl->setVariable("SHOW_CITATION", $this->lng->txt("cont_show_citation"));
         $tmp_tpl->setVariable("GO", $this->lng->txt("go"));
     }
     // SHOW MESSAGE
     if ($message) {
         ilUtil::sendInfo($message_text);
     }
     $xsl = $tmp_tpl->get();
     $xml = $this->object->bib_obj->getXML();
     if (empty($xml)) {
         return true;
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilObjDlBookGUI.php

示例7: membersGalleryObject

 /**
  * Builds a learnlink seminar members gallery as a layer of left-floating images
  * @author Arturo Gonzalez <arturogf@gmail.com>
  * @access       public
  */
 public function membersGalleryObject()
 {
     global $rbacsystem;
     $is_admin = (bool) $rbacsystem->checkAccess('write', $this->object->getRefId());
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.icrs_members_gallery.html', 'Modules/ILinc');
     $this->__setSubTabs('members');
     $this->lng->loadLanguageModule('ilinc');
     $member_ids = $this->object->getMemberIds();
     // fetch all user data in one shot to improve performance (from ILIAS db)
     $members = $this->object->getMemberData($member_ids);
     // fetch docent or student assignment form all coursemembers from iLinc server
     $admin_ids = $this->object->getiLincMemberIds(true);
     // MEMBERS
     if (count($members)) {
         foreach ($members as $member) {
             // get user object
             if (!($usr_obj = ilObjectFactory::getInstanceByObjId($member['id'], false))) {
                 continue;
             }
             $public_profile = $usr_obj->getPref('public_profile');
             // SET LINK TARGET FOR USER PROFILE
             $this->ctrl->setParameterByClass('ilpublicuserprofilegui', 'user', $member['id']);
             $profile_target = $this->ctrl->getLinkTargetByClass('ilpublicuserprofilegui', 'getHTML');
             // GET USER IMAGE
             $file = $usr_obj->getPersonalPicturePath('xsmall');
             switch (in_array($member['ilinc_id'], $admin_ids)) {
                 //admins
                 case 1:
                     if ($public_profile == 'y' || $public_profile == 'g') {
                         $this->tpl->setCurrentBlock('tutor_linked');
                         $this->tpl->setVariable('LINK_PROFILE', $profile_target);
                         $this->tpl->setVariable('SRC_USR_IMAGE', $file);
                         $this->tpl->parseCurrentBlock();
                     } else {
                         $this->tpl->setCurrentBlock('tutor_not_linked');
                         $this->tpl->setVariable('SRC_USR_IMAGE', $file);
                         $this->tpl->parseCurrentBlock();
                     }
                     $this->tpl->setCurrentBlock('tutor');
                     break;
                 case 0:
                     if ($public_profile == 'y' || $public_profile == 'g') {
                         $this->tpl->setCurrentBlock('member_linked');
                         $this->tpl->setVariable('LINK_PROFILE', $profile_target);
                         $this->tpl->setVariable('SRC_USR_IMAGE', $file);
                         $this->tpl->parseCurrentBlock();
                     } else {
                         $this->tpl->setCurrentBlock('member_not_linked');
                         $this->tpl->setVariable('SRC_USR_IMAGE', $file);
                         $this->tpl->parseCurrentBlock();
                     }
                     $this->tpl->setCurrentBlock('member');
                     break;
             }
             // do not show name, if public profile is not activated
             if ($public_profile == 'y' || $public_profile == 'g') {
                 $this->tpl->setVariable('FIRSTNAME', $member['firstname']);
                 $this->tpl->setVariable('LASTNAME', $member['lastname']);
             }
             $this->tpl->setVariable('LOGIN', $usr_obj->getLogin());
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock('members');
         $this->tpl->setVariable('MEMBERS_TABLE_HEADER', $this->lng->txt('ilinc_involved_users'));
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setVariable('TITLE', $this->lng->txt('icrs_members_print_title'));
     $this->tpl->setVariable('CSS_PATH', ilUtil::getStyleSheetLocation());
     $headline = $this->object->getTitle() . '<br />' . $this->object->getDescription();
     $this->tpl->setVariable('HEADLINE', $headline);
     $this->tpl->show();
     exit;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:78,代码来源:class.ilObjiLincCourseGUI.php

示例8: setTemplateVars


//.........这里部分代码省略.........
             $this->tpl->setVariable("TXT_NOT_LOGGED_IN", $lng->txt("not_logged_in"));
             $this->tpl->setVariable("TXT_LOGIN", $lng->txt("log_in"));
             // #13058
             $target_str = $this->getLoginTargetPar() != "" ? $this->getLoginTargetPar() : ilTemplate::buildLoginTarget();
             $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 {
             if ($this->getMode() != self::MODE_TOPBAR_REDUCED) {
                 $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';
                     require_once 'Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php';
                     $notifications = ilNotificationOSDHandler::getNotificationsForUser($ilUser->getId());
                     $this->tpl->setVariable('NOTIFICATION_CLOSE_HTML', json_encode(ilGlyphGUI::get(ilGlyphGUI::CLOSE, $lng->txt('close'))));
                     $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') && $ilUser->getPref('chat_play_invitation_sound') ? 'true' : 'false');
                     foreach ($notifications as $notification) {
                         if ($notification['type'] == 'osd_maint') {
                             continue;
                         }
                         $this->tpl->setCurrentBlock('osd_notification_item');
                         $this->tpl->setVariable('NOTIFICATION_ICON_PATH', $notification['data']->iconPath);
                         $this->tpl->setVariable('NOTIFICATION_TITLE', $notification['data']->title);
                         $this->tpl->setVariable('NOTIFICATION_LINK', $notification['data']->link);
                         $this->tpl->setVariable('NOTIFICATION_LINKTARGET', $notification['data']->linktarget);
                         $this->tpl->setVariable('NOTIFICATION_ID', $notification['notification_osd_id']);
                         $this->tpl->setVariable('NOTIFICATION_SHORT_DESCRIPTION', $notification['data']->shortDescription);
                         $this->tpl->parseCurrentBlock();
                     }
                 }
             }
             $this->tpl->setCurrentBlock("userisloggedin");
             $this->tpl->setVariable("TXT_LOGIN_AS", $lng->txt("login_as"));
             $user_img_src = $ilias->account->getPersonalPicturePath("small", true);
             $user_img_alt = $ilias->account->getFullname();
             $this->tpl->setVariable("USER_IMG", ilUtil::img($user_img_src, $user_img_alt));
             $this->tpl->setVariable("USR_LINK_PROFILE", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToProfile");
             $this->tpl->setVariable("USR_TXT_PROFILE", $lng->txt("personal_profile"));
             $this->tpl->setVariable("USR_LINK_SETTINGS", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSettings");
             $this->tpl->setVariable("USR_TXT_SETTINGS", $lng->txt("personal_settings"));
             $this->tpl->setVariable("TXT_LOGOUT2", $lng->txt("logout"));
             $this->tpl->setVariable("LINK_LOGOUT2", $link_dir . "logout.php?lang=" . $ilias->account->getCurrentLanguage());
             $this->tpl->setVariable("USERNAME", $ilias->account->getFullname());
             $this->tpl->setVariable("LOGIN", $ilias->account->getLogin());
             $this->tpl->setVariable("MATRICULATION", $ilias->account->getMatriculation());
             $this->tpl->setVariable("EMAIL", $ilias->account->getEmail());
             $this->tpl->parseCurrentBlock();
         }
     } else {
         // member view info
         $this->tpl->setVariable("TOPBAR_CLASS", " ilMemberViewMainHeader");
         $this->tpl->setVariable("MEMBER_VIEW_INFO", $lng->txt("mem_view_long"));
     }
     if (!$this->topbar_back_url) {
         include_once "./Modules/SystemFolder/classes/class.ilObjSystemFolder.php";
         $header_top_title = ilObjSystemFolder::_getHeaderTitle();
         if (trim($header_top_title) != "" && $this->tpl->blockExists("header_top_title")) {
             $this->tpl->setCurrentBlock("header_top_title");
             $this->tpl->setVariable("TXT_HEADER_TITLE", $header_top_title);
             $this->tpl->parseCurrentBlock();
         }
     } else {
         $this->tpl->setCurrentBlock("header_back_bl");
         $this->tpl->setVariable("URL_HEADER_BACK", $this->topbar_back_url);
         $this->tpl->setVariable("TXT_HEADER_BACK", $this->topbar_back_caption ? $this->topbar_back_caption : $lng->txt("back"));
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     if ($this->getMode() == self::MODE_FULL) {
         // $this->tpl->setVariable("TXT_LOGOUT", $lng->txt("logout"));
         $this->tpl->setVariable("HEADER_URL", $this->getHeaderURL());
         $this->tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.svg"));
     }
     include_once "./Modules/SystemFolder/classes/class.ilObjSystemFolder.php";
     // set link to return to desktop, not depending on a specific position in the hierarchy
     //$this->tpl->setVariable("SCRIPT_START", $this->getScriptTarget("start.php"));
     /*
     else
     {
     	$this->tpl->setVariable("HEADER_URL", $this->getHeaderURL());
     	$this->tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.svg"));
     }
     */
     $this->tpl->setVariable("TXT_MAIN_MENU", $lng->txt("main_menu"));
     $this->tpl->parseCurrentBlock();
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:101,代码来源:class.ilMainMenuGUI.php

示例9: executeCommand

 public function executeCommand()
 {
     global $ilAccess, $ilNavigationHistory, $ilErr, $ilTabs;
     $this->external_rater_360 = false;
     if (!$this->creation_mode && $this->object->get360Mode() && $_SESSION["anonymous_id"][$this->object->getId()] && ilObjSurvey::validateExternalRaterCode($this->object->getRefId(), $_SESSION["anonymous_id"][$this->object->getId()])) {
         $this->external_rater_360 = true;
     }
     if (!$this->external_rater_360) {
         if (!$ilAccess->checkAccess("read", "", $this->ref_id) && !$ilAccess->checkAccess("visible", "", $this->ref_id)) {
             $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
         }
         // add entry to navigation history
         if (!$this->getCreationMode() && $ilAccess->checkAccess("read", "", $this->ref_id)) {
             $this->ctrl->setParameterByClass("ilobjsurveygui", "ref_id", $this->ref_id);
             $link = $this->ctrl->getLinkTargetByClass("ilobjsurveygui", "");
             $ilNavigationHistory->addItem($this->ref_id, $link, "svy");
         }
     }
     $cmd = $this->ctrl->getCmd("properties");
     // workaround for bug #6288, needs better solution
     if ($cmd == "saveTags") {
         $this->ctrl->setCmdClass("ilinfoscreengui");
     }
     // deep link from repository - "redirect" to page view
     if (!$this->ctrl->getCmdClass() && $cmd == "questionsrepo") {
         $_REQUEST["pgov"] = 1;
         $this->ctrl->setCmd("questions");
         $this->ctrl->setCmdClass("ilsurveyeditorgui");
     }
     $next_class = $this->ctrl->getNextClass($this);
     $this->ctrl->setReturn($this, "properties");
     $this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "survey.css", "Modules/Survey"), "screen");
     $this->prepareOutput();
     switch ($next_class) {
         case "ilinfoscreengui":
             if (!in_array($this->ctrl->getCmdClass(), array('ilpublicuserprofilegui', 'ilobjportfoliogui'))) {
                 $this->addHeaderAction();
                 $this->infoScreen();
                 // forwards command
             } else {
                 // #16891
                 $ilTabs->clearTargets();
                 include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
                 $info = new ilInfoScreenGUI($this);
                 $this->ctrl->forwardCommand($info);
             }
             break;
         case 'ilmdeditorgui':
             $this->handleWriteAccess();
             $ilTabs->activateTab("meta_data");
             $this->addHeaderAction();
             include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
             $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
             $md_gui->addObserver($this->object, 'MDUpdateListener', 'General');
             $this->ctrl->forwardCommand($md_gui);
             break;
         case "ilsurveyevaluationgui":
             $ilTabs->activateTab("svy_results");
             $this->addHeaderAction();
             include_once "./Modules/Survey/classes/class.ilSurveyEvaluationGUI.php";
             $eval_gui = new ilSurveyEvaluationGUI($this->object);
             $this->ctrl->forwardCommand($eval_gui);
             break;
         case "ilsurveyexecutiongui":
             $ilTabs->clearTargets();
             include_once "./Modules/Survey/classes/class.ilSurveyExecutionGUI.php";
             $exec_gui = new ilSurveyExecutionGUI($this->object);
             $this->ctrl->forwardCommand($exec_gui);
             break;
         case 'ilpermissiongui':
             $ilTabs->activateTab("perm_settings");
             $this->addHeaderAction();
             include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
             $perm_gui =& new ilPermissionGUI($this);
             $this->ctrl->forwardCommand($perm_gui);
             break;
         case 'ilobjectcopygui':
             include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
             $cp = new ilObjectCopyGUI($this);
             $cp->setType('svy');
             $this->ctrl->forwardCommand($cp);
             break;
         case "ilcommonactiondispatchergui":
             include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
             $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
             $this->ctrl->forwardCommand($gui);
             break;
             // 360, skill service
         // 360, skill service
         case 'ilsurveyskillgui':
             $ilTabs->activateTab("survey_competences");
             include_once "./Modules/Survey/classes/class.ilSurveySkillGUI.php";
             $gui = new ilSurveySkillGUI($this->object);
             $this->ctrl->forwardCommand($gui);
             break;
         case 'ilsurveyskilldeterminationgui':
             $ilTabs->activateTab("maintenance");
             include_once "./Modules/Survey/classes/class.ilSurveySkillDeterminationGUI.php";
             $gui = new ilSurveySkillDeterminationGUI($this->object);
             $this->ctrl->forwardCommand($gui);
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjSurveyGUI.php

示例10: exportHTML

 /**
  * export html package
  */
 function exportHTML($a_target_dir, $log, $a_zip_file = true, $a_export_format = "html")
 {
     global $tpl, $ilBench, $ilLocator, $ilUser;
     // initialize temporary target directory
     ilUtil::delDir($a_target_dir);
     ilUtil::makeDir($a_target_dir);
     $mob_dir = $a_target_dir . "/mobs";
     ilUtil::makeDir($mob_dir);
     $file_dir = $a_target_dir . "/files";
     ilUtil::makeDir($file_dir);
     $teximg_dir = $a_target_dir . "/teximg";
     ilUtil::makeDir($teximg_dir);
     $style_dir = $a_target_dir . "/style";
     ilUtil::makeDir($style_dir);
     $style_img_dir = $a_target_dir . "/style/images";
     ilUtil::makeDir($style_img_dir);
     $content_style_dir = $a_target_dir . "/content_style";
     ilUtil::makeDir($content_style_dir);
     $content_style_img_dir = $a_target_dir . "/content_style/images";
     ilUtil::makeDir($content_style_img_dir);
     $GLOBALS["teximgcnt"] = 0;
     // export system style sheet
     $location_stylesheet = ilUtil::getStyleSheetLocation("filesystem");
     $style_name = $ilUser->prefs["style"] . ".css";
     copy($location_stylesheet, $style_dir . "/" . $style_name);
     $fh = fopen($location_stylesheet, "r");
     $css = fread($fh, filesize($location_stylesheet));
     preg_match_all("/url\\(([^\\)]*)\\)/", $css, $files);
     foreach (array_unique($files[1]) as $fileref) {
         $fileref = dirname($location_stylesheet) . "/" . $fileref;
         if (is_file($fileref)) {
             copy($fileref, $style_img_dir . "/" . basename($fileref));
         }
     }
     fclose($fh);
     $location_stylesheet = ilUtil::getStyleSheetLocation();
     // export content style sheet
     $ilBench->start("ExportHTML", "exportContentStyle");
     if ($this->getStyleSheetId() < 1) {
         $cont_stylesheet = "./Services/COPage/css/content.css";
         $css = fread(fopen($cont_stylesheet, 'r'), filesize($cont_stylesheet));
         preg_match_all("/url\\(([^\\)]*)\\)/", $css, $files);
         foreach (array_unique($files[1]) as $fileref) {
             if (is_file(str_replace("..", ".", $fileref))) {
                 copy(str_replace("..", ".", $fileref), $content_style_img_dir . "/" . basename($fileref));
             }
             $css = str_replace($fileref, "images/" . basename($fileref), $css);
         }
         fwrite(fopen($content_style_dir . "/content.css", 'w'), $css);
     } else {
         $style = new ilObjStyleSheet($this->getStyleSheetId());
         $style->writeCSSFile($content_style_dir . "/content.css", "images");
         $style->copyImagesToDir($content_style_img_dir);
     }
     $ilBench->stop("ExportHTML", "exportContentStyle");
     // export syntax highlighting style
     $syn_stylesheet = ilObjStyleSheet::getSyntaxStylePath();
     copy($syn_stylesheet, $a_target_dir . "/syntaxhighlight.css");
     // get learning module presentation gui class
     include_once "./Modules/LearningModule/classes/class.ilLMPresentationGUI.php";
     $_GET["cmd"] = "nop";
     $lm_gui =& new ilLMPresentationGUI();
     $lm_gui->setOfflineMode(true);
     $lm_gui->setOfflineDirectory($a_target_dir);
     $lm_gui->setExportFormat($a_export_format);
     // export pages
     $ilBench->start("ExportHTML", "exportHTMLPages");
     $this->exportHTMLPages($lm_gui, $a_target_dir);
     $ilBench->stop("ExportHTML", "exportHTMLPages");
     // export glossary terms
     $ilBench->start("ExportHTML", "exportHTMLGlossaryTerms");
     $this->exportHTMLGlossaryTerms($lm_gui, $a_target_dir);
     $ilBench->stop("ExportHTML", "exportHTMLGlossaryTerms");
     // export all media objects
     $ilBench->start("ExportHTML", "exportHTMLMediaObjects");
     $linked_mobs = array();
     foreach ($this->offline_mobs as $mob) {
         if (ilObject::_exists($mob) && ilObject::_lookupType($mob) == "mob") {
             $this->exportHTMLMOB($a_target_dir, $lm_gui, $mob, "_blank", $linked_mobs);
         }
     }
     $linked_mobs2 = array();
     // mobs linked in link areas
     foreach ($linked_mobs as $mob) {
         if (ilObject::_exists($mob)) {
             $this->exportHTMLMOB($a_target_dir, $lm_gui, $mob, "_blank", $linked_mobs2);
         }
     }
     $_GET["obj_type"] = "MediaObject";
     $_GET["obj_id"] = $a_mob_id;
     $_GET["cmd"] = "";
     $ilBench->stop("ExportHTML", "exportHTMLMediaObjects");
     // export all file objects
     $ilBench->start("ExportHTML", "exportHTMLFileObjects");
     foreach ($this->offline_files as $file) {
         $this->exportHTMLFile($a_target_dir, $file);
     }
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilObjContentObject.php

示例11: unloadSahs

 function unloadSahs()
 {
     $this->tpl = new ilTemplate("tpl.sahs_unload_cbt.html", true, true, "Modules/ScormAicc");
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $this->tpl->setVariable("SCO_ID", $_GET["sahs_id"]);
     $this->tpl->show();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:7,代码来源:class.ilSCORMPresentationGUI.php

示例12: showDownloadList

 /**
  * show download list
  */
 function showDownloadList()
 {
     //$this->tpl = new ilTemplate("tpl.lm_toc.html", true, true, true);
     $this->tpl->setCurrentBlock("ContentStyle");
     if (!$this->offlineMode()) {
         $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->lm->getStyleSheetId()));
     } else {
         $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", "content_style/content.css");
     }
     $this->tpl->parseCurrentBlock();
     $this->renderPageTitle();
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $this->tpl->getStandardTemplate();
     $this->tpl->setVariable("TABS", $this->lm_gui->setilLMMenu($this->offlineMode(), $this->getExportFormat(), "download", true));
     $this->ilLocator();
     //$this->tpl->stopTitleFloating();
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.lm_download_list.html", "Modules/LearningModule");
     // set title header
     $this->tpl->setTitle($this->lm->getTitle());
     $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"));
     /*
     		$this->tpl->setVariable("TXT_BACK", $this->lng->txt("back"));
     		$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
     		$this->tpl->setVariable("LINK_BACK",
     			$this->ctrl->getLinkTarget($this, "")); */
     // output copyright information
     include_once 'Services/MetaData/classes/class.ilMD.php';
     $md = new ilMD($this->lm->getId(), 0, $this->lm->getType());
     if (is_object($md_rights = $md->getRights())) {
         $copyright = $md_rights->getDescription();
         include_once 'Services/MetaData/classes/class.ilMDUtils.php';
         $copyright = ilMDUtils::_parseCopyright($copyright);
         if ($copyright != "") {
             $this->lng->loadLanguageModule("meta");
             $this->tpl->setCurrentBlock("copyright");
             $this->tpl->setVariable("TXT_COPYRIGHT", $this->lng->txt("meta_copyright"));
             $this->tpl->setVariable("LM_COPYRIGHT", $copyright);
             $this->tpl->parseCurrentBlock();
         }
     }
     // create table
     require_once "./Services/Table/classes/class.ilTableGUI.php";
     $tbl = new ilTableGUI();
     // load files templates
     $this->tpl->addBlockfile("DOWNLOAD_TABLE", "download_table", "tpl.table.html");
     // load template for table content data
     $this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.download_file_row.html", "Modules/LearningModule");
     $export_files = array();
     $types = array("xml", "html", "scorm");
     foreach ($types as $type) {
         if ($this->lm->getPublicExportFile($type) != "") {
             if (is_file($this->lm->getExportDirectory($type) . "/" . $this->lm->getPublicExportFile($type))) {
                 $dir = $this->lm->getExportDirectory($type);
                 $size = filesize($this->lm->getExportDirectory($type) . "/" . $this->lm->getPublicExportFile($type));
                 $export_files[] = array("type" => $type, "file" => $this->lm->getPublicExportFile($type), "size" => $size);
             }
         }
     }
     $num = 0;
     $tbl->setTitle($this->lng->txt("download"));
     $tbl->setHeaderNames(array($this->lng->txt("cont_format"), $this->lng->txt("cont_file"), $this->lng->txt("size"), $this->lng->txt("date"), ""));
     $cols = array("format", "file", "size", "date", "download");
     $header_params = array("ref_id" => $_GET["ref_id"], "obj_id" => $_GET["obj_id"], "cmd" => "showDownloadList", "cmdClass" => strtolower(get_class($this)));
     $tbl->setHeaderVars($cols, $header_params);
     $tbl->setColumnWidth(array("10%", "30%", "20%", "20%", "20%"));
     $tbl->disable("sort");
     // control
     $tbl->setOrderColumn($_GET["sort_by"]);
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount($this->maxcount);
     // ???
     //$this->tpl->setVariable("COLUMN_COUNTS", 5);
     // footer
     //$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
     $tbl->disable("footer");
     $tbl->setMaxCount(count($export_files));
     $export_files = array_slice($export_files, $_GET["offset"], $_GET["limit"]);
     $tbl->render();
     if (count($export_files) > 0) {
         $i = 0;
         foreach ($export_files as $exp_file) {
             if (!$exp_file["size"] > 0) {
                 continue;
             }
             $this->tpl->setCurrentBlock("tbl_content");
             $this->tpl->setVariable("TXT_FILENAME", $exp_file["file"]);
             $css_row = ilUtil::switchColor($i++, "tblrow1", "tblrow2");
             $this->tpl->setVariable("CSS_ROW", $css_row);
             $this->tpl->setVariable("TXT_SIZE", $exp_file["size"]);
             $this->tpl->setVariable("TXT_FORMAT", strtoupper($exp_file["type"]));
             $this->tpl->setVariable("CHECKBOX_ID", $exp_file["type"] . ":" . $exp_file["file"]);
             $file_arr = explode("__", $exp_file["file"]);
             $this->tpl->setVariable("TXT_DATE", date("Y-m-d H:i:s", $file_arr[0]));
             $this->tpl->setVariable("TXT_DOWNLOAD", $this->lng->txt("download"));
             $this->ctrl->setParameter($this, "type", $exp_file["type"]);
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilLMPresentationGUI.php

示例13: sco_preview

 /**
  * SCO preview
  */
 function sco_preview()
 {
     global $tpl, $ilCtrl, $lng;
     // init main template
     $tpl = new ilTemplate("tpl.main.html", true, true);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $tpl->setBodyClass("");
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->slm_object->getStyleSheetId()));
     $tpl->parseCurrentBlock();
     // get javascript
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery();
     iljQueryUtil::initjQueryUI();
     $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/pure.js");
     $tpl->addJavaScript("./Modules/Scorm2004/scripts/pager.js");
     $tpl->addOnLoadCode("pager.Init();");
     $tree = new ilTree($this->slm_object->getId());
     $tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
     $tree->setTreeTablePK("slm_id");
     include_once "./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php";
     include_once "./Services/MetaData/classes/class.ilMD.php";
     $meta = new ilMD($this->node_object->getSLMId(), $this->node_object->getId(), $this->node_object->getType());
     $desc_ids = $meta->getGeneral()->getDescriptionIds();
     $sco_description = $meta->getGeneral()->getDescription($desc_ids[0])->getDescription();
     // get sco template
     $sco_tpl = new ilTemplate("tpl.sco.html", true, true, "Modules/Scorm2004");
     // navigation
     $lk = ilObjSAHSLearningModule::getAffectiveLocalization($this->node_object->getSLMId());
     ilSCORM2004Asset::renderNavigation($sco_tpl, "", $lk);
     // meta page (description and objectives)
     ilSCORM2004Asset::renderMetaPage($sco_tpl, $this->node_object, $this->node_object->getType());
     // init export (this initialises glossary template)
     ilSCORM2004PageGUI::initExport();
     $terms = $this->node_object->getGlossaryTermIds();
     // render page
     foreach ($tree->getSubTree($tree->getNodeData($this->node_object->getId()), true, 'page') as $page) {
         $page_obj = new ilSCORM2004PageGUI($this->node_object->getType(), $page["obj_id"], 0, $this->slm_object->getId());
         $page_obj->setPresentationTitle($page["title"]);
         $page_obj->setOutputMode(IL_PAGE_PREVIEW);
         $page_obj->setStyleId($this->slm_object->getStyleSheetId());
         if (count($terms) > 1) {
             $page_obj->setGlossaryOverviewInfo(ilSCORM2004ScoGUI::getGlossaryOverviewId(), $this->node_object);
         }
         $sco_tpl->setCurrentBlock("page_preview");
         $html = $ilCtrl->getHTML($page_obj);
         //$sco_tpl->setVariable("PAGE_PRV", $page_obj->showPage("export"));
         $sco_tpl->setVariable("PAGE_PRV", $html);
         $sco_tpl->parseCurrentBlock();
     }
     $output = $sco_tpl->get();
     // append glossary entries on the sco level
     $output .= ilSCORM2004PageGUI::getGlossaryHTML($this->node_object);
     //insert questions
     require_once './Modules/Scorm2004/classes/class.ilQuestionExporter.php';
     $output = preg_replace_callback("/{{{{{(Question;)(il__qst_[0-9]+)}}}}}/", array(get_class($this), 'insertQuestion'), $output);
     //		$output = preg_replace("/&#123;/","",$output);
     //		$output = preg_replace("/&#125;/","",$output);
     $output = "<script>var ScormApi=null;" . ilQuestionExporter::questionsJS() . "</script>" . $output;
     $lk = ilObjSAHSLearningModule::getAffectiveLocalization($this->node_object->getSLMId());
     //		include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php");
     //		ilSCORM2004PageGUI::addPreparationJavascript($tpl, $lk);
     $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/question_handling.js");
     $tpl->addCss("./Modules/Scorm2004/templates/default/question_handling.css");
     include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
     ilOverlayGUI::initJavascript();
     //inline JS
     $output .= '<script type="text/javascript" src="./Modules/Scorm2004/scripts/questions/question_handling.js"></script>';
     $tpl->setVariable("CONTENT", $output);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:74,代码来源:class.ilSCORM2004ScoGUI.php

示例14: addUserTextEditor

 /**
  * Adds custom support for an RTE in an ILIAS form
  *
  * Adds custom support for an RTE in an ILIAS form
  *
  * @param string $editor_selector CSS class of the text input field(s)
  * @access public
  */
 function addUserTextEditor($editor_selector)
 {
     $validtags = array("strong", "em", "p", "br", "div", "span");
     $buttontags = array("strong", "em");
     include_once "./Services/UICore/classes/class.ilTemplate.php";
     $template = new ilTemplate("tpl.usereditor.html", true, true, "Services/RTE");
     $this->handleImgContextMenuItem($template);
     $template->setCurrentBlock("tinymce");
     $template->setVariable("JAVASCRIPT_LOCATION", "./Services/RTE/tiny_mce" . $this->vd . "/tiny_mce.js");
     include_once "./Services/Object/classes/class.ilObject.php";
     $template->setVariable("SELECTOR", $editor_selector);
     $template->setVariable("BLOCKFORMATS", "");
     $template->setVariable("VALID_ELEMENTS", $this->_getValidElementsFromHTMLTags($validtags));
     if ($this->getStyleSelect()) {
         $template->setVariable("STYLE_SELECT", ",styleselect");
     }
     $template->setVariable("BUTTONS", $this->_buildButtonsFromHTMLTags($buttontags) . ",backcolor,removeformat");
     include_once "./Services/Utilities/classes/class.ilUtil.php";
     //$template->setVariable("STYLESHEET_LOCATION", $this->getContentCSS());
     $template->setVariable("STYLESHEET_LOCATION", ilUtil::getNewContentStyleSheetLocation() . "," . ilUtil::getStyleSheetLocation("output", "delos.css"));
     $template->setVariable("LANG", $this->_getEditorLanguage());
     $template->parseCurrentBlock();
     $this->tpl->setCurrentBlock("HeadContent");
     $this->tpl->setVariable("CONTENT_BLOCK", $template->get());
     $this->tpl->parseCurrentBlock();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:34,代码来源:class.ilTinyMCE.php

示例15: showMediaFullscreen

 /**
  * show fullscreen view of media object
  */
 function showMediaFullscreen($a_style_id = 0)
 {
     $this->tpl = new ilTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
     $this->tpl->setCurrentBlock("ContentStyle");
     $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", 0);
     $this->tpl->parseCurrentBlock();
     $this->tpl->setVariable("PAGETITLE", " - " . ilObject::_lookupTitle($_GET["mob_id"]));
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $this->tpl->setCurrentBlock("ilMedia");
     require_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
     $media_obj =& new ilObjMediaObject($_GET["mob_id"]);
     if (!empty($_GET["pg_id"])) {
         include_once "./Services/COPage/classes/class.ilPageObjectFactory.php";
         $pg_obj = ilPageObjectFactory::getInstance($this->obj->getParentType(), $_GET["pg_id"]);
         $pg_obj->buildDom();
         $xml = "<dummy>";
         // todo: we get always the first alias now (problem if mob is used multiple
         // times in page)
         $xml .= $pg_obj->getMediaAliasElement($_GET["mob_id"]);
         $xml .= $media_obj->getXML(IL_MODE_OUTPUT);
         $xml .= "</dummy>";
     } else {
         $xml = "<dummy>";
         $xml .= $media_obj->getXML(IL_MODE_ALIAS);
         $xml .= $media_obj->getXML(IL_MODE_OUTPUT);
         $xml .= "</dummy>";
     }
     //echo htmlentities($xml); exit;
     $xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
     $args = array('/_xml' => $xml, '/_xsl' => $xsl);
     $xh = xslt_create();
     //echo "<b>XML:</b>".htmlentities($xml);
     // determine target frames for internal links
     //$pg_frame = $_GET["frame"];
     $wb_path = ilUtil::getWebspaceDir("output") . "/";
     $mode = "fullscreen";
     $params = array('mode' => $mode, 'webspace_path' => $wb_path);
     $output = xslt_process($xh, "arg:/_xml", "arg:/_xsl", NULL, $args, $params);
     echo xslt_error($xh);
     xslt_free($xh);
     // unmask user html
     $this->tpl->setVariable("MEDIA_CONTENT", $output);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:46,代码来源:class.ilPageObjectGUI.php


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