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


PHP ilLink::_getStaticLink方法代码示例

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


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

示例1: getHTML

 /**
  * get html 
  * @return
  */
 public function getHTML()
 {
     global $lng;
     $lng->loadLanguageModule('webr');
     foreach ($this->getSubItemIds(true) as $sub_item) {
         if (is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
             $this->tpl->setCurrentBlock('sea_fragment');
             $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock('subitem');
         $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('webr'));
         $this->tpl->setVariable('SEPERATOR', ':');
         $link_data = ilLinkResourceItems::lookupItem($this->getObjId(), $sub_item);
         $link_data = ilParameterAppender::_append($link_data);
         // handle internal links (#10620)
         if (stristr($link_data["target"], "|")) {
             $parts = explode("|", $link_data["target"]);
             if ($parts[0] == "page") {
                 $parts[0] = "pg";
             }
             if ($parts[0] == "term") {
                 $parts[0] = "git";
             }
             $link_data["target"] = ilLink::_getStaticLink($parts[1], $parts[0]);
         }
         #$this->getItemListGUI()->setChildId($sub_item);
         $this->tpl->setVariable('LINK', $link_data['target']);
         $this->tpl->setVariable('TARGET', '_blank');
         $this->tpl->setVariable('TITLE', $link_data['title']);
         $this->tpl->parseCurrentBlock();
     }
     $this->showDetailsLink();
     return $this->tpl->get();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:39,代码来源:class.ilObjLinkResourceSubItemListGUI.php

示例2: send

 /**
  * Parse and send mail
  * @return 
  */
 public function send()
 {
     switch ($this->getType()) {
         case self::TYPE_NOTIFICATION_APPROVERS:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject($this->getLanguageText('reg_mail_new_user'));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_new_user_body'));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_profile'));
                 $info = $this->getAdditionalInformation();
                 $this->appendBody("\n\n");
                 $this->appendBody($info['usr']->getProfileAsString($this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_reason'));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->getMail()->enableSoap(false);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
         case self::TYPE_NOTIFICATION_CONFIRMATION:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject($this->getLanguageText('reg_mail_new_user_confirmation'));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_new_user_body'));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_profile'));
                 $info = $this->getAdditionalInformation();
                 $this->appendBody("\n\n");
                 $this->appendBody($info['usr']->getProfileAsString($this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_confirmation'));
                 $this->appendBody("\n");
                 // #4527
                 include_once "Services/Link/classes/class.ilLink.php";
                 $this->appendBody(ilLink::_getStaticLink($info['usr']->getId(), "usrf"));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_reason'));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->getMail()->enableSoap(false);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:55,代码来源:class.ilRegistrationMailNotification.php

示例3: fillRow

 /**
  * @param array $row
  */
 public function fillRow(array $row)
 {
     /**
      * @var $ilAccess ilAccessHandler
      */
     global $ilAccess;
     $this->tpl->setVariable('USAGE_INSTANCE_TITLE', $row['title']);
     $this->tpl->setVariable('USAGE_AUTHOR', $row['author']);
     $this->tpl->setVariable('USAGE_PATH', $row['path']);
     if ($ilAccess->checkAccess('read', '', $row['ref_id']) && !$row['is_trashed']) {
         $link = new ilLink();
         $this->tpl->setVariable('USAGE_INSTANCE_LINKTED_TITLE', $row['title']);
         $this->tpl->setVariable('USAGE_INSTANCE_HREF', $link->_getStaticLink($row['ref_id'], 'tst'));
         $this->tpl->setCurrentBlock('linked_title_b');
         $this->tpl->touchBlock('linked_title_b');
         $this->tpl->parseCurrentBlock();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:21,代码来源:class.ilQuestionUsagesTableGUI.php

示例4: rawurlencode

 /**
  * execute command
  */
 function &executeCommand()
 {
     global $lng, $ilAccess, $tpl, $ilNavigationHistory;
     $cmd = $this->ctrl->getCmd();
     $next_class = $this->ctrl->getNextClass($this);
     if ($next_class == "") {
         $this->ctrl->setCmdClass("ilobjwikigui");
         $next_class = $this->ctrl->getNextClass($this);
     }
     // add entry to navigation history
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $obj_id = ilObject::_lookupObjId($_GET["ref_id"]);
         $title = ilObject::_lookupTitle($obj_id);
         if ($_GET["page"] != "") {
             $page = $_GET["page"];
         } else {
             include_once "./Modules/Wiki/classes/class.ilObjWiki.php";
             $page = ilObjWiki::_lookupStartPage($obj_id);
         }
         include_once "./Modules/Wiki/classes/class.ilWikiPage.php";
         if (ilWikiPage::exists($obj_id, $page)) {
             include_once "./Modules/Wiki/classes/class.ilWikiPage.php";
             $add = "_" . rawurlencode($page);
             $page_id = ilWikiPage::getPageIdForTitle($obj_id, $page);
             $ptitle = ilWikiPage::lookupTitle($page_id);
             $title .= ": " . $ptitle;
             $append = $_GET["page"] != "" ? "_" . ilWikiUtil::makeUrlTitle($page) : "";
             include_once './Services/Link/classes/class.ilLink.php';
             $goto = ilLink::_getStaticLink($_GET["ref_id"], "wiki", true, $append);
             //var_dump($goto);
             $ilNavigationHistory->addItem($_GET["ref_id"], "./goto.php?target=wiki_" . $_GET["ref_id"] . $add, "wiki", $title, $page_id, $goto);
         }
     }
     switch ($next_class) {
         case 'ilobjwikigui':
             require_once "./Modules/Wiki/classes/class.ilObjWikiGUI.php";
             $mc_gui =& new ilObjWikiGUI("", (int) $_GET["ref_id"], true, false);
             $this->ctrl->forwardCommand($mc_gui);
             break;
     }
     $tpl->show();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:45,代码来源:class.ilWikiHandlerGUI.php

示例5: renderList


//.........这里部分代码省略.........
                 $alist->addItem($lng->txt("edit_content"), "edit", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "edit"));
                 // #11858
                 if ($is_active) {
                     $alist->addItem($lng->txt("blog_toggle_draft"), "deactivate", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "deactivatePageToList"));
                 } else {
                     $alist->addItem($lng->txt("blog_toggle_final"), "activate", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "activatePageToList"));
                 }
                 $alist->addItem($lng->txt("rename"), "rename", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "edittitle"));
                 $alist->addItem($lng->txt("blog_edit_keywords"), "keywords", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "editKeywords"));
                 $alist->addItem($lng->txt("blog_edit_date"), "editdate", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "editdate"));
                 $alist->addItem($lng->txt("delete"), "delete", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "deleteBlogPostingConfirmationScreen"));
             } else {
                 if ($can_deactivate) {
                     // #10513
                     if ($is_active) {
                         $ilCtrl->setParameter($this, "apid", $item["id"]);
                         $alist->addItem($lng->txt("blog_toggle_draft_admin"), "deactivate", $ilCtrl->getLinkTarget($this, "deactivateAdmin"));
                         $ilCtrl->setParameter($this, "apid", "");
                     }
                     $alist->addItem($lng->txt("delete"), "delete", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "deleteBlogPostingConfirmationScreen"));
                 }
             }
             $wtpl->setCurrentBlock("actions");
             $wtpl->setVariable("ACTION_SELECTOR", $alist->getHTML());
             $wtpl->parseCurrentBlock();
         }
         // comments
         if ($this->object->getNotesStatus() && !$a_link_template && !$this->disable_notes) {
             // count (public) notes
             include_once "Services/Notes/classes/class.ilNote.php";
             $count = sizeof(ilNote::_getNotesOfObject($this->obj_id, $item["id"], "blp", IL_NOTE_PUBLIC));
             if ($a_cmd != "preview") {
                 $wtpl->setCurrentBlock("comments");
                 $wtpl->setVariable("TEXT_COMMENTS", $lng->txt("blog_comments"));
                 $wtpl->setVariable("URL_COMMENTS", $preview);
                 $wtpl->setVariable("COUNT_COMMENTS", $count);
                 $wtpl->parseCurrentBlock();
             }
             /* we disabled comments in edit mode (should always be done via pagegui)
             			else
             			{
             				$hash = ilCommonActionDispatcherGUI::buildAjaxHash(ilCommonActionDispatcherGUI::TYPE_WORKSPACE, 
             					$this->node_id, "blog", $this->obj_id, "blp", $item["id"]);
             				$notes_link = "#\" onclick=\"".ilNoteGUI::getListCommentsJSCall($hash);
             			}
             			*/
         }
         // permanent link
         if ($a_cmd != "preview" && $a_cmd != "previewEmbedded") {
             if ($this->id_type == self::WORKSPACE_NODE_ID) {
                 $goto = $this->getAccessHandler()->getGotoLink($this->node_id, $this->obj_id, "_" . $item["id"]);
             } else {
                 include_once "Services/Link/classes/class.ilLink.php";
                 $goto = ilLink::_getStaticLink($this->node_id, $this->getType(), true, "_" . $item["id"]);
             }
             $wtpl->setCurrentBlock("permalink");
             $wtpl->setVariable("URL_PERMALINK", $goto);
             $wtpl->setVariable("TEXT_PERMALINK", $lng->txt("blog_permanent_link"));
             $wtpl->parseCurrentBlock();
         }
         $snippet = ilBlogPostingGUI::getSnippet($item["id"]);
         if ($snippet) {
             $wtpl->setCurrentBlock("more");
             $wtpl->setVariable("URL_MORE", $preview);
             $wtpl->setVariable("TEXT_MORE", $lng->txt("blog_list_more"));
             $wtpl->parseCurrentBlock();
         }
         $wtpl->setCurrentBlock("posting");
         if (!$is_active) {
             $wtpl->setVariable("DRAFT_CLASS", " ilBlogListItemDraft");
         }
         $author = "";
         if ($this->id_type == self::REPOSITORY_NODE_ID) {
             $author_id = $item["author"];
             if ($author_id) {
                 include_once "Services/User/classes/class.ilUserUtil.php";
                 $author = ilUserUtil::getNamePresentation($author_id) . " - ";
             }
         }
         // title
         $wtpl->setVariable("URL_TITLE", $preview);
         $wtpl->setVariable("TITLE", $item["title"]);
         $wtpl->setVariable("DATETIME", $author . ilDatePresentation::formatDate($item["created"], IL_CAL_DATE));
         // content
         $wtpl->setVariable("CONTENT", $snippet);
         $wtpl->parseCurrentBlock();
     }
     // notes
     /*
     if($a_cmd == "previewFullscreen" && $this->object->getNotesStatus())
     {
     	$wtpl->setVariable("NOTES", $this->getNotesHTML());
     }		 
     */
     // permalink
     if ($a_cmd == "previewFullscreen") {
         $wtpl->setVariable("PERMALINK", $this->getPermanentLinkWidget(null, true));
     }
     return $wtpl->get();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilObjBlogGUI.php

示例6: renderEntry

 /**
  * Render main menu entry
  *
  * @param
  * @return
  */
 function renderEntry($a_tpl, $a_id, $a_txt, $a_script, $a_target = "_top")
 {
     global $lng, $ilNavigationHistory, $ilSetting, $rbacsystem, $ilCtrl;
     $id = strtolower($a_id);
     $id_up = strtoupper($a_id);
     $a_tpl->setCurrentBlock("entry_" . $id);
     include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
     // repository
     if ($a_id == "repository") {
         $gl = new ilGroupedListGUI();
         $gl->setAsDropDown(true);
         include_once "./Services/Link/classes/class.ilLink.php";
         $icon = ilUtil::img(ilObject::_getIcon(ilObject::_lookupObjId(1), "tiny"));
         $gl->addEntry($icon . " " . $a_txt . " - " . $lng->txt("rep_main_page"), ilLink::_getStaticLink(1, 'root', true), "_top");
         $items = $ilNavigationHistory->getItems();
         reset($items);
         $cnt = 0;
         $first = true;
         foreach ($items as $k => $item) {
             if ($cnt >= 10) {
                 break;
             }
             if (!isset($item["ref_id"]) || !isset($_GET["ref_id"]) || ($item["ref_id"] != $_GET["ref_id"] || !$first)) {
                 if ($cnt == 0) {
                     $gl->addGroupHeader($lng->txt("last_visited"), "ilLVNavEnt");
                 }
                 $obj_id = ilObject::_lookupObjId($item["ref_id"]);
                 $cnt++;
                 $icon = ilUtil::img(ilObject::_getIcon($obj_id, "tiny"));
                 $ititle = ilUtil::shortenText(strip_tags($item["title"]), 50, true);
                 // #11023
                 $gl->addEntry($icon . " " . $ititle, $item["link"], "_top", "", "ilLVNavEnt");
             }
             $first = false;
         }
         if ($cnt > 0) {
             $gl->addEntry("» " . $lng->txt("remove_entries"), "#", "", "return il.MainMenu.removeLastVisitedItems('" . $ilCtrl->getLinkTargetByClass("ilnavigationhistorygui", "removeEntries", "", true) . "');", "ilLVNavEnt");
         }
         $a_tpl->setVariable("REP_EN_OV", $gl->getHTML());
     }
     // desktop
     if ($a_id == "desktop") {
         $gl = new ilGroupedListGUI();
         $gl->setAsDropDown(true);
         // overview
         $gl->addEntry($lng->txt("overview"), "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSelectedItems", "_top", "", "", "mm_pd_sel_items", ilHelp::getMainMenuTooltip("mm_pd_sel_items"), "left center", "right center", false);
         // my groups and courses, if both is available
         if ($ilSetting->get('disable_my_offers') == 0 && $ilSetting->get('disable_my_memberships') == 0) {
             $gl->addEntry($lng->txt("my_courses_groups"), "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToMemberships", "_top", "", "", "mm_pd_crs_grp", ilHelp::getMainMenuTooltip("mm_pd_crs_grp"), "left center", "right center", false);
         }
         // bookmarks
         if (!$this->ilias->getSetting("disable_bookmarks")) {
             $gl->addEntry($lng->txt("bookmarks"), "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToBookmarks", "_top", "", "", "mm_pd_bookm", ilHelp::getMainMenuTooltip("mm_pd_bookm"), "left center", "right center", false);
         }
         // private notes
         if (!$this->ilias->getSetting("disable_notes")) {
             $gl->addEntry($lng->txt("notes_and_comments"), "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToNotes", "_top", "", "", "mm_pd_notes", ilHelp::getMainMenuTooltip("mm_pd_notes"), "left center", "right center", false);
         }
         // news
         if ($ilSetting->get("block_activated_news")) {
             $gl->addEntry($lng->txt("news"), "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToNews", "_top", "", "", "mm_pd_news", ilHelp::getMainMenuTooltip("mm_pd_news"), "left center", "right center", false);
         }
         // overview is always active
         $gl->addSeparator();
         $separator = false;
         if (!$ilSetting->get("disable_personal_workspace")) {
             // workspace
             $gl->addEntry($lng->txt("personal_workspace"), "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace", "_top", "", "", "mm_pd_wsp", ilHelp::getMainMenuTooltip("mm_pd_wsp"), "left center", "right center", false);
             $separator = true;
         }
         // portfolio
         if ($ilSetting->get('user_portfolios')) {
             $gl->addEntry($lng->txt("portfolio"), "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio", "_top", "", "", "mm_pd_port", ilHelp::getMainMenuTooltip("mm_pd_port"), "left center", "right center", false);
             $separator = true;
         }
         // skills
         $skmg_set = new ilSetting("skmg");
         if ($skmg_set->get("enable_skmg")) {
             $gl->addEntry($lng->txt("skills"), "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSkills", "_top", "", "", "mm_pd_skill", ilHelp::getMainMenuTooltip("mm_pd_skill"), "left center", "right center", false);
             $separator = true;
         }
         // Learning Progress
         include_once "Services/Tracking/classes/class.ilObjUserTracking.php";
         if (ilObjUserTracking::_enabledLearningProgress() && (ilObjUserTracking::_hasLearningProgressOtherUsers() || ilObjUserTracking::_hasLearningProgressLearner())) {
             //$ilTabs->addTarget("learning_progress", $this->ctrl->getLinkTargetByClass("ilLearningProgressGUI"));
             $gl->addEntry($lng->txt("learning_progress"), "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToLP", "_top", "", "", "mm_pd_lp", ilHelp::getMainMenuTooltip("mm_pd_lp"), "left center", "right center", false);
             $separator = true;
         }
         if ($separator) {
             $gl->addSeparator();
         }
         $separator = false;
         // calendar
         include_once './Services/Calendar/classes/class.ilCalendarSettings.php';
//.........这里部分代码省略.........
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:101,代码来源:class.ilMainMenuGUI.php

示例7: fillRow

 /**
  * Fill table row
  *
  * @param array $a_set data array
  */
 protected function fillRow($node)
 {
     global $ilCtrl, $lng;
     $this->tpl->setVariable("LASTNAME", $node["lastname"]);
     $this->tpl->setVariable("FIRSTNAME", $node["firstname"]);
     $this->tpl->setVariable("LOGIN", $node["login"]);
     $this->tpl->setVariable("TITLE", $node["title"]);
     if (!$this->portfolio_mode) {
         $this->tpl->setVariable("TYPE", $node["obj_type"]);
         $this->tpl->setVariable("ICON_ALT", $node["obj_type"]);
         $this->tpl->setVariable("ICON", ilObject::_getIcon("", "tiny", $node["type"]));
         $url = $this->handler->getGotoLink($node["wsp_id"], $node["obj_id"]);
     } else {
         $url = ilLink::_getStaticLink($node["obj_id"], "prtf", true);
     }
     $this->tpl->setVariable("URL_TITLE", $url);
     $this->tpl->setVariable("ACL_DATE", ilDatePresentation::formatDate(new ilDateTime($node["acl_date"], IL_CAL_UNIX)));
     asort($node["acl_type"]);
     foreach ($node["acl_type"] as $obj_id) {
         // see ilWorkspaceAccessTableGUI
         switch ($obj_id) {
             case ilWorkspaceAccessGUI::PERMISSION_REGISTERED:
                 $title = $icon_alt = $this->lng->txt("wsp_set_permission_registered");
                 $type = "registered";
                 $icon = "";
                 break;
             case ilWorkspaceAccessGUI::PERMISSION_ALL_PASSWORD:
                 $title = $icon_alt = $this->lng->txt("wsp_set_permission_all_password");
                 $type = "all_password";
                 $icon = "";
                 break;
             case ilWorkspaceAccessGUI::PERMISSION_ALL:
                 $title = $icon_alt = $this->lng->txt("wsp_set_permission_all");
                 $type = "all_password";
                 $icon = "";
                 break;
             default:
                 $type = ilObject::_lookupType($obj_id);
                 $icon = ilUtil::getTypeIconPath($type, null, "tiny");
                 $icon_alt = $this->lng->txt("obj_" . $type);
                 if ($type != "usr") {
                     $title = ilObject::_lookupTitle($obj_id);
                 } else {
                     $title = ilUserUtil::getNamePresentation($obj_id, true, true);
                 }
                 break;
         }
         if ($icon) {
             $this->tpl->setCurrentBlock("acl_type_icon_bl");
             $this->tpl->setVariable("ACL_ICON", $icon);
             $this->tpl->setVariable("ACL_ICON_ALT", $icon_alt);
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock("acl_type_bl");
         $this->tpl->setVariable("ACL_TYPE", $title);
         $this->tpl->parseCurrentBlock();
     }
     if (!$this->portfolio_mode) {
         // files may be copied to own workspace
         if ($node["type"] == "file") {
             $ilCtrl->setParameter($this->parent_obj, "wsp_id", $this->parent_node_id);
             $ilCtrl->setParameter($this->parent_obj, "item_ref_id", $node["wsp_id"]);
             $url = $ilCtrl->getLinkTarget($this->parent_obj, "copyshared");
             $this->tpl->setCurrentBlock("action_bl");
             $this->tpl->setVariable("URL_ACTION", $url);
             $this->tpl->setVariable("ACTION", $lng->txt("copy"));
             $this->tpl->parseCurrentBlock();
         }
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:75,代码来源:class.ilWorkspaceShareTableGUI.php

示例8: deliverRSS

 /**
  * Deliver blog as rss feed
  * 
  * @param int $a_wsp_id
  */
 static function deliverRSS($a_wsp_id)
 {
     global $tpl, $ilSetting;
     if (!$ilSetting->get('enable_global_profiles')) {
         return;
     }
     // #10827
     if (substr($a_wsp_id, -4) != "_cll") {
         include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
         $wsp_id = new ilWorkspaceTree(0);
         $obj_id = $wsp_id->lookupObjectId($a_wsp_id);
         $is_wsp = "_wsp";
     } else {
         $a_wsp_id = substr($a_wsp_id, 0, -4);
         $obj_id = ilObject::_lookupObjId($a_wsp_id);
         $is_wsp = null;
     }
     if (!$obj_id) {
         return;
     }
     $blog = new self($obj_id, false);
     if (!$blog->hasRSS()) {
         return;
     }
     include_once "Services/Feeds/classes/class.ilFeedWriter.php";
     $feed = new ilFeedWriter();
     include_once "Services/Link/classes/class.ilLink.php";
     $url = ilLink::_getStaticLink($a_wsp_id, "blog", true, $is_wsp);
     $url = str_replace("&", "&", $url);
     $feed->setChannelTitle($blog->getTitle());
     $feed->setChannelDescription($blog->getDescription());
     $feed->setChannelLink($url);
     // needed for blogpostinggui / pagegui
     $tpl = new ilTemplate("tpl.main.html", true, true);
     include_once "./Modules/Blog/classes/class.ilBlogPosting.php";
     include_once "./Modules/Blog/classes/class.ilBlogPostingGUI.php";
     foreach (ilBlogPosting::getAllPostings($obj_id) as $item) {
         $id = $item["id"];
         // only published items
         $is_active = ilBlogPosting::_lookupActive($id, "blp");
         if (!$is_active) {
             continue;
         }
         $snippet = strip_tags(ilBlogPostingGUI::getSnippet($id));
         $snippet = str_replace("&", "&", $snippet);
         $url = ilLink::_getStaticLink($a_wsp_id, "blog", true, "_" . $id . $is_wsp);
         $url = str_replace("&", "&", $url);
         $feed_item = new ilFeedItem();
         $feed_item->setTitle($item["title"]);
         $feed_item->setDate($item["created"]->get(IL_CAL_DATETIME));
         $feed_item->setDescription($snippet);
         $feed_item->setLink($url);
         $feed_item->setAbout($url);
         $feed->addItem($feed_item);
     }
     $feed->showFeed();
     exit;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:63,代码来源:class.ilObjBlog.php

示例9: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl;
     // owner
     if (!$this->shared) {
         $this->tpl->setCurrentBlock("title_form");
         $this->tpl->setVariable("VAL_ID", $a_set["id"]);
         $this->tpl->setVariable("VAL_TITLE", ilUtil::prepareFormOutput($a_set["title"]));
         $this->tpl->parseCurrentBlock();
         if (in_array($a_set["id"], $this->shared_objects)) {
             $this->tpl->setCurrentBlock("shared");
             $this->tpl->setVariable("TXT_SHARED", $lng->txt("wsp_status_shared"));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock("chck");
         $this->tpl->setVariable("VAL_ID", $a_set["id"]);
         $this->tpl->parseCurrentBlock();
         $this->tpl->setCurrentBlock("edit");
         $this->tpl->setVariable("VAL_ID", $a_set["id"]);
         $this->tpl->setVariable("STATUS_ONLINE", $a_set["is_online"] ? " checked=\"checked\"" : "");
         $this->tpl->setVariable("VAL_DEFAULT", $a_set["is_default"] ? $lng->txt("yes") : "");
         $this->tpl->parseCurrentBlock();
         $ilCtrl->setParameter($this->parent_obj, "prt_id", $a_set["id"]);
         $this->tpl->setCurrentBlock("action");
         $this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, "preview"));
         $this->tpl->setVariable("TXT_ACTION", $lng->txt("user_profile_preview"));
         $this->tpl->parseCurrentBlock();
         $this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, "pages"));
         $this->tpl->setVariable("TXT_ACTION", $lng->txt("prtf_edit_portfolio"));
         $this->tpl->parseCurrentBlock();
         if ($a_set["is_online"]) {
             if (!$a_set["is_default"]) {
                 $this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, "setDefaultConfirmation"));
                 $this->tpl->setVariable("TXT_ACTION", $lng->txt("prtf_set_as_default"));
                 $this->tpl->parseCurrentBlock();
             } else {
                 $this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, "unsetDefault"));
                 $this->tpl->setVariable("TXT_ACTION", $lng->txt("prtf_unset_as_default"));
                 $this->tpl->parseCurrentBlock();
             }
         }
         $ilCtrl->setParameter($this->parent_obj, "prt_id", "");
     } else {
         $this->tpl->setCurrentBlock("title_static");
         $this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
         $this->tpl->parseCurrentBlock();
         if ($a_set["password"]) {
             $this->tpl->setCurrentBlock("shared");
             $this->tpl->setVariable("TXT_SHARED", $lng->txt("wsp_password_protected_resource"));
             $this->tpl->parseCurrentBlock();
         }
         $link = ilLink::_getStaticLink($a_set["id"], "prtf", true);
         $this->tpl->setCurrentBlock("action");
         $this->tpl->setVariable("URL_ACTION", $link);
         $this->tpl->setVariable("TXT_ACTION", $lng->txt("view"));
         $this->tpl->parseCurrentBlock();
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:61,代码来源:class.ilPortfolioTableGUI.php

示例10: sendNewContentNotification

 /**
  * send notifications about new EContent
  */
 protected function sendNewContentNotification($a_server_id)
 {
     include_once 'Services/WebServices/ECS/classes/class.ilECSSetting.php';
     $settings = ilECSSetting::getInstanceByServerId($a_server_id);
     if (!count($rcps = $settings->getEContentRecipients())) {
         return;
     }
     include_once './Services/Mail/classes/class.ilMail.php';
     include_once './Services/Language/classes/class.ilLanguageFactory.php';
     $lang = ilLanguageFactory::_getLanguage();
     $lang->loadLanguageModule('ecs');
     $mail = new ilMail(self::MAIL_SENDER);
     $message = $lang->txt('ecs_' . $this->getType() . '_created_body_a') . "\n\n";
     $message .= $lang->txt('title') . ': ' . $this->getTitle() . "\n";
     if (strlen($desc = $this->getDescription())) {
         $message .= $lang->txt('desc') . ': ' . $desc . "\n";
     }
     include_once './Services/Link/classes/class.ilLink.php';
     $href = ilLink::_getStaticLink($this->getRefId(), $this->getType(), true);
     $message .= $lang->txt("perma_link") . ': ' . $href . "\n\n";
     $message .= ilMail::_getAutoGeneratedMessageString();
     $mail->sendMail($settings->getEContentRecipientsAsString(), '', '', $lang->txt('ecs_new_econtent_subject'), $message, array(), array('normal'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:26,代码来源:class.ilRemoteObjectBase.php

示例11: getExerciseInfo

 function getExerciseInfo($a_assignment_id, $a_add_submit = false)
 {
     include_once "Modules/Exercise/classes/class.ilExAssignment.php";
     $ass = new ilExAssignment($a_assignment_id);
     $exercise_id = $ass->getExerciseId();
     if (!$exercise_id) {
         return;
     }
     // is the assignment still open?
     $times_up = false;
     if ($ass->getDeadline() && $ass->getDeadline() - time() <= 0) {
         $times_up = true;
     }
     // exercise goto
     include_once "./Services/Link/classes/class.ilLink.php";
     $exc_ref_id = array_shift(ilObject::_getAllReferences($exercise_id));
     $exc_link = ilLink::_getStaticLink($exc_ref_id, "exc");
     $info = sprintf($this->lng->txt("prtf_exercise_info"), $ass->getTitle(), "<a href=\"" . $exc_link . "\">" . ilObject::_lookupTitle($exercise_id) . "</a>");
     // submit button
     if ($a_add_submit && !$times_up) {
         $this->ctrl->setParameter($this, "exc", $exercise_id);
         $this->ctrl->setParameter($this, "ass", $a_assignment_id);
         $submit_link = $this->ctrl->getLinkTarget($this, "finalize");
         $this->ctrl->setParameter($this, "ass", "");
         $this->ctrl->setParameter($this, "exc", "");
         include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
         $button = ilLinkButton::getInstance();
         $button->setCaption("prtf_finalize_portfolio");
         $button->setPrimary(true);
         $button->setUrl($submit_link);
         $info .= " " . $button->render();
     }
     // submitted files
     $submitted = ilExAssignment::getDeliveredFiles($exercise_id, $a_assignment_id, $this->user_id, true);
     if ($submitted) {
         $submitted = array_pop($submitted);
         $this->ctrl->setParameter($this, "ass", $a_assignment_id);
         $dl_link = $this->ctrl->getLinkTarget($this, "downloadExcSubFile");
         $this->ctrl->setParameter($this, "ass", "");
         $rel = ilDatePresentation::useRelativeDates();
         ilDatePresentation::setUseRelativeDates(false);
         include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
         $button = ilLinkButton::getInstance();
         $button->setCaption("download");
         $button->setUrl($dl_link);
         $info .= "<br />" . sprintf($this->lng->txt("prtf_exercise_submitted_info"), ilDatePresentation::formatDate(new ilDateTime($submitted["ts"], IL_CAL_DATETIME)), $button->render());
         ilDatePresentation::setUseRelativeDates($rel);
     }
     // work instructions incl. files
     $tooltip = "";
     $ass = $ass->getInstruction();
     if ($ass) {
         $tooltip .= nl2br($ass);
     }
     $ass_files = ilExAssignment::getFiles($exercise_id, $a_assignment_id);
     if (count($ass_files) > 0) {
         $tooltip .= "<br /><br />";
         foreach ($ass_files as $file) {
             $this->ctrl->setParameter($this, "ass", $a_assignment_id);
             $this->ctrl->setParameter($this, "file", urlencode($file["name"]));
             $dl_link = $this->ctrl->getLinkTarget($this, "downloadExcAssFile");
             $this->ctrl->setParameter($this, "file", "");
             $this->ctrl->setParameter($this, "ass", "");
             $tooltip .= $file["name"] . ": <a href=\"" . $dl_link . "\">" . $this->lng->txt("download") . "</a>";
         }
     }
     if ($tooltip) {
         $ol_id = "exc_ass_" . $a_assignment_id;
         include_once "Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
         $overlay = new ilOverlayGUI($ol_id);
         // overlay
         $overlay->setAnchor($ol_id . "_tr");
         $overlay->setTrigger($ol_id . "_tr", "click", $ol_id . "_tr");
         $overlay->setAutoHide(false);
         // $overlay->setCloseElementId($cl_id);
         $overlay->add();
         // trigger
         $overlay->addTrigger($ol_id . "_tr", "click", $ol_id . "_tr");
         $info .= "<div id=\"" . $ol_id . "_tr\"><a href=\"#\">" . $this->lng->txt("exc_instruction") . "</a></div>" . "<div id=\"" . $ol_id . "\" style=\"display:none; background-color:white; border: 1px solid #bbb; padding: 10px;\">" . $tooltip . "</div>";
     }
     return $info;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:82,代码来源:class.ilObjPortfolioGUI.php

示例12: preview

 /**
  * Show user page
  */
 function preview($a_return = false, $a_content = false, $a_show_notes = true)
 {
     global $ilSetting;
     $portfolio_id = $this->object->getId();
     $user_id = $this->object->getOwner();
     $this->tabs_gui->clearTargets();
     $pages = ilPortfolioPage::getAllPages($portfolio_id);
     $current_page = (int) $_GET["user_page"];
     // validate current page
     if ($pages && $current_page) {
         $found = false;
         foreach ($pages as $page) {
             if ($page["id"] == $current_page) {
                 $found = true;
                 break;
             }
         }
         if (!$found) {
             $current_page = null;
         }
     }
     // display first page of portfolio if none given
     if (!$current_page && $pages) {
         $current_page = $pages;
         $current_page = array_shift($current_page);
         $current_page = $current_page["id"];
     }
     // #13788 - keep page after login
     if ($this->user_id == ANONYMOUS_USER_ID && $this->getType() == "prtf") {
         $this->tpl->setLoginTargetPar("prtf_" . $this->object->getId() . "_" . $current_page);
     }
     // public profile
     if ($_REQUEST["back_url"]) {
         $back = $_REQUEST["back_url"];
     } else {
         if ($_GET["baseClass"] != "ilPublicUserProfileGUI" && $this->user_id && $this->user_id != ANONYMOUS_USER_ID) {
             if (!$this->checkPermissionBool("write")) {
                 // shared
                 if ($this->getType() == "prtf") {
                     $this->ctrl->setParameterByClass("ilportfoliorepositorygui", "shr_id", $this->object->getOwner());
                     $back = $this->ctrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui"), "showOther");
                     $this->ctrl->setParameterByClass("ilportfoliorepositorygui", "shr_id", "");
                 } else {
                     // #12819
                     global $tree;
                     $parent_id = $tree->getParentId($this->node_id);
                     include_once "Services/Link/classes/class.ilLink.php";
                     $back = ilLink::_getStaticLink($parent_id);
                 }
             } else {
                 $back = $this->ctrl->getLinkTarget($this, "view");
             }
         }
     }
     global $ilMainMenu;
     $ilMainMenu->setMode(ilMainMenuGUI::MODE_TOPBAR_ONLY);
     if ($back) {
         // might already be set in ilPublicUserProfileGUI
         $ilMainMenu->setTopBarBack($back);
     }
     // render tabs
     $current_blog = null;
     if (count($pages) > 1) {
         foreach ($pages as $p) {
             if ($p["type"] == ilPortfolioPage::TYPE_BLOG) {
                 // needed for blog comments (see below)
                 if ($p["id"] == $current_page) {
                     $current_blog = (int) $p["title"];
                 }
                 include_once "Modules/Blog/classes/class.ilObjBlog.php";
                 $p["title"] = ilObjBlog::_lookupTitle($p["title"]);
             }
             $this->ctrl->setParameter($this, "user_page", $p["id"]);
             $this->tabs_gui->addTab("user_page_" . $p["id"], $p["title"], $this->ctrl->getLinkTarget($this, "preview"));
         }
         $this->tabs_gui->activateTab("user_page_" . $current_page);
     }
     $this->ctrl->setParameter($this, "user_page", $current_page);
     if (!$a_content) {
         // get current page content
         $page_gui = $this->getPageGUIInstance($current_page);
         $page_gui->setEmbedded(true);
         $content = $this->ctrl->getHTML($page_gui);
     } else {
         $content = $a_content;
     }
     if ($a_return && $this->checkPermissionBool("write")) {
         return $content;
     }
     // blog posting comments are handled within the blog
     $notes = "";
     if ($a_show_notes && $this->object->hasPublicComments() && !$current_blog) {
         include_once "./Services/Notes/classes/class.ilNoteGUI.php";
         $note_gui = new ilNoteGUI($portfolio_id, $current_page, "pfpg");
         $note_gui->setRepositoryMode(false);
         $note_gui->enablePublicNotes(true);
         $note_gui->enablePrivateNotes(false);
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjPortfolioBaseGUI.php

示例13: getHTML

 /**
  * Get HTML for link
  */
 function getHTML()
 {
     global $lng, $ilCtrl, $ilObjDataCache;
     $tpl = new ilTemplate("tpl.permanent_link.html", true, true, "Services/PermanentLink");
     include_once './Services/Link/classes/class.ilLink.php';
     $href = ilLink::_getStaticLink($this->getId(), $this->getType(), true, $this->getAppend());
     if ($this->getIncludePermanentLinkText()) {
         $tpl->setVariable("TXT_PERMA", $lng->txt("perma_link") . ":");
     }
     $title = '';
     // fetch default title for bookmark
     if ($this->getTitle() != "") {
         $title = $this->getTitle();
     } else {
         $obj_id = $ilObjDataCache->lookupObjId($this->getId());
         $title = $ilObjDataCache->lookupTitle($obj_id);
     }
     #if (!$title)
     #	$bookmark->setTitle("untitled");
     $tpl->setVariable("TXT_BOOKMARK_DEFAULT", $title);
     $tpl->setVariable("LINK", $href);
     if ($this->getAlignCenter()) {
         $tpl->setVariable("ALIGN", "center");
     } else {
         $tpl->setVariable("ALIGN", "left");
     }
     if ($this->getTarget() != "") {
         $tpl->setVariable("TARGET", 'target="' . $this->getTarget() . '"');
     }
     // bookmark links
     $bm_html = self::_getBookmarksSelectionList($title, $href);
     if ($bm_html) {
         $tpl->setVariable('SELECTION_LIST', $bm_html);
     }
     return $tpl->get();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:39,代码来源:class.ilPermanentLinkGUI.php

示例14: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl;
     $this->tpl->setCurrentBlock("cmd");
     $this->tpl->setVariable("TXT_CMD", $lng->txt("edit"));
     $ilCtrl->setParameter($this->parent_obj, "level_id", $a_set["id"]);
     $this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, "editLevel"));
     $this->tpl->parseCurrentBlock();
     $this->tpl->setVariable("ID", $a_set["id"]);
     $this->tpl->setVariable("VAL_NR", (int) $a_set["nr"] * 10);
     $this->tpl->setVariable("TXT_TITLE", $a_set["title"]);
     $this->tpl->setVariable("TXT_DESCRIPTION", $a_set["description"]);
     /*		$this->tpl->setVariable("TXT_CERTIFICATE",
     			ilBasicSkill::_lookupCertificate($this->skill->getId(),
     			$a_set["id"])
     			? $lng->txt("yes")
     			: $lng->txt("no"));*/
     /*		$trigger = ilBasicSkill::lookupLevelTrigger((int) $a_set["id"]);
     		if (ilObject::_lookupType($trigger["obj_id"]) != "crs" ||
     			ilObject::_isInTrash($trigger["ref_id"]))
     		{
     			$trigger = array();
     		}
     
     		// trigger
     		if ($trigger["obj_id"] > 0)
     		{
     			$this->tpl->setVariable("TXT_TRIGGER",
     				ilObject::_lookupTitle($trigger["obj_id"]));
     		}*/
     if (is_array($a_set["ressources"])) {
         $this->tpl->setCurrentBlock("ressource_bl");
         foreach ($a_set["ressources"] as $rref_id) {
             $robj_id = ilObject::_lookupObjId($rref_id);
             $this->tpl->setVariable("RSRC_IMG", ilUtil::img(ilObject::_getIcon($robj_id, "tiny")));
             $this->tpl->setVariable("RSRC_TITLE", ilObject::_lookupTitle($robj_id));
             $this->tpl->setVariable("RSRC_URL", ilLink::_getStaticLink($rref_id));
             $this->tpl->parseCurrentBlock();
         }
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:44,代码来源:class.ilSkillLevelTableGUI.php

示例15: sendNotificationMail

 function sendNotificationMail($user_id, $anonymize_id)
 {
     include_once "./Services/User/classes/class.ilObjUser.php";
     include_once "./Services/Mail/classes/class.ilMail.php";
     $mail = new ilMail(ANONYMOUS_USER_ID);
     $recipients = preg_split('/,/', $this->mailaddresses);
     foreach ($recipients as $recipient) {
         $messagetext = $this->mailparticipantdata;
         $data = ilObjUser::_getUserData(array($user_id));
         foreach ($data[0] as $key => $value) {
             if ($this->getAnonymize()) {
                 $messagetext = str_replace('[' . $key . ']', '', $messagetext);
             } else {
                 $messagetext = str_replace('[' . $key . ']', $value, $messagetext);
             }
         }
         $active_id = $this->getActiveID($user_id, $anonymize_id);
         $messagetext .= (strlen($messagetext) ? "\n\n\n" : '') . $this->lng->txt('results') . "\n\n" . $this->getParticipantTextResults($active_id);
         // #11298
         include_once "./Services/Link/classes/class.ilLink.php";
         $link = ilLink::_getStaticLink($this->getRefId(), "svy");
         $messagetext .= "\n\n" . $this->lng->txt('obj_svy') . ": " . $this->getTitle() . "\n";
         $messagetext .= "\n" . $this->lng->txt('survey_notification_tutor_link') . ": " . $link;
         $mail->appendInstallationSignature(true);
         $mail->sendMail($recipient, "", "", $this->lng->txt('finished_mail_subject') . ': ' . $this->getTitle(), $messagetext, array(), array('normal'));
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:27,代码来源:class.ilObjSurvey.php


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