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


PHP ilObjStyleSheet::getEffectiveContentStyleId方法代码示例

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


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

示例1: handlePageCall

 protected function handlePageCall($a_cmd)
 {
     $this->tabs_gui->clearTargets();
     $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "view"));
     if (!$this->page_id) {
         $this->ctrl->redirect($this, "view");
     }
     $page_gui = $this->getPageGUIInstance($this->page_id);
     // needed for editor
     $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->object->getStyleSheetId(), $this->getType()));
     $ret = $this->ctrl->forwardCommand($page_gui);
     if ($ret != "" && $ret !== true) {
         // preview (fullscreen)
         if ($this->page_mode == "preview") {
             // embedded call which did not generate any output (e.g. calendar month navigation)
             if ($ret != ilPortfolioPageGUI::EMBEDDED_NO_OUTPUT) {
                 // suppress (portfolio) notes for blog postings
                 $this->preview(false, $ret, $a_cmd != "previewEmbedded");
             } else {
                 $this->preview(false);
             }
         } else {
             $this->setContentStyleSheet();
             $this->tpl->setContent($ret);
         }
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:27,代码来源:class.ilObjPortfolioBaseGUI.php

示例2: executeCommand

 public function executeCommand()
 {
     // $this->prepareOutput();
     switch ($this->ctrl->getNextClass($this)) {
         case "ilcontainerstartobjectspagegui":
             $this->checkPermission("write");
             $this->tabs_gui->clearTargets();
             $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "listStructure"));
             include_once "Services/Container/classes/class.ilContainerStartObjectsPage.php";
             if (!ilContainerStartObjectsPage::_exists("cstr", $this->object->getId())) {
                 // doesn't exist -> create new one
                 $new_page_object = new ilContainerStartObjectsPage();
                 $new_page_object->setParentId($this->object->getId());
                 $new_page_object->setId($this->object->getId());
                 $new_page_object->createFromXML();
                 unset($new_page_object);
             }
             $this->ctrl->setReturnByClass("ilcontainerstartobjectspagegui", "edit");
             include_once "Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
             $pgui = new ilContainerStartObjectsPageGUI($this->object->getId());
             // needed for editor?
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $pgui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0));
             $ret = $this->ctrl->forwardCommand($pgui);
             if ($ret) {
                 $this->tpl->setContent($ret);
             }
             break;
         default:
             $cmd = $this->ctrl->getCmd("listStructure");
             $cmd .= "Object";
             $this->{$cmd}();
             break;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilContainerStartObjectsGUI.php

示例3: getPageHTML

 /**
  * Render COPage
  * 
  * @see ilContainerGUI
  * @return string
  */
 protected function getPageHTML()
 {
     global $tpl, $ilSetting, $ilUser;
     if (!$ilSetting->get("enable_cat_page_edit")) {
         return;
     }
     $page_id = $this->start_object->getObjId();
     // if page does not exist, return nothing
     include_once "./Services/COPage/classes/class.ilPageUtil.php";
     if (!ilPageUtil::_existsAndNotEmpty("cstr", $page_id)) {
         return;
     }
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     include_once "./Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
     $page_gui = new ilContainerStartObjectsPageGUI($page_id);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0));
     $page_gui->setPresentationTitle("");
     $page_gui->setTemplateOutput(false);
     $page_gui->setHeader("");
     return $page_gui->showPage();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilContainerStartObjectsContentGUI.php

示例4: switch

 function &executeCommand()
 {
     global $ilTabs;
     $next_class = $this->ctrl->getNextClass($this);
     $this->prepareOutput();
     switch ($next_class) {
         case 'ilpermissiongui':
             include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
             $perm_gui =& new ilPermissionGUI($this);
             $ret =& $this->ctrl->forwardCommand($perm_gui);
             break;
         case 'ilimprintgui':
             // page editor will set its own tabs
             $ilTabs->clearTargets();
             $ilTabs->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, ""));
             include_once "./Services/Imprint/classes/class.ilImprintGUI.php";
             $igui = new ilImprintGUI();
             // needed for editor
             $igui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0, "impr"));
             if (!$this->checkPermissionBool("write")) {
                 $igui->setEnableEditing(false);
             }
             $ret = $this->ctrl->forwardCommand($igui);
             if ($ret != "") {
                 $this->tpl->setContent($ret);
             }
             break;
         case "ilobjectownershipmanagementgui":
             $this->setSystemCheckSubTabs("no_owner");
             include_once "Services/Object/classes/class.ilObjectOwnershipManagementGUI.php";
             $gui = new ilObjectOwnershipManagementGUI(0);
             $this->ctrl->forwardCommand($gui);
             break;
         case "ilcronmanagergui":
             $ilTabs->activateTab("cron_jobs");
             include_once "Services/Cron/classes/class.ilCronManagerGUI.php";
             $gui = new ilCronManagerGUI();
             $this->ctrl->forwardCommand($gui);
             break;
         default:
             //var_dump($_POST);
             $cmd = $this->ctrl->getCmd("view");
             $cmd .= "Object";
             $this->{$cmd}();
             break;
     }
     return true;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:48,代码来源:class.ilObjSystemFolderGUI.php

示例5: renderRecord

 /**
  * showRecord
  * a_val = 
  */
 public function renderRecord()
 {
     global $ilTabs, $tpl, $ilCtrl, $lng;
     $rctpl = new ilTemplate("tpl.record_view.html", true, true, "Modules/DataCollection");
     $ilTabs->setTabActive("id_content");
     $view_id = self::_getViewDefinitionId($this->record_obj);
     if (!$view_id) {
         $ilCtrl->redirectByClass("ildatacollectionrecordlistgui", "listRecords");
     }
     // please do not use ilPageObjectGUI directly here, use derived class
     // ilDataCollectionRecordViewViewdefinitionGUI
     //$pageObj = new ilPageObjectGUI("dclf", $view_id);
     // see ilObjDataCollectionGUI->executeCommand about instantiation
     include_once "./Modules/DataCollection/classes/class.ilDataCollectionRecordViewViewdefinitionGUI.php";
     $pageObj = new ilDataCollectionRecordViewViewdefinitionGUI($this->record_obj->getTableId(), $view_id);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $pageObj->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0, "dcl"));
     $html = $pageObj->getHTML();
     $rctpl->addCss("./Services/COPage/css/content.css");
     $rctpl->fillCssFiles();
     $table = ilDataCollectionCache::getTableCache($this->record_obj->getTableId());
     foreach ($table->getFields() as $field) {
         //ILIAS_Ref_Links
         $pattern = '/\\[dcliln field="' . preg_quote($field->getTitle(), "/") . '"\\](.*?)\\[\\/dcliln\\]/';
         if (preg_match($pattern, $html)) {
             $html = preg_replace($pattern, $this->record_obj->getRecordFieldSingleHTML($field->getId(), $this->setOptions("\$1")), $html);
         }
         //DataCollection Ref Links
         $pattern = '/\\[dclrefln field="' . preg_quote($field->getTitle(), "/") . '"\\](.*?)\\[\\/dclrefln\\]/';
         if (preg_match($pattern, $html)) {
             $this->currentField = $field;
             $html = preg_replace_callback($pattern, array($this, "doReplace"), $html);
         }
         $pattern = '/\\[ext tableOf="' . preg_quote($field->getTitle(), "/") . '" field="(.*?)"\\]/';
         if (preg_match($pattern, $html)) {
             $this->currentField = $field;
             $html = preg_replace_callback($pattern, array($this, "doExtReplace"), $html);
         }
         $html = str_ireplace("[" . $field->getTitle() . "]", $this->record_obj->getRecordFieldHTML($field->getId()), $html);
     }
     $rctpl->setVariable("CONTENT", $html);
     //Permanent Link
     include_once "./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php";
     $perma_link = new ilPermanentLinkGUI("dcl", $_GET["ref_id"], "_" . $_GET['record_id']);
     $rctpl->setVariable("PERMA_LINK", $perma_link->getHTML());
     $tpl->setContent($rctpl->get());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:51,代码来源:class.ilDataCollectionRecordViewGUI.php

示例6: switch

 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilCtrl, $tpl;
     $next_class = $ilCtrl->getNextClass($this);
     $cmd = $ilCtrl->getCmd();
     switch ($next_class) {
         case "ilscorm2004pagegui":
             $tpl->getStandardTemplate();
             $this->setContentStyle();
             $this->setLocator();
             // Determine whether the view of a learning resource should
             // be shown in the frameset of ilias, or in a separate window.
             //$showViewInFrameset = $this->ilias->ini->readVariable("layout","view_target") == "frame";
             $showViewInFrameset = true;
             $ilCtrl->setReturn($this, "edit");
             include_once "./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php";
             $page_gui =& new ilSCORM2004PageGUI($this->slm_object->getType(), $this->node_object->getId(), 0, $this->getParentGUI()->object->getId(), $this->slm_object->getAssignedGlossary());
             $page_gui->setEditPreview(true);
             $page_gui->setPresentationTitle($this->node_object->getTitle());
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->slm_object->getStyleSheetId(), "sahs"));
             if ($this->node_object->tree->getParentId($this->node_object->getId()) > 0) {
                 $sco = new ilSCORM2004Sco($this->node_object->getSLMObject(), $this->node_object->tree->getParentId($this->node_object->getId()));
                 if (count($sco->getGlossaryTermIds()) > 1) {
                     include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ScoGUI.php";
                     $page_gui->setGlossaryOverviewInfo(ilSCORM2004ScoGUI::getGlossaryOverviewId(), $sco);
                 }
             }
             $ilCtrl->setParameterByClass("ilobjscorm2004learningmodulegui", "active_node", $_GET["obj_id"]);
             $page_gui->setExplorerUpdater("tree", "tree_div", $ilCtrl->getLinkTargetByClass("ilobjscorm2004learningmodulegui", "showTree", "", true));
             $ilCtrl->setParameterByClass("ilobjscorm2004learningmodulegui", "active_node", "");
             // set page view link
             $view_frame = ilFrameTargetInfo::_getFrame("MainContent");
             $page_gui->setLinkParams("ref_id=" . $this->slm_object->getRefId());
             $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg_b.png"));
             $page_gui->activateMetaDataEditor($this->slm_object->getID(), $this->node_object->getId(), $this->node_object->getType(), $this->node_object, 'MDUpdateListener');
             $ret = $ilCtrl->forwardCommand($page_gui);
             $this->setTabs();
             $tpl->setContent($ret);
             break;
         default:
             $ret =& $this->{$cmd}();
             break;
     }
     return $ret;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:49,代码来源:class.ilSCORM2004PageNodeGUI.php

示例7: renderRecord

 /**
  * @param bool $editComments
  */
 public function renderRecord($editComments = false)
 {
     global $ilTabs, $tpl, $ilCtrl, $lng;
     $rctpl = new ilTemplate("tpl.record_view.html", false, true, "Modules/DataCollection");
     $ilTabs->setTabActive("id_content");
     $view_id = self::_getViewDefinitionId($this->record_obj);
     if (!$view_id) {
         $ilCtrl->redirectByClass("ildatacollectionrecordlistgui", "listRecords");
     }
     // see ilObjDataCollectionGUI->executeCommand about instantiation
     include_once "./Modules/DataCollection/classes/class.ilDataCollectionRecordViewViewdefinitionGUI.php";
     $pageObj = new ilDataCollectionRecordViewViewdefinitionGUI($this->record_obj->getTableId(), $view_id);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $pageObj->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0, "dcl"));
     $html = $pageObj->getHTML();
     $rctpl->addCss("./Services/COPage/css/content.css");
     $rctpl->fillCssFiles();
     $table = ilDataCollectionCache::getTableCache($this->record_obj->getTableId());
     foreach ($table->getRecordFields() as $field) {
         //ILIAS_Ref_Links
         $pattern = '/\\[dcliln field="' . preg_quote($field->getTitle(), "/") . '"\\](.*?)\\[\\/dcliln\\]/';
         if (preg_match($pattern, $html)) {
             $html = preg_replace($pattern, $this->record_obj->getRecordFieldSingleHTML($field->getId(), $this->setOptions("\$1")), $html);
         }
         //DataCollection Ref Links
         $pattern = '/\\[dclrefln field="' . preg_quote($field->getTitle(), "/") . '"\\](.*?)\\[\\/dclrefln\\]/';
         if (preg_match($pattern, $html)) {
             $this->currentField = $field;
             $html = preg_replace_callback($pattern, array($this, "doReplace"), $html);
         }
         $pattern = '/\\[ext tableOf="' . preg_quote($field->getTitle(), "/") . '" field="(.*?)"\\]/';
         if (preg_match($pattern, $html)) {
             $this->currentField = $field;
             $html = preg_replace_callback($pattern, array($this, "doExtReplace"), $html);
         }
         $html = str_ireplace("[" . $field->getTitle() . "]", $this->record_obj->getRecordFieldSingleHTML($field->getId()), $html);
     }
     foreach ($table->getStandardFields() as $field) {
         $html = str_ireplace("[" . $field->getId() . "]", $this->record_obj->getRecordFieldSingleHTML($field->getId()), $html);
     }
     $rctpl->setVariable("CONTENT", $html);
     //Permanent Link
     $perma_link = new ilPermanentLinkGUI("dcl", $_GET["ref_id"], "_" . $_GET['record_id']);
     $tpl->setVariable('PRMLINK', $perma_link->getHTML());
     // Buttons for previous/next records
     if ($this->is_enabled_paging) {
         $prevNextLinks = $this->renderPrevNextLinks();
         $rctpl->setVariable('PREV_NEXT_RECORD_LINKS', $prevNextLinks);
         $ilCtrl->clearParameters($this);
         // #14083
         $rctpl->setVariable('FORM_ACTION', $ilCtrl->getFormAction($this));
         $rctpl->setVariable('RECORD', $lng->txt('dcl_record'));
         $rctpl->setVariable('RECORD_FROM_TOTAL', sprintf($lng->txt('dcl_record_from_total'), $this->current_record_position, count($this->record_ids)));
         $rctpl->setVariable('SELECT_OPTIONS', $this->renderSelectOptions());
     }
     // Edit Button
     if ($this->record_obj->hasPermissionToEdit((int) $_GET['ref_id'])) {
         $button = ilLinkButton::getInstance();
         $ilCtrl->setParameterByClass('ildatacollectionrecordeditgui', 'table_id', $this->table->getId());
         $ilCtrl->setParameterByClass('ildatacollectionrecordeditgui', 'redirect', ilDataCollectionRecordEditGUI::REDIRECT_DETAIL);
         $ilCtrl->saveParameterByClass('ildatacollectionrecordeditgui', 'record_id');
         $button->setUrl($ilCtrl->getLinkTargetByClass('ildatacollectionrecordeditgui', 'edit'));
         $button->setCaption($lng->txt('dcl_edit_record'), false);
         $rctpl->setVariable('EDIT_RECORD_BUTTON', $button->render());
     }
     // Comments
     if ($this->table->getPublicCommentsEnabled()) {
         $rctpl->setVariable('COMMENTS', $this->renderComments($editComments));
     }
     $tpl->setContent($rctpl->get());
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:74,代码来源:class.ilDataCollectionRecordViewGUI.php

示例8: executeCommand

 function executeCommand()
 {
     global $ilCtrl, $tpl, $ilTabs, $lng, $ilNavigationHistory;
     // goto link to blog posting
     if ($_GET["gtp"]) {
         $ilCtrl->setCmdClass("ilblogpostinggui");
         $_GET["blpg"] = $_GET["gtp"];
         $ilCtrl->setCmd("previewFullscreen");
     }
     $next_class = $ilCtrl->getNextClass($this);
     $cmd = $ilCtrl->getCmd();
     if ($this->id_type == self::REPOSITORY_NODE_ID) {
         $tpl->getStandardTemplate();
         // add entry to navigation history
         if (!$this->getCreationMode() && $this->getAccessHandler()->checkAccess("read", "", $this->node_id)) {
             $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset");
             $ilNavigationHistory->addItem($this->node_id, $link, "blog");
         }
     }
     switch ($next_class) {
         case 'ilblogpostinggui':
             // #9680
             if ($this->id_type == self::REPOSITORY_NODE_ID) {
                 $this->setLocator();
             } else {
                 include_once "Services/Form/classes/class.ilFileInputGUI.php";
                 ilFileInputGUI::setPersonalWorkspaceQuotaCheck(true);
             }
             $ilTabs->setBackTarget($lng->txt("back"), $ilCtrl->getLinkTarget($this, ""));
             include_once "./Modules/Blog/classes/class.ilBlogPostingGUI.php";
             $bpost_gui = new ilBlogPostingGUI($this->node_id, $this->getAccessHandler(), $_GET["blpg"], $_GET["old_nr"], $this->object->getNotesStatus() && !$this->disable_notes, $this->mayContribute($_GET["blpg"]));
             // needed for editor
             $bpost_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->object->getStyleSheetId(), "blog"));
             // keep preview mode through notes gui (has its own commands)
             switch ($cmd) {
                 // blog preview
                 case "previewFullscreen":
                     $ilCtrl->setParameter($this, "prvm", "fsc");
                     break;
                     // blog in portfolio
                 // blog in portfolio
                 case "previewEmbedded":
                     $ilCtrl->setParameter($this, "prvm", "emb");
                     break;
                     // edit
                 // edit
                 default:
                     $this->setContentStyleSheet();
                     $this->ctrl->setParameterByClass("ilblogpostinggui", "blpg", $_GET["blpg"]);
                     $this->tabs_gui->addNonTabbedLink("preview", $lng->txt("blog_preview"), $this->ctrl->getLinkTargetByClass("ilblogpostinggui", "previewFullscreen"));
                     $this->ctrl->setParameterByClass("ilblogpostinggui", "blpg", "");
                     break;
             }
             $ret = $ilCtrl->forwardCommand($bpost_gui);
             if ($ret != "") {
                 // keep preview mode through notes gui
                 if ($_REQUEST["prvm"]) {
                     $cmd = "preview" . ($_REQUEST["prvm"] == "fsc" ? "Fullscreen" : "Embedded");
                 }
                 // $is_owner = $this->object->getOwner() == $ilUser->getId();
                 $is_owner = $this->mayContribute();
                 $is_active = $bpost_gui->getBlogPosting()->getActive();
                 // do not show inactive postings
                 if (($cmd == "previewFullscreen" || $cmd == "previewEmbedded") && !$is_owner && !$is_active) {
                     $this->ctrl->redirect($this, "preview");
                 }
                 switch ($cmd) {
                     // blog preview
                     case "previewFullscreen":
                         $this->addHeaderAction($cmd);
                         $this->filterInactivePostings();
                         $nav = $this->renderNavigation($this->items, "preview", $cmd);
                         $this->renderFullScreen($ret, $nav);
                         break;
                         // blog in portfolio
                     // blog in portfolio
                     case "previewEmbedded":
                         $this->filterInactivePostings();
                         $nav = $this->renderNavigation($this->items, "gethtml", $cmd);
                         return $this->buildEmbedded($ret, $nav);
                         // ilias/editor
                     // ilias/editor
                     default:
                         // infos about draft status / snippet
                         $info = array();
                         if (!$is_active) {
                             // single author blog (owner) in personal workspace
                             if ($this->id_type == self::WORKSPACE_NODE_ID) {
                                 $info[] = $lng->txt("blog_draft_info");
                             } else {
                                 $info[] = $lng->txt("blog_draft_info_contributors");
                             }
                         }
                         if ($cmd != "history" && !$bpost_gui->getBlogPosting()->getFirstParagraphText()) {
                             $info[] = $lng->txt("blog_new_posting_info");
                         }
                         if ($this->object->hasApproval() && !$bpost_gui->getBlogPosting()->isApproved()) {
                             // #9737
                             $info[] = $lng->txt("blog_posting_edit_approval_info");
                         }
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilObjBlogGUI.php

示例9: executeCommand

 public function executeCommand()
 {
     global $ilCtrl, $ilTabs, $ilNavigationHistory, $ilUser, $tpl;
     // Navigation History
     $link = $ilCtrl->getLinkTarget($this, "render");
     if ($this->object != NULL) {
         $ilNavigationHistory->addItem($this->object->getRefId(), $link, "dcl");
     }
     //Direct-Link Resource
     if ($_GET["dcl_gtr"]) {
         $ilCtrl->setCmdClass("ildatacollectionrecordviewgui");
         $_GET['record_id'] = $_GET["dcl_gtr"];
         $ilCtrl->setCmd("renderRecord");
     }
     $next_class = $ilCtrl->getNextClass($this);
     $cmd = $ilCtrl->getCmd();
     if (!$this->getCreationMode() && $next_class != "ilinfoscreengui" && !$this->checkPermissionBool("read")) {
         $tpl->getStandardTemplate();
         $tpl->setContent("Permission Denied.");
         return;
     }
     switch ($next_class) {
         case "ilinfoscreengui":
             $this->prepareOutput();
             $ilTabs->activateTab("id_info");
             $this->infoScreenForward();
             break;
         case "ilcommonactiondispatchergui":
             include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
             $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
             $this->ctrl->forwardCommand($gui);
             break;
         case "ilpermissiongui":
             $this->prepareOutput();
             $ilTabs->activateTab("id_permissions");
             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("dcl");
             $tpl->getStandardTemplate();
             $this->ctrl->forwardCommand($cp);
             break;
         case "ildatacollectionfieldlistgui":
             $this->prepareOutput();
             $this->addListFieldsTabs("list_fields");
             $ilTabs->setTabActive("id_fields");
             include_once "./Modules/DataCollection/classes/class.ilDataCollectionFieldListGUI.php";
             $fieldlist_gui = new ilDataCollectionFieldListGUI($this, $this->table_id);
             $this->ctrl->forwardCommand($fieldlist_gui);
             break;
         case "ildatacollectiontableeditgui":
             $this->prepareOutput();
             $ilTabs->setTabActive("id_fields");
             include_once "./Modules/DataCollection/classes/class.ilDataCollectionTableEditGUI.php";
             $tableedit_gui = new ilDataCollectionTableEditGUI($this);
             $this->ctrl->forwardCommand($tableedit_gui);
             break;
         case "ildatacollectionfieldeditgui":
             $this->prepareOutput();
             $ilTabs->activateTab("id_fields");
             include_once "./Modules/DataCollection/classes/class.ilDataCollectionFieldEditGUI.php";
             $fieldedit_gui = new ilDataCollectionFieldEditGUI($this, $this->table_id, $_REQUEST["field_id"]);
             $this->ctrl->forwardCommand($fieldedit_gui);
             break;
         case "ildatacollectionrecordlistgui":
             $this->addHeaderAction(false);
             $this->prepareOutput();
             $ilTabs->activateTab("id_records");
             include_once "./Modules/DataCollection/classes/class.ilDataCollectionRecordListGUI.php";
             $recordlist_gui = new ilDataCollectionRecordListGUI($this, $this->table_id);
             $this->ctrl->forwardCommand($recordlist_gui);
             break;
         case "ildatacollectionrecordeditgui":
             $this->prepareOutput();
             $ilTabs->activateTab("id_records");
             include_once "./Modules/DataCollection/classes/class.ilDataCollectionRecordEditGUI.php";
             $recordedit_gui = new ilDataCollectionRecordEditGUI($this);
             $this->ctrl->forwardCommand($recordedit_gui);
             break;
         case "ildatacollectionrecordviewviewdefinitiongui":
             $this->prepareOutput();
             // page editor will set its own tabs
             $ilTabs->clearTargets();
             $ilTabs->setBackTarget($this->lng->txt("back"), $ilCtrl->getLinkTargetByClass("ildatacollectionfieldlistgui", "listFields"));
             include_once "./Modules/DataCollection/classes/class.ilDataCollectionRecordViewViewdefinitionGUI.php";
             $recordedit_gui = new ilDataCollectionRecordViewViewdefinitionGUI($this->table_id);
             // needed for editor
             $recordedit_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0, "dcl"));
             if (!$this->checkPermissionBool("write")) {
                 $recordedit_gui->setEnableEditing(false);
             }
             $ret = $this->ctrl->forwardCommand($recordedit_gui);
             if ($ret != "") {
                 $this->tpl->setContent($ret);
             }
             $ilTabs->removeTab('history');
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilObjDataCollectionGUI.php

示例10: renderObjective


//.........这里部分代码省略.........
     $is_manage = $this->getContainerGUI()->isActiveAdministrationPanel();
     $is_order = $this->getContainerGUI()->isActiveOrdering();
     $sort_content = array();
     foreach ($items as $item) {
         if ($this->getDetailsLevel($a_objective_id) < self::DETAILS_ALL) {
             continue;
         }
         $item_list_gui2 = $this->getItemGUI($item);
         $item_list_gui2->enableIcon(true);
         if ($is_order || $a_accordion) {
             $item_list_gui2->enableCommands(true, true);
             $item_list_gui2->enableProperties(false);
         }
         $chapters = $objectives_lm_obj->getChapters();
         if (count($chapters)) {
             $has_sections = false;
             foreach ($chapters as $chapter) {
                 if ($chapter['ref_id'] != $item['child']) {
                     continue;
                 }
                 $has_sections = true;
                 include_once './Modules/LearningModule/classes/class.ilLMObject.php';
                 $title = $item['title'] . " &rsaquo; " . ilLMObject::_lookupTitle($chapter['obj_id']) . " (" . $lng->txt('obj_' . $chapter['type']) . ")";
                 $item_list_gui2->setDefaultCommandParameters(array("obj_id" => $chapter['obj_id'], "focus_id" => $chapter['obj_id'], "focus_return" => $this->container_obj->getRefId()));
                 if ($is_order) {
                     $item_list_gui2->setPositionInputField("[lobj][" . $a_objective_id . "][" . $chapter['lm_ass_id'] . "]", sprintf('%d', $chapter['position'] * 10));
                 }
                 $sub_item_html = $item_list_gui2->getListItemHTML($item['ref_id'], $item['obj_id'], $title, $item['description']);
                 // #13381 - use materials order
                 $sort_key = str_pad($chapter['position'], 5, 0, STR_PAD_LEFT) . "_" . strtolower($title) . "_" . $chapter['lm_ass_id'];
                 $sort_content[$sort_key] = $sub_item_html;
             }
         }
         $this->rendered_items[$item['child']] = true;
         if ($lm_ass_id = $objectives_lm_obj->isAssigned($item['ref_id'], true)) {
             if ($is_order) {
                 $item_list_gui2->setPositionInputField("[lobj][" . $a_objective_id . "][" . $lm_ass_id . "]", sprintf('%d', $sort_map[$lm_ass_id] * 10));
             }
             $sub_item_html = $item_list_gui2->getListItemHTML($item['ref_id'], $item['obj_id'], $item['title'], $item['description']);
             // #13381 - use materials order
             $sort_key = str_pad($sort_map[$lm_ass_id], 5, 0, STR_PAD_LEFT) . "_" . strtolower($item['title']) . "_" . $lm_ass_id;
             $sort_content[$sort_key] = $sub_item_html;
         }
     }
     if ($this->getDetailsLevel($a_objective_id) == self::DETAILS_ALL) {
         $this->objective_list_gui->enableCommands(false);
     } else {
         $this->objective_list_gui->enableCommands(true);
     }
     if ($is_order) {
         $this->objective_list_gui->setPositionInputField("[lobj][" . $a_objective_id . "][0]", $objective->__getPosition() * 10);
     }
     ksort($sort_content);
     if (!$a_accordion) {
         foreach ($sort_content as $sub_item_html) {
             $this->objective_list_gui->addSubItemHTML($sub_item_html);
         }
         return $this->objective_list_gui->getListItemHTML(0, $a_objective_id, $objective->getTitle(), $objective->getDescription(), $is_manage || $is_order);
     } else {
         $acc_content = $sort_content;
         $initial_shown = false;
         if ($this->getSettings()->hasSeparateInitialTests() and !$a_lo_result['initial_status']) {
             $acc_content[] = $this->renderTest($this->getTestAssignments()->getTestByObjective($a_objective_id, ilLOSettings::TYPE_TEST_INITIAL), $a_objective_id, true, false, $a_lo_result);
             $initial_shown = TRUE;
         } elseif ($this->getSettings()->hasSeparateQualifiedTests()) {
             $acc_content[] = $this->renderTest($this->getTestAssignments()->getTestByObjective($a_objective_id, ilLOSettings::TYPE_TEST_QUALIFIED), $a_objective_id, false, false, $a_lo_result);
         }
         /*
         if($this->loc_settings->getInitialTest() &&
         	$this->loc_settings->getType() == ilLOSettings::LOC_INITIAL_SEL &&
         	!$a_lo_result["initial_status"])
         {
         	$acc_content[] = $this->renderTest($this->loc_settings->getInitialTest(), $a_objective_id, true, false, $a_lo_result);
         	$initial_shown = true;
         }	
         if(!$initial_shown &&
         	$this->loc_settings->getQualifiedTest() && 
         	$this->loc_settings->isQualifiedTestPerObjectiveVisible())
         {
         	$acc_content[] = $this->renderTest($this->loc_settings->getQualifiedTest(), $a_objective_id, false, false, $a_lo_result);
         }
         */
         $co_page = null;
         include_once "./Services/COPage/classes/class.ilPageUtil.php";
         if (ilPageUtil::_existsAndNotEmpty("lobj", $objective->getObjectiveId())) {
             $a_has_lo_page = true;
             include_once 'Modules/Course/classes/Objectives/class.ilLOPageGUI.php';
             $page_gui = new ilLOPageGUI($objective->getObjectiveId());
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0));
             $page_gui->setPresentationTitle("");
             $page_gui->setTemplateOutput(false);
             $page_gui->setHeader("");
             $co_page = "<div class='ilContObjectiveIntro'>" . $page_gui->showPage() . "</div>";
         }
         // patch optes start
         $a_accordion->addItem($this->buildAccordionTitle($objective, $a_lo_result), $co_page . $this->buildAccordionContent($acc_content), isset($_GET["oobj"]) && (int) $_GET["oobj"] == $objective->getObjectiveId());
         // patch optes end
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilContainerObjectiveGUI.php

示例11: showPrintView

 /**
  * show print view
  */
 function showPrintView()
 {
     global $ilUser, $lng, $ilCtrl;
     include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
     if (!$this->lm->isActivePrintView()) {
         return;
     }
     $this->renderPageTitle();
     $c_obj_id = $this->getCurrentPageId();
     // set values according to selection
     if ($_POST["sel_type"] == "page") {
         if (!is_array($_POST["obj_id"]) || !in_array($c_obj_id, $_POST["obj_id"])) {
             $_POST["obj_id"][] = $c_obj_id;
         }
     }
     if ($_POST["sel_type"] == "chapter" && $c_obj_id > 0) {
         $path = $this->lm_tree->getPathFull($c_obj_id);
         $chap_id = $path[1]["child"];
         if ($chap_id > 0) {
             $_POST["obj_id"][] = $chap_id;
         }
     }
     //var_dump($_GET);
     //var_dump($_POST);
     // set style sheets
     if (!$this->offlineMode()) {
         $this->tpl->setVariable("LOCATION_STYLESHEET", ilObjStyleSheet::getContentPrintStyle());
     } else {
         $style_name = $ilUser->getPref("style") . ".css";
         $this->tpl->setVariable("LOCATION_STYLESHEET", "./style/" . $style_name);
     }
     // content style
     $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();
     // 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->addBlockFile("CONTENT", "content", "tpl.lm_print_view.html", true);
     // set title header
     $this->tpl->setVariable("HEADER", $this->lm->getTitle());
     $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
     include_once "./Modules/LearningModule/classes/class.ilLMPageGUI.php";
     include_once "./Modules/LearningModule/classes/class.ilLMPageObject.php";
     include_once "./Modules/LearningModule/classes/class.ilStructureObject.php";
     $act_level = 99999;
     $activated = false;
     $glossary_links = array();
     $output_header = false;
     $media_links = array();
     // get header and footer
     if ($this->lm->getFooterPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
         if (ilLMObject::_exists($this->lm->getFooterPage())) {
             $page_object_gui = $this->getLMPageGUI($this->lm->getFooterPage());
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $page_object_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->lm->getStyleSheetId(), "lm"));
             // determine target frames for internal links
             $page_object_gui->setLinkFrame($_GET["frame"]);
             $page_object_gui->setOutputMode("print");
             $page_object_gui->setPresentationTitle("");
             $page_object_gui->setFileDownloadLink("#");
             $page_object_gui->setFullscreenLink("#");
             $page_object_gui->setSourceCodeDownloadScript("#");
             $footer_page_content = $page_object_gui->showPage();
         }
     }
     if ($this->lm->getHeaderPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
         if (ilLMObject::_exists($this->lm->getHeaderPage())) {
             $page_object_gui = $this->getLMPageGUI($this->lm->getHeaderPage());
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $page_object_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->lm->getStyleSheetId(), "lm"));
             // determine target frames for internal links
             $page_object_gui->setLinkFrame($_GET["frame"]);
             $page_object_gui->setOutputMode("print");
             $page_object_gui->setPresentationTitle("");
             $page_object_gui->setFileDownloadLink("#");
             $page_object_gui->setFullscreenLink("#");
             $page_object_gui->setSourceCodeDownloadScript("#");
             $header_page_content = $page_object_gui->showPage();
         }
     }
     // add free selected pages
     if (is_array($_POST["obj_id"])) {
         foreach ($_POST["obj_id"] as $k) {
             if ($k > 0 && !$this->lm_tree->isInTree($k)) {
                 if (ilLMObject::_lookupType($k) == "pg") {
                     $nodes[] = array("obj_id" => $k, "type" => "pg", "free" => true);
                 }
             }
         }
     } else {
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilLMPresentationGUI.php

示例12: switch

 /**
  * execute command
  */
 function &executeCommand()
 {
     global $tpl, $ilCtrl, $ilTabs, $ilSetting;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     //echo "<br>:cmd:".$this->ctrl->getCmd().":cmdClass:".$this->ctrl->getCmdClass().":".
     //	":nextClass:".$next_class.":"; flush();
     switch ($next_class) {
         case "illmpagegui":
             // Determine whether the view of a learning resource should
             // be shown in the frameset of ilias, or in a separate window.
             //$showViewInFrameset = $this->ilias->ini->readVariable("layout","view_target") == "frame";
             $showViewInFrameset = true;
             $lm_set = new ilSetting("lm");
             $this->ctrl->setReturn($this, "edit");
             if (!ilPageObject::_exists("lm", $this->obj->getId(), $_GET["transl"]) && ilPageObject::_exists("lm", $this->obj->getId(), "-")) {
                 if ($_GET["totransl"] == "") {
                     $_GET["totransl"] = $_GET["transl"];
                     $ilCtrl->setCmd("switchToLanguage");
                 }
                 $ilCtrl->setCmdClass("illmpagegui");
                 $page_gui = new ilLMPageGUI($this->obj->getId(), 0, false, "-");
             } else {
                 $page_gui = new ilLMPageGUI($this->obj->getId());
             }
             $page_gui->setEditPreview(true);
             $page_gui->activateMetaDataEditor($this->content_object->getID(), $this->obj->getId(), $this->obj->getType(), $this->obj, "MDUpdateListener");
             if ($ilSetting->get("block_activated_news")) {
                 $page_gui->setEnabledNews(true, $this->obj->content_object->getId(), $this->obj->content_object->getType());
             }
             // set page view link
             if ($showViewInFrameset) {
                 $view_frame = ilFrameTargetInfo::_getFrame("MainContent");
             } else {
                 $view_frame = "ilContObj" . $this->content_object->getID();
             }
             $page_gui->setViewPageLink(ILIAS_HTTP_PATH . "/goto.php?target=pg_" . $this->obj->getId() . "_" . $_GET["ref_id"], $view_frame);
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->content_object->getStyleSheetId(), "lm"));
             $page_gui->setTemplateTargetVar("ADM_CONTENT");
             $page_gui->getPageObject()->buildDom();
             $int_links = $page_gui->getPageObject()->getInternalLinks();
             $link_xml = $this->getLinkXML($int_links);
             $page_gui->setLinkXML($link_xml);
             $page_gui->enableChangeComments($this->content_object->isActiveHistoryUserComments());
             $page_gui->setFileDownloadLink("ilias.php?cmd=downloadFile&ref_id=" . $_GET["ref_id"] . "&baseClass=ilLMPresentationGUI");
             $page_gui->setFullscreenLink("ilias.php?cmd=fullscreen&ref_id=" . $_GET["ref_id"] . "&baseClass=ilLMPresentationGUI");
             $page_gui->setLinkParams("ref_id=" . $this->content_object->getRefId());
             $page_gui->setSourcecodeDownloadScript("ilias.php?ref_id=" . $_GET["ref_id"] . "&baseClass=ilLMPresentationGUI");
             $page_gui->setPresentationTitle(ilLMPageObject::_getPresentationTitle($this->obj->getId(), $this->content_object->getPageHeader(), $this->content_object->isActiveNumbering()));
             $page_gui->setLocator($contObjLocator);
             $page_gui->setHeader($this->lng->txt("page") . ": " . $this->obj->getTitle());
             $page_gui->setActivationListener($this, "activatePage");
             $up_gui = $this->content_object->getType() == "dbk" ? "ilobjdlbookgui" : "ilobjlearningmodulegui";
             $ilCtrl->setParameterByClass($up_gui, "active_node", $this->obj->getId());
             $page_gui->setExplorerUpdater("tree", "tree_div", $ilCtrl->getLinkTargetByClass($up_gui, "explorer", "", true));
             $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg_b.png"));
             $tpl->setTitle($this->lng->txt("page") . ": " . $this->obj->getTitle());
             if ($this->content_object->getLayoutPerPage()) {
                 $page_gui->setTabHook($this, "addPageTabs");
             }
             $ret = $this->ctrl->forwardCommand($page_gui);
             $tpl->setContent($ret);
             break;
         default:
             $ret =& $this->{$cmd}();
             break;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:72,代码来源:class.ilLMPageObjectGUI.php

示例13: getContainerPageHTML

 /**
  * Get container page HTML
  */
 function getContainerPageHTML()
 {
     global $ilSetting, $ilUser;
     if (!$ilSetting->get("enable_cat_page_edit")) {
         return;
     }
     // old page editor content
     $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(), "xhtml_page");
     if ($xpage_id > 0) {
         include_once "Services/XHTMLPage/classes/class.ilXHTMLPage.php";
         $xpage = new ilXHTMLPage($xpage_id);
         return $xpage->getContent();
     }
     // page object
     // if page does not exist, return nothing
     include_once "./Services/COPage/classes/class.ilPageUtil.php";
     if (!ilPageUtil::_existsAndNotEmpty("cont", $this->object->getId())) {
         return "";
     }
     include_once "./Services/Container/classes/class.ilContainerPage.php";
     include_once "./Services/Container/classes/class.ilContainerPageGUI.php";
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
     $this->tpl->setCurrentBlock("SyntaxStyle");
     $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $this->tpl->parseCurrentBlock();
     // get page object
     include_once "./Services/Object/classes/class.ilObjectTranslation.php";
     $ot = ilObjectTranslation::getInstance($this->object->getId());
     $lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
     $page_gui = new ilContainerPageGUI($this->object->getId(), 0, $lang);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->object->getStyleSheetId(), $this->object->getType()));
     $page_gui->setPresentationTitle("");
     $page_gui->setTemplateOutput(false);
     $page_gui->setHeader("");
     $ret = $page_gui->showPage();
     //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
     //$ret =& $page_gui->executeCommand();
     return $ret;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:44,代码来源:class.ilContainerGUI.php

示例14: prepareHTMLExporter

 /**
  * Prepare HTML exporter
  *
  * @param
  * @return
  */
 function prepareHTMLExporter($a_target_dir)
 {
     // system style html exporter
     include_once "./Services/Style/classes/class.ilSystemStyleHTMLExport.php";
     $this->sys_style_html_export = new ilSystemStyleHTMLExport($a_target_dir);
     $this->sys_style_html_export->export();
     // init co page html exporter
     include_once "./Services/COPage/classes/class.ilCOPageHTMLExport.php";
     $this->co_page_html_export = new ilCOPageHTMLExport($a_target_dir);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $this->co_page_html_export->setContentStyleId(ilObjStyleSheet::getEffectiveContentStyleId($this->getStyleSheetId()));
     $this->co_page_html_export->createDirectories();
     $this->co_page_html_export->exportStyles();
     $this->co_page_html_export->exportSupportScripts();
     include_once "./Services/MediaObjects/classes/class.ilPlayerUtil.php";
     $this->flv_dir = $a_target_dir . "/" . ilPlayerUtil::getFlashVideoPlayerDirectory();
     ilUtil::makeDir($a_target_dir . '/css/yahoo');
     ilUtil::makeDir($a_target_dir . '/objects');
     ilUtil::makeDir($a_target_dir . '/players');
     ilUtil::makeDir($this->flv_dir);
     include_once "./Services/MediaObjects/classes/class.ilPlayerUtil.php";
     //		copy(ilPlayerUtil::getFlashVideoPlayerFilename(true),
     //			$a_target_dir.'/js/'.ilPlayerUtil::getFlashVideoPlayerFilename());
     ilPlayerUtil::copyPlayerFilesToTargetDirectory($this->flv_dir);
     copy('./Modules/Scorm2004/scripts/scorm_2004.js', $a_target_dir . '/js/scorm.js');
     copy('./Modules/Scorm2004/scripts/pager.js', $a_target_dir . '/js/pager.js');
     copy('./Modules/Scorm2004/scripts/questions/pure.js', $a_target_dir . '/js/pure.js');
     copy('./Modules/Scorm2004/scripts/questions/question_handling.js', $a_target_dir . '/js/question_handling.js');
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilObjSCORM2004LearningModule.php

示例15: executeCommand

 /**
  * Execute command
  * @return <type> 
  */
 public function executeCommand()
 {
     global $ilCtrl;
     $next_class = $ilCtrl->getNextClass($this);
     $cmd = $ilCtrl->getCmd();
     $this->setTabs();
     switch ($next_class) {
         case 'ilcourseobjectivesgui':
             $this->ctrl->setReturn($this, 'listObjectives');
             $GLOBALS['ilTabs']->clearTargets();
             $GLOBALS['ilTabs']->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'listObjectives'));
             include_once './Modules/Course/classes/class.ilCourseObjectivesGUI.php';
             $reg_gui =& new ilCourseObjectivesGUI($this->getParentObject()->getRefId());
             $this->ctrl->forwardCommand($reg_gui);
             break;
         case 'ilcontainerstartobjectsgui':
             include_once './Services/Container/classes/class.ilContainerStartObjectsGUI.php';
             $stgui = new ilContainerStartObjectsGUI($this->getParentObject());
             $ret = $this->ctrl->forwardCommand($stgui);
             $GLOBALS['ilTabs']->activateSubTab('start');
             $GLOBALS['ilTabs']->removeSubTab('manage');
             #$GLOBALS['tpl']->setContent($this->ctrl->getHTML($stgui));
             break;
         case 'ilconditionhandlergui':
             $this->ctrl->saveParameterByClass('ilconditionhandlergui', 'objective_id');
             $GLOBALS['ilTabs']->clearTargets();
             $GLOBALS['ilTabs']->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'listObjectives'));
             include_once './Services/AccessControl/classes/class.ilConditionHandlerInterface.php';
             $cond = new ilConditionHandlerGUI($this);
             $cond->setBackButtons(array());
             $cond->setAutomaticValidation(false);
             $cond->setTargetType("lobj");
             $cond->setTargetRefId($this->getParentObject()->getRefId());
             $cond->setTargetId((int) $_REQUEST['objective_id']);
             // objecitve
             include_once './Modules/Course/classes/class.ilCourseObjective.php';
             $obj = new ilCourseObjective($this->getParentObject(), (int) $_REQUEST['objective_id']);
             $cond->setTargetTitle($obj->getTitle());
             $this->ctrl->forwardCommand($cond);
             break;
         case 'illopagegui':
             $this->ctrl->saveParameterByClass('illopagegui', 'objective_id');
             $GLOBALS['ilTabs']->clearTargets();
             $GLOBALS['ilTabs']->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'listObjectives'));
             $objtv_id = (int) $_REQUEST['objective_id'];
             include_once 'Modules/Course/classes/Objectives/class.ilLOPage.php';
             if (!ilLOPage::_exists('lobj', $objtv_id)) {
                 // doesn't exist -> create new one
                 $new_page_object = new ilLOPage();
                 $new_page_object->setParentId($objtv_id);
                 $new_page_object->setId($objtv_id);
                 $new_page_object->createFromXML();
                 unset($new_page_object);
             }
             $this->ctrl->setReturn($this, 'listObjectives');
             include_once 'Modules/Course/classes/Objectives/class.ilLOPageGUI.php';
             $pgui = new ilLOPageGUI($objtv_id);
             $pgui->setPresentationTitle(ilCourseObjective::lookupObjectiveTitle($objtv_id));
             // needed for editor?
             include_once './Services/Style/classes/class.ilObjStyleSheet.php';
             $pgui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0));
             // #14895
             $GLOBALS['tpl']->setCurrentBlock("ContentStyle");
             $GLOBALS['tpl']->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
             $GLOBALS['tpl']->parseCurrentBlock();
             $ret = $this->ctrl->forwardCommand($pgui);
             if ($ret) {
                 $GLOBALS['tpl']->setContent($ret);
             }
             break;
         default:
             if (!$cmd) {
                 // get first unaccomplished step
                 include_once './Modules/Course/classes/Objectives/class.ilLOEditorStatus.php';
                 $cmd = ilLOEditorStatus::getInstance($this->getParentObject())->getFirstFailedStep();
             }
             $this->{$cmd}();
             break;
     }
     return true;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:85,代码来源:class.ilLOEditorGUI.php


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