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


PHP ilLMObject::_lookupTitle方法代码示例

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


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

示例1: getHTML

 /**
  * get html 
  * @return
  */
 public function getHTML()
 {
     global $lng, $ilUser;
     include_once 'Modules/LearningModule/classes/class.ilLMObject.php';
     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('SEPERATOR', ':');
         switch (ilLMObject::_lookupType($sub_item, $this->getObjId())) {
             case 'pg':
                 $this->getItemListGUI()->setChildId($sub_item);
                 $this->tpl->setVariable("SUBITEM_TYPE", $lng->txt('obj_pg'));
                 $link = $this->getItemListGUI()->getCommandLink('page');
                 include_once './Services/Search/classes/class.ilUserSearchCache.php';
                 $link .= '&srcstring=1';
                 $this->tpl->setVariable('LINK', $link);
                 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame('page'));
                 $this->tpl->setVariable('TITLE', ilLMObject::_lookupTitle($sub_item));
                 break;
             case 'st':
                 $this->getItemListGUI()->setChildId($sub_item);
                 $this->tpl->setVariable("SUBITEM_TYPE", $lng->txt('obj_st'));
                 $link = $this->getItemListGUI()->getCommandLink('page');
                 include_once './Services/Search/classes/class.ilUserSearchCache.php';
                 $link .= '&srcstring=1';
                 $this->tpl->setVariable('LINK', $link);
                 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame('page'));
                 $this->tpl->setVariable('TITLE', ilLMObject::_lookupTitle($sub_item));
                 break;
             default:
                 if (ilObject::_lookupType($sub_item) != 'file') {
                     return '';
                 }
                 $this->getItemListGUI()->setChildId('il__file_' . $sub_item);
                 $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('obj_file'));
                 $link = $this->getItemListGUI()->getCommandLink('downloadFile');
                 $this->tpl->setVariable('LINK', $link);
                 $this->tpl->setVariable('TITLE', ilObject::_lookupTitle($sub_item));
                 break;
         }
         if (count($this->getSubItemIds(true)) > 1) {
             $this->parseRelevance($sub_item);
         }
         $this->tpl->parseCurrentBlock();
     }
     $this->showDetailsLink();
     return $this->tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:56,代码来源:class.ilObjLearningModuleSubItemListGUI.php

示例2: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $ilCtrl, $lng;
     $this->tpl->setVariable("PAGE_TITLE", ilLMObject::_lookupTitle($a_set["page_id"]));
     $this->tpl->setVariable("QUESTION", assQuestion::_getQuestionText($a_set["question_id"]));
     include_once "./Services/COPage/classes/class.ilPageQuestionProcessor.php";
     $stats = ilPageQuestionProcessor::getQuestionStatistics($a_set["question_id"]);
     $this->tpl->setVariable("VAL_ANSWERED", (int) $stats["all"]);
     if ($stats["all"] == 0) {
         $this->tpl->setVariable("VAL_CORRECT_FIRST", 0);
         $this->tpl->setVariable("VAL_CORRECT_SECOND", 0);
         $this->tpl->setVariable("VAL_CORRECT_THIRD_OR_MORE", 0);
         $this->tpl->setVariable("VAL_NEVER", 0);
     } else {
         $this->tpl->setVariable("VAL_CORRECT_FIRST", $stats["first"] . " (" . 100 / $stats["all"] * $stats["first"] . " %)");
         $this->tpl->setVariable("VAL_CORRECT_SECOND", $stats["second"] . " (" . 100 / $stats["all"] * $stats["second"] . " %)");
         $this->tpl->setVariable("VAL_CORRECT_THIRD_AND_MORE", $stats["third_or_more"] . " (" . 100 / $stats["all"] * $stats["third_or_more"] . " %)");
         $nev = $stats["all"] - $stats["first"] - $stats["second"] - $stats["third_or_more"];
         $this->tpl->setVariable("VAL_NEVER", $nev . " (" . 100 / $stats["all"] * $nev . " %)");
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:24,代码来源:class.ilLMQuestionListTableGUI.php

示例3: showPreconditionsOfPage

 /**
  * show preconditions of the page
  */
 function showPreconditionsOfPage()
 {
     $conds = ilObjContentObject::_getMissingPreconditionsOfPage($this->lm->getRefId(), $this->lm->getId(), $this->getCurrentPageId());
     $topchap = ilObjContentObject::_getMissingPreconditionsTopChapter($this->lm->getRefId(), $this->lm->getId(), $this->getCurrentPageId());
     $page_id = $this->getCurrentPageId();
     // 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();
     $this->tpl->addBlockFile("PAGE_CONTENT", "pg_content", "tpl.page_preconditions.html", true);
     // list all missing preconditions
     include_once "./Services/Repository/classes/class.ilRepositoryExplorer.php";
     foreach ($conds as $cond) {
         $obj_link = ilRepositoryExplorer::buildLinkTarget($cond["trigger_ref_id"], $cond["trigger_type"]);
         $obj_frame = ilRepositoryExplorer::buildFrameTarget($cond["trigger_type"], $cond["trigger_ref_id"], $cond["trigger_obj_id"]);
         $this->tpl->setCurrentBlock("condition");
         $this->tpl->setVariable("ROWCOL", $rc = $rc != "tblrow2" ? "tblrow2" : "tblrow1");
         $this->tpl->setVariable("VAL_ITEM", ilObject::_lookupTitle($cond["trigger_obj_id"]));
         $this->tpl->setVariable("LINK_ITEM", $obj_link);
         $this->tpl->setVariable("FRAME_ITEM", $obj_frame);
         if ($cond["operator"] == "passed") {
             $cond_str = $this->lng->txt("passed");
         } else {
             $cond_str = $cond["operator"];
         }
         $this->tpl->setVariable("VAL_CONDITION", $cond_str . " " . $cond["value"]);
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setCurrentBlock("pg_content");
     $this->tpl->setVariable("TXT_MISSING_PRECONDITIONS", sprintf($this->lng->txt("cont_missing_preconditions"), ilLMObject::_lookupTitle($topchap)));
     $this->tpl->setVariable("TXT_ITEM", $this->lng->txt("item"));
     $this->tpl->setVariable("TXT_CONDITION", $this->lng->txt("condition"));
     // output skip chapter link
     $parent = $this->lm_tree->getParentId($topchap);
     $childs = $this->lm_tree->getChildsByType($parent, "st");
     $next = "";
     $j = -2;
     $i = 1;
     foreach ($childs as $child) {
         if ($child["child"] == $topchap) {
             $j = $i;
         }
         if ($i++ == $j + 1) {
             $succ_node = $this->lm_tree->fetchSuccessorNode($child["child"], "pg");
         }
     }
     if ($succ_node != "") {
         $framestr = !empty($_GET["frame"]) ? "frame=" . $_GET["frame"] . "&" : "";
         $showViewInFrameset = true;
         $link = "<br /><a href=\"" . $this->getLink($this->lm->getRefId(), "layout", $succ_node["obj_id"], $_GET["frame"]) . "\">" . $this->lng->txt("cont_skip_chapter") . "</a>";
         $this->tpl->setVariable("LINK_SKIP_CHAPTER", $link);
     }
     $this->tpl->parseCurrentBlock();
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:61,代码来源:class.ilLMPresentationGUI.php

示例4: fillRow

 /**
  * fill row
  *
  * @access protected
  * @param array row data
  * @return
  */
 protected function fillRow($a_set)
 {
     $this->tpl->setVariable('VAL_ID', $a_set['id']);
     $this->tpl->setVariable('VAL_POSITION', $a_set['position']);
     // begin-patch lok
     if ($a_set['online']) {
         $this->tpl->setVariable('VAL_ONOFFLINE', $this->lng->txt('online'));
         $this->tpl->setVariable('ONOFFLINE_CLASS', 'smallgreen');
     } else {
         $this->tpl->setVariable('VAL_ONOFFLINE', $this->lng->txt('offline'));
         $this->tpl->setVariable('ONOFFLINE_CLASS', 'smallred');
     }
     if ($a_set['passes']) {
         $this->tpl->setVariable('PASSES_TXT', $this->lng->txt('crs_loc_passes_info'));
         $this->tpl->setVariable('PASSES_VAL', $a_set['passes']);
     }
     // begin-patch lok
     $this->ctrl->setParameterByClass('ilcourseobjectivesgui', 'objective_id', $a_set['id']);
     $this->tpl->setVariable('VAL_TITLE_LINKED', $this->ctrl->getLinkTargetByClass('ilcourseobjectivesgui', 'edit'));
     // end-patch lok
     $this->tpl->setVariable('VAL_TITLE', $a_set['title']);
     if (strlen($a_set['description'])) {
         $this->tpl->setVariable('VAL_DESC', $a_set['description']);
     }
     // materials
     foreach ($a_set['materials'] as $ref_id => $data) {
         if ($data['items']) {
             $this->tpl->touchBlock('ul_begin');
             foreach ($data['items'] as $pg_st) {
                 $this->tpl->setCurrentBlock('st_pg');
                 $this->tpl->setVariable('MAT_IMG', ilObject::_getIcon($pg_st['obj_id'], "tiny", $pg_st['type']));
                 $this->tpl->setVariable('MAT_ALT', $this->lng->txt('obj_' . $pg_st['type']));
                 include_once 'Modules/LearningModule/classes/class.ilLMObject.php';
                 $title = ilLMObject::_lookupTitle($pg_st['obj_id']);
                 $this->tpl->setVariable('MAT_TITLE', $title);
                 $this->tpl->parseCurrentBlock();
             }
             $this->tpl->touchBlock('ul_end');
         } else {
             $this->tpl->touchBlock('new_line');
         }
         $this->tpl->setCurrentBlock('mat_row');
         $this->tpl->setVariable('LM_IMG', ilObject::_getIcon($data['obj_id'], "tiny", $data['type']));
         $this->tpl->setVariable('LM_ALT', $this->lng->txt('obj_' . $data['type']));
         if ($data['type'] == 'catr' or $data['type'] == 'crsr') {
             include_once './Services/ContainerReference/classes/class.ilContainerReference.php';
             $this->tpl->setVariable('LM_TITLE', ilContainerReference::_lookupTargetTitle($data['obj_id']));
         } else {
             $this->tpl->setVariable('LM_TITLE', ilObject::_lookupTitle($data['obj_id']));
         }
         $this->tpl->parseCurrentBlock();
     }
     // self assessment
     // begin-patch lok
     if ($this->getSettings()->worksWithInitialTest()) {
         foreach ($a_set['self'] as $test) {
             // begin-patch lok
             foreach ((array) $test['questions'] as $question) {
                 $this->tpl->setCurrentBlock('self_qst_row');
                 $this->tpl->setVariable('SELF_QST_TITLE', $question['title']);
                 $this->tpl->parseCurrentBlock();
             }
             #$this->tpl->setCurrentBlock('self_test_row');
             #$this->tpl->setVariable('SELF_TST_ALT',$this->lng->txt('obj_tst'));
             #$this->tpl->setVariable('SELF_TST_TITLE',ilObject::_lookupTitle($test['obj_id']));
             #$this->tpl->parseCurrentBlock();
             // end-patch lok
         }
         // begin-patch lok
         if (!count($a_set['self'])) {
             $this->tpl->touchBlock('self_qst_row');
         }
         // end-patch lok
     }
     // end-patch lok
     // final test questions
     foreach ((array) $a_set['final'] as $test) {
         foreach ((array) $test['questions'] as $question) {
             $this->tpl->setCurrentBlock('final_qst_row');
             $this->tpl->setVariable('FINAL_QST_TITLE', $question['title']);
             $this->tpl->parseCurrentBlock();
         }
         // begin-patch lok
         #$this->tpl->setCurrentBlock('final_test_row');
         #$this->tpl->setVariable('FINAL_TST_ALT',$this->lng->txt('obj_tst'));
         #$this->tpl->setVariable('FINAL_TST_TITLE',ilObject::_lookupTitle($test['obj_id']));
         #$this->tpl->parseCurrentBlock();
         // end-patch lok
     }
     // begin-patch lok
     // Edit Link
     #$this->ctrl->setParameterByClass(get_class($this->getParentObject()),'objective_id',$a_set['id']);
     $this->ctrl->setParameterByClass('ilcourseobjectivesgui', 'objective_id', $a_set['id']);
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilCourseObjectivesTableGUI.php

示例5: fillRow

 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl, $ilAccess;
     $usage = $a_set;
     if (is_int(strpos($usage["type"], ":"))) {
         $us_arr = explode(":", $usage["type"]);
         $usage["type"] = $us_arr[1];
         $cont_type = $us_arr[0];
     }
     include_once './Services/Link/classes/class.ilLink.php';
     switch ($usage["type"]) {
         case "pg":
             $item = array();
             //$this->tpl->setVariable("TXT_OBJECT", $usage["type"].":".$usage["id"]);
             switch ($cont_type) {
                 case "sahs":
                     require_once "./Modules/Scorm2004/classes/class.ilSCORM2004Page.php";
                     $page_obj = new ilSCORM2004Page($usage["id"]);
                     require_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
                     require_once "./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php";
                     $lm_obj = new ilObjSAHSLearningModule($page_obj->getParentId(), false);
                     $item["obj_type_txt"] = $this->lng->txt("obj_" . $cont_type);
                     $item["obj_title"] = $lm_obj->getTitle();
                     $item["sub_txt"] = $this->lng->txt("pg");
                     $item["sub_title"] = ilSCORM2004PageNode::_lookupTitle($page_obj->getId());
                     $ref_id = $this->getFirstWritableRefId($lm_obj->getId());
                     if ($ref_id > 0) {
                         $item["obj_link"] = ilLink::_getStaticLink($ref_id, "sahs");
                     }
                     break;
                 case "lm":
                     require_once "./Modules/LearningModule/classes/class.ilLMPage.php";
                     $page_obj = new ilLMPage($usage["id"]);
                     require_once "./Modules/LearningModule/classes/class.ilObjContentObject.php";
                     require_once "./Modules/LearningModule/classes/class.ilObjLearningModule.php";
                     require_once "./Modules/LearningModule/classes/class.ilLMObject.php";
                     $lm_obj =& new ilObjLearningModule($page_obj->getParentId(), false);
                     $item["obj_type_txt"] = $this->lng->txt("obj_" . $cont_type);
                     $item["obj_title"] = $lm_obj->getTitle();
                     $item["sub_txt"] = $this->lng->txt("pg");
                     $item["sub_title"] = ilLMObject::_lookupTitle($page_obj->getId());
                     $ref_id = $this->getFirstWritableRefId($lm_obj->getId());
                     if ($ref_id > 0) {
                         $item["obj_link"] = ilLink::_getStaticLink($ref_id, "lm");
                     }
                     break;
                 case "wpg":
                     require_once "./Modules/Wiki/classes/class.ilWikiPage.php";
                     $page_obj = new ilWikiPage($usage["id"]);
                     $item["obj_type_txt"] = $this->lng->txt("obj_wiki");
                     $item["obj_title"] = ilObject::_lookupTitle($page_obj->getParentId());
                     $item["sub_txt"] = $this->lng->txt("pg");
                     $item["sub_title"] = ilWikiPage::lookupTitle($page_obj->getId());
                     $ref_id = $this->getFirstWritableRefId($page_obj->getParentId());
                     if ($ref_id > 0) {
                         $item["obj_link"] = ilLink::_getStaticLink($ref_id, "wiki");
                     }
                     break;
                 case "gdf":
                     require_once "./Modules/Glossary/classes/class.ilGlossaryDefPage.php";
                     $page_obj = new ilGlossaryDefPage($usage["id"]);
                     require_once "./Modules/Glossary/classes/class.ilGlossaryTerm.php";
                     require_once "./Modules/Glossary/classes/class.ilGlossaryDefinition.php";
                     $term_id = ilGlossaryDefinition::_lookupTermId($page_obj->getId());
                     $glo_id = ilGlossaryTerm::_lookGlossaryId($term_id);
                     $item["obj_type_txt"] = $this->lng->txt("obj_glo");
                     $item["obj_title"] = ilObject::_lookupTitle($glo_id);
                     $item["sub_txt"] = $this->lng->txt("cont_term");
                     $item["sub_title"] = ilGlossaryTerm::_lookGlossaryTerm($term_id);
                     $ref_id = $this->getFirstWritableRefId($page_obj->getParentId());
                     if ($ref_id > 0) {
                         $item["obj_link"] = ilLink::_getStaticLink($ref_id, "glo");
                     }
                     break;
                 case "fold":
                 case "root":
                 case "crs":
                 case "grp":
                 case "cat":
                 case "cont":
                     $item["obj_type_txt"] = $this->lng->txt("obj_" . $cont_type);
                     $item["obj_title"] = ilObject::_lookupTitle($usage["id"]);
                     $ref_id = $this->getFirstWritableRefId($usage["id"]);
                     if ($ref_id > 0) {
                         $item["obj_link"] = ilLink::_getStaticLink($ref_id, $cont_type);
                     }
                     break;
                 default:
                     $item["obj_title"] = "Page " . $cont_type . ", " . $usage["id"];
                     break;
             }
             break;
         case "mep":
             $item["obj_type_txt"] = $this->lng->txt("obj_mep");
             $item["obj_title"] = ilObject::_lookupTitle($usage["id"]);
             $ref_id = $this->getFirstWritableRefId($usage["id"]);
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilTermUsagesTableGUI.php

示例6: fillRow

 /**
  * fill row
  *
  * @access protected
  * @param array row data
  * @return
  */
 protected function fillRow($a_set)
 {
     $this->tpl->setVariable('VAL_ID', $a_set['id']);
     $this->tpl->setVariable('VAL_POSITION', $a_set['position']);
     $this->tpl->setVariable('VAL_TITLE', $a_set['title']);
     if (strlen($a_set['description'])) {
         $this->tpl->setVariable('VAL_DESC', $a_set['description']);
     }
     // materials
     foreach ($a_set['materials'] as $ref_id => $data) {
         if ($data['items']) {
             $this->tpl->touchBlock('ul_begin');
             foreach ($data['items'] as $pg_st) {
                 $this->tpl->setCurrentBlock('st_pg');
                 $this->tpl->setVariable('MAT_IMG', ilUtil::getImagePath('icon_' . $pg_st['type'] . '_s.png'));
                 $this->tpl->setVariable('MAT_ALT', $this->lng->txt('obj_' . $pg_st['type']));
                 include_once 'Modules/LearningModule/classes/class.ilLMObject.php';
                 $title = ilLMObject::_lookupTitle($pg_st['obj_id']);
                 $this->tpl->setVariable('MAT_TITLE', $title);
                 $this->tpl->parseCurrentBlock();
             }
             $this->tpl->touchBlock('ul_end');
         } else {
             $this->tpl->touchBlock('new_line');
         }
         $this->tpl->setCurrentBlock('mat_row');
         $this->tpl->setVariable('LM_IMG', ilUtil::getImagePath('icon_' . $data['type'] . '_s.png'));
         $this->tpl->setVariable('LM_ALT', $this->lng->txt('obj_' . $data['type']));
         $this->tpl->setVariable('LM_TITLE', ilObject::_lookupTitle($data['obj_id']));
         $this->tpl->parseCurrentBlock();
     }
     // self assessment
     foreach ($a_set['self'] as $test) {
         foreach ($test['questions'] as $question) {
             $this->tpl->setCurrentBlock('self_qst_row');
             $this->tpl->setVariable('SELF_QST_TITLE', $question['title']);
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock('self_test_row');
         $this->tpl->setVariable('SELF_TST_IMG', ilUtil::getImagePath('icon_tst_s.png'));
         $this->tpl->setVariable('SELF_TST_ALT', $this->lng->txt('obj_tst'));
         $this->tpl->setVariable('SELF_TST_TITLE', ilObject::_lookupTitle($test['obj_id']));
         $this->tpl->parseCurrentBlock();
     }
     // final test questions
     foreach ($a_set['final'] as $test) {
         foreach ($test['questions'] as $question) {
             $this->tpl->setCurrentBlock('final_qst_row');
             $this->tpl->setVariable('FINAL_QST_TITLE', $question['title']);
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock('final_test_row');
         $this->tpl->setVariable('FINAL_TST_IMG', ilUtil::getImagePath('icon_tst_s.png'));
         $this->tpl->setVariable('FINAL_TST_ALT', $this->lng->txt('obj_tst'));
         $this->tpl->setVariable('FINAL_TST_TITLE', ilObject::_lookupTitle($test['obj_id']));
         $this->tpl->parseCurrentBlock();
     }
     // Edit Link
     $this->ctrl->setParameterByClass(get_class($this->getParentObject()), 'objective_id', $a_set['id']);
     $this->tpl->setVariable('EDIT_LINK', $this->ctrl->getLinkTargetByClass(get_class($this->getParentObject()), 'edit'));
     $this->tpl->setVariable('TXT_EDIT', $this->lng->txt('edit'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:69,代码来源:class.ilCourseObjectivesTableGUI.php

示例7: fillRow

 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl, $ilAccess;
     $usage = $a_set;
     //var_dump($usage);
     if (is_int(strpos($usage["type"], ":"))) {
         $us_arr = explode(":", $usage["type"]);
         $usage["type"] = $us_arr[1];
         $cont_type = $us_arr[0];
     }
     //var_dump($usage);
     include_once './Services/Link/classes/class.ilLink.php';
     switch ($usage["type"]) {
         case "pg":
             include_once "./Services/COPage/classes/class.ilPageObjectFactory.php";
             $page_obj = ilPageObjectFactory::getInstance($cont_type, $usage["id"]);
             $item = array();
             //$this->tpl->setVariable("TXT_OBJECT", $usage["type"].":".$usage["id"]);
             switch ($cont_type) {
                 case "lm":
                     require_once "./Modules/LearningModule/classes/class.ilObjContentObject.php";
                     require_once "./Modules/LearningModule/classes/class.ilObjLearningModule.php";
                     require_once "./Modules/LearningModule/classes/class.ilLMObject.php";
                     $lm_obj = new ilObjLearningModule($page_obj->getParentId(), false);
                     $item["obj_type_txt"] = $this->lng->txt("obj_" . $cont_type);
                     $item["obj_title"] = $lm_obj->getTitle();
                     $item["sub_txt"] = $this->lng->txt("pg");
                     $item["sub_title"] = ilLMObject::_lookupTitle($page_obj->getId());
                     $ref_id = $this->getFirstWritableRefId($lm_obj->getId());
                     if ($ref_id > 0) {
                         $item["obj_link"] = ilLink::_getStaticLink($page_obj->getId() . "_" . $ref_id, "pg");
                     }
                     break;
                 case "wpg":
                     require_once "./Modules/Wiki/classes/class.ilWikiPage.php";
                     $item["obj_type_txt"] = $this->lng->txt("obj_wiki");
                     $item["obj_title"] = ilObject::_lookupTitle($page_obj->getParentId());
                     $item["sub_txt"] = $this->lng->txt("pg");
                     $item["sub_title"] = ilWikiPage::lookupTitle($page_obj->getId());
                     $ref_id = $this->getFirstWritableRefId($page_obj->getParentId());
                     if ($ref_id > 0) {
                         $item["obj_link"] = ilLink::_getStaticLink($ref_id, "wiki");
                     }
                     break;
                 case "gdf":
                     require_once "./Modules/Glossary/classes/class.ilGlossaryTerm.php";
                     require_once "./Modules/Glossary/classes/class.ilGlossaryDefinition.php";
                     $term_id = ilGlossaryDefinition::_lookupTermId($page_obj->getId());
                     $glo_id = ilGlossaryTerm::_lookGlossaryId($term_id);
                     $item["obj_type_txt"] = $this->lng->txt("obj_glo");
                     $item["obj_title"] = ilObject::_lookupTitle($glo_id);
                     $item["sub_txt"] = $this->lng->txt("cont_term");
                     $item["sub_title"] = ilGlossaryTerm::_lookGlossaryTerm($term_id);
                     $ref_id = $this->getFirstWritableRefId($page_obj->getParentId());
                     if ($ref_id > 0) {
                         $item["obj_link"] = ilLink::_getStaticLink($ref_id, "glo");
                     }
                     break;
                 case "cont":
                     $item["obj_type_txt"] = $this->lng->txt("obj_" . $cont_type);
                     $item["obj_title"] = ilObject::_lookupTitle($page_obj->getId());
                     $ref_id = $this->getFirstWritableRefId($page_obj->getId());
                     if ($ref_id > 0) {
                         $item["obj_link"] = ilLink::_getStaticLink($ref_id, $cont_type);
                     }
                     break;
             }
             break;
         case "mep":
             $item["obj_type_txt"] = $this->lng->txt("obj_mep");
             $item["obj_title"] = ilObject::_lookupTitle($usage["id"]);
             $ref_id = $this->getFirstWritableRefId($usage["id"]);
             if ($ref_id > 0) {
                 $item["obj_link"] = ilLink::_getStaticLink($ref_id, "mep");
             }
             break;
         case "map":
             $item["obj_type_txt"] = $this->lng->txt("obj_mob");
             $item["obj_title"] = ilObject::_lookupTitle($usage["id"]);
             $item["sub_txt"] = $this->lng->txt("cont_link_area");
             break;
     }
     // show versions
     if (is_array($usage["hist_nr"]) && (count($usage["hist_nr"]) > 1 || $usage["hist_nr"][0] > 0)) {
         asort($usage["hist_nr"]);
         $ver = $sep = "";
         if ($usage["hist_nr"][0] == 0) {
             array_shift($usage["hist_nr"]);
             $usage["hist_nr"][] = 0;
         }
         if (count($usage["hist_nr"]) > 5) {
             $ver .= "..., ";
             $cnt = count($usage["hist_nr"]) - 5;
             for ($i = 0; $i < $cnt; $i++) {
                 unset($usage["hist_nr"][$i]);
             }
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilMediaPoolPageUsagesTableGUI.php

示例8: _getPresentationTitle

 /**
  * presentation title doesn't have to be page title, it may be
  * chapter title + page title or chapter title only, depending on settings
  *
  * @param	string	$a_mode		IL_CHAPTER_TITLE | IL_PAGE_TITLE | IL_NO_HEADER
  */
 static function _getPresentationTitle($a_pg_id, $a_mode = IL_CHAPTER_TITLE, $a_include_numbers = false, $a_time_scheduled_activation = false, $a_force_content = false, $a_lm_id = 0, $a_lang = "-")
 {
     if ($a_mode == IL_NO_HEADER && !$a_force_content) {
         return "";
     }
     if ($a_lm_id == 0) {
         $a_lm_id = ilLMObject::_lookupContObjID($a_pg_id);
     }
     if ($a_lm_id == 0) {
         return "";
     }
     // this is optimized when ilLMObject::preloadDataByLM is invoked (e.g. done in ilLMExplorerGUI)
     $title = ilLMObject::_lookupTitle($a_pg_id);
     // this is also optimized since ilObjectTranslation re-uses instances for one lm
     include_once "./Services/Object/classes/class.ilObjectTranslation.php";
     $ot = ilObjectTranslation::getInstance($a_lm_id);
     $languages = $ot->getLanguages();
     if ($a_lang != "-" && $ot->getContentActivated() && isset($languages[$a_lang])) {
         include_once "./Modules/LearningModule/classes/class.ilLMObjTranslation.php";
         $lmobjtrans = new ilLMObjTranslation($a_pg_id, $a_lang);
         if ($lmobjtrans->getTitle() != "") {
             $title = $lmobjtrans->getTitle();
         }
     }
     if ($a_mode == IL_PAGE_TITLE) {
         return $title;
     }
     include_once "./Modules/LearningModule/classes/class.ilLMTree.php";
     $tree = ilLMTree::getInstance($a_lm_id);
     if ($tree->isInTree($a_pg_id)) {
         $pred_node = $tree->fetchPredecessorNode($a_pg_id, "st");
         $childs = $tree->getChildsByType($pred_node["obj_id"], "pg");
         $cnt_str = "";
         if (count($childs) > 1) {
             $cnt = 0;
             foreach ($childs as $child) {
                 include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
                 $active = ilLMPage::_lookupActive($child["obj_id"], ilObject::_lookupType($a_lm_id), $a_time_scheduled_activation);
                 if (!$active) {
                     $act_data = ilLMPage::_lookupActivationData((int) $child["obj_id"], ilObject::_lookupType($a_lm_id));
                     if ($act_data["show_activation_info"] && ilUtil::now() < $act_data["activation_start"]) {
                         $active = true;
                     }
                 }
                 if ($child["type"] != "pg" || $active) {
                     $cnt++;
                 }
                 if ($child["obj_id"] == $a_pg_id) {
                     $cur_cnt = $cnt;
                 }
             }
             if ($cnt > 1) {
                 $cnt_str = " (" . $cur_cnt . "/" . $cnt . ")";
             }
         }
         require_once "./Modules/LearningModule/classes/class.ilStructureObject.php";
         //$struct_obj =& new ilStructureObject($pred_node["obj_id"]);
         //return $struct_obj->getTitle();
         return ilStructureObject::_getPresentationTitle($pred_node["obj_id"], $a_include_numbers, false, 0, $a_lang) . $cnt_str;
         //return $pred_node["title"].$cnt_str;
     } else {
         return $title;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:70,代码来源:class.ilLMPageObject.php

示例9: fillRow

 /**
  * fill row
  *
  * @access protected
  * @param array row data
  * @return
  */
 protected function fillRow($a_set)
 {
     $GLOBALS['ilLog']->write(__METHOD__ . ': ' . print_r($a_set, TRUE));
     $this->tpl->setVariable('VAL_ID', $a_set['id']);
     $this->tpl->setVariable('VAL_POSITION', $a_set['position']);
     // begin-patch lok
     if ($a_set['online']) {
         $this->tpl->setVariable('VAL_ONOFFLINE', $this->lng->txt('online'));
         $this->tpl->setVariable('ONOFFLINE_CLASS', 'smallgreen');
     } else {
         $this->tpl->setVariable('VAL_ONOFFLINE', $this->lng->txt('offline'));
         $this->tpl->setVariable('ONOFFLINE_CLASS', 'smallred');
     }
     if ($a_set['passes']) {
         $this->tpl->setVariable('PASSES_TXT', $this->lng->txt('crs_loc_passes_info'));
         $this->tpl->setVariable('PASSES_VAL', $a_set['passes']);
     }
     // begin-patch lok
     $this->ctrl->setParameterByClass('ilcourseobjectivesgui', 'objective_id', $a_set['id']);
     $this->tpl->setVariable('VAL_TITLE_LINKED', $this->ctrl->getLinkTargetByClass('ilcourseobjectivesgui', 'edit'));
     // end-patch lok
     $this->tpl->setVariable('VAL_TITLE', $a_set['title']);
     if (strlen($a_set['description'])) {
         $this->tpl->setVariable('VAL_DESC', $a_set['description']);
     }
     // materials
     foreach ($a_set['materials'] as $ref_id => $data) {
         if ($data['items']) {
             $this->tpl->touchBlock('ul_begin');
             foreach ($data['items'] as $pg_st) {
                 $this->tpl->setCurrentBlock('st_pg');
                 $this->tpl->setVariable('MAT_IMG', ilObject::_getIcon($pg_st['obj_id'], "tiny", $pg_st['type']));
                 $this->tpl->setVariable('MAT_ALT', $this->lng->txt('obj_' . $pg_st['type']));
                 include_once 'Modules/LearningModule/classes/class.ilLMObject.php';
                 $title = ilLMObject::_lookupTitle($pg_st['obj_id']);
                 $this->tpl->setVariable('MAT_TITLE', $title);
                 $this->tpl->parseCurrentBlock();
             }
             $this->tpl->touchBlock('ul_end');
         } else {
             $this->tpl->touchBlock('new_line');
         }
         $this->tpl->setCurrentBlock('mat_row');
         $this->tpl->setVariable('LM_IMG', ilObject::_getIcon($data['obj_id'], "tiny", $data['type']));
         $this->tpl->setVariable('LM_ALT', $this->lng->txt('obj_' . $data['type']));
         if ($data['type'] == 'catr' or $data['type'] == 'crsr') {
             include_once './Services/ContainerReference/classes/class.ilContainerReference.php';
             $this->tpl->setVariable('LM_TITLE', ilContainerReference::_lookupTargetTitle($data['obj_id']));
         } else {
             $this->tpl->setVariable('LM_TITLE', ilObject::_lookupTitle($data['obj_id']));
         }
         $this->tpl->parseCurrentBlock();
     }
     // self assessment
     // begin-patch lok
     if ($this->getSettings()->worksWithInitialTest()) {
         if ($this->getSettings()->hasSeparateInitialTests()) {
             if ($a_set['initial']) {
                 include_once './Services/Link/classes/class.ilLink.php';
                 $obj_id = ilObject::_lookupObjId($a_set['initial']);
                 $this->tpl->setCurrentBlock('initial_test_per_objective');
                 $this->tpl->setVariable('IT_IMG', ilObject::_getIcon($obj_id, 'tiny'));
                 $this->tpl->setVariable('IT_ALT', $this->lng->txt('obj_tst'));
                 $this->tpl->setVariable('IT_TITLE', ilObject::_lookupTitle($obj_id));
                 $this->tpl->setVariable('IT_TITLE_LINK', ilLink::_getLink($a_set['initial']));
                 include_once './Services/Link/classes/class.ilLink.php';
                 $this->ctrl->setParameterByClass('ilobjtestgui', 'ref_id', $a_set['initial']);
                 $this->ctrl->setParameterByClass('ilobjtestgui', 'cmd', 'questionsTabGateway');
                 $this->tpl->setVariable('IT_TITLE_LINK', $this->ctrl->getLinkTargetByClass('ilobjtestgui'));
                 $this->tpl->parseCurrentBlock();
             } else {
                 $this->tpl->touchBlock('initial_test_per_objective');
             }
         } else {
             foreach ($a_set['self'] as $test) {
                 // begin-patch lok
                 foreach ((array) $test['questions'] as $question) {
                     $this->tpl->setCurrentBlock('self_qst_row');
                     $this->tpl->setVariable('SELF_QST_TITLE', $question['title']);
                     $this->tpl->parseCurrentBlock();
                 }
                 // end-patch lok
             }
             // begin-patch lok
             if (!count($a_set['self'])) {
                 $this->tpl->touchBlock('self_qst_row');
             }
         }
         // end-patch lok
     }
     // end-patch lok
     // final test questions
     if ($this->getSettings()->getQualifyingTestType() == ilLOSettings::TYPE_QUALIFYING_SELECTED) {
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilCourseObjectivesTableGUI.php

示例10: parse

 /**
  * parse
  *
  * @access public
  * @param array array of assignable nodes (tree node data)
  * @return
  */
 public function parse($a_assignable)
 {
     global $objDefinition;
     $materials = array();
     foreach ($a_assignable as $node) {
         // no side blocks here
         if ($objDefinition->isSideBlock($node['type'])) {
             continue;
         }
         $tmp_data = array();
         $subobjects = array();
         if ($node['type'] == 'lm') {
             include_once './Modules/LearningModule/classes/class.ilLMObject.php';
             // Chapters and pages
             foreach ($chapters = $this->getAllSubObjects($node['child']) as $chapter => $chapter_data) {
                 $sub['title'] = ilLMObject::_lookupTitle($chapter);
                 $sub['id'] = $chapter;
                 $sub['depth'] = $chapter_data['depth'];
                 $sub['type'] = $chapter_data['type'];
                 $subobjects[] = $sub;
             }
         }
         $tmp_data['sub'] = $subobjects;
         $tmp_data['title'] = $node['title'];
         $tmp_data['description'] = $node['description'];
         $tmp_data['type'] = $node['type'];
         $tmp_data['id'] = $node['child'];
         $tmp_data['obj_id'] = $node['obj_id'];
         $materials[] = $tmp_data;
     }
     $this->setData($materials);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilCourseObjectiveMaterialAssignmentTableGUI.php

示例11: fillRow

 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl;
     $this->tpl->setVariable("TXT_PAGE_TITLE", $a_set["title"]);
     $ilCtrl->setParameterByClass("illmpageobjectgui", "obj_id", $a_set["obj_id"]);
     $this->tpl->setVariable("HREF_PAGE", $ilCtrl->getLinkTargetByClass("illmpageobjectgui", "edit"));
     include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
     $page_object = new ilLMPage($a_set["obj_id"]);
     $page_object->buildDom();
     $int_links = $page_object->getInternalLinks();
     foreach ($int_links as $link) {
         $target = $link["Target"];
         if (substr($target, 0, 4) == "il__") {
             $target_arr = explode("_", $target);
             $target_id = $target_arr[count($target_arr) - 1];
             $type = $link["Type"];
             switch ($type) {
                 case "PageObject":
                     $this->tpl->setCurrentBlock("link");
                     $this->tpl->setVariable("TXT_LINK_TYPE", $lng->txt("pg"));
                     if (ilLMObject::_exists($target_id)) {
                         $lm_id = ilLMObject::_lookupContObjID($target_id);
                         $add_str = $lm_id != $this->lm_id ? " (" . ilObject::_lookupTitle($lm_id) . ")" : "";
                         $this->tpl->setVariable("TXT_LINK_TITLE", ilLMObject::_lookupTitle($target_id) . $add_str);
                     } else {
                         $this->tpl->setVariable("TXT_MISSING", "<b>" . $lng->txt("cont_target_missing") . " [" . $target_id . "]" . "</b>");
                     }
                     $this->tpl->parseCurrentBlock();
                     break;
                 case "StructureObject":
                     $this->tpl->setCurrentBlock("link");
                     $this->tpl->setVariable("TXT_LINK_TYPE", $lng->txt("st"));
                     if (ilLMObject::_exists($target_id)) {
                         $lm_id = ilLMObject::_lookupContObjID($target_id);
                         $add_str = $lm_id != $this->lm_id ? " (" . ilObject::_lookupTitle($lm_id) . ")" : "";
                         $this->tpl->setVariable("TXT_LINK_TITLE", ilLMObject::_lookupTitle($target_id) . $add_str);
                     } else {
                         $this->tpl->setVariable("TXT_MISSING", "<b>" . $lng->txt("cont_target_missing") . " [" . $target_id . "]" . "</b>");
                     }
                     $this->tpl->parseCurrentBlock();
                     break;
                 case "GlossaryItem":
                     $this->tpl->setCurrentBlock("link");
                     $this->tpl->setVariable("TXT_LINK_TYPE", $lng->txt("cont_term"));
                     include_once "./Modules/Glossary/classes/class.ilGlossaryTerm.php";
                     if (ilGlossaryTerm::_exists($target_id)) {
                         $this->tpl->setVariable("TXT_LINK_TITLE", ilGlossaryTerm::_lookGlossaryTerm($target_id));
                     } else {
                         $this->tpl->setVariable("TXT_MISSING", "<b>" . $lng->txt("cont_target_missing") . " [" . $target_id . "]" . "</b>");
                     }
                     $this->tpl->parseCurrentBlock();
                     break;
                 case "MediaObject":
                     $this->tpl->setCurrentBlock("link");
                     $this->tpl->setVariable("TXT_LINK_TYPE", $lng->txt("mob"));
                     if (ilObject::_exists($target_id)) {
                         $this->tpl->setVariable("TXT_LINK_TITLE", ilObject::_lookupTitle($target_id));
                     } else {
                         $this->tpl->setVariable("TXT_MISSING", "<b>" . $lng->txt("cont_target_missing") . " [" . $target_id . "]" . "</b>");
                     }
                     $this->tpl->parseCurrentBlock();
                     break;
                 case "RepositoryItem":
                     $this->tpl->setCurrentBlock("link");
                     $this->tpl->setVariable("TXT_LINK_TYPE", $lng->txt("cont_repository_item"));
                     $obj_type = ilObject::_lookupType($target_id, true);
                     $obj_id = ilObject::_lookupObjId($target_id);
                     if (ilObject::_exists($obj_id)) {
                         $this->tpl->setVariable("TXT_LINK_TITLE", ilObject::_lookupTitle($obj_id) . " (" . $lng->txt("obj_" . $obj_type) . ")");
                     } else {
                         $this->tpl->setVariable("TXT_MISSING", "<b>" . $lng->txt("cont_target_missing") . " [" . $target_id . "]" . "</b>");
                     }
                     $this->tpl->parseCurrentBlock();
                     break;
             }
         } else {
             $type = $link["Type"];
             switch ($type) {
                 case "PageObject":
                     $this->tpl->setVariable("TXT_LINK_TYPE", $lng->txt("pg"));
                     break;
                 case "StructureObject":
                     $this->tpl->setVariable("TXT_LINK_TYPE", $lng->txt("st"));
                     break;
                 case "GlossaryItem":
                     $this->tpl->setVariable("TXT_LINK_TYPE", $lng->txt("cont_term"));
                     break;
                 case "MediaObject":
                     $this->tpl->setVariable("TXT_LINK_TYPE", $lng->txt("mob"));
                     break;
                 case "RepositoryItem":
                     $this->tpl->setVariable("TXT_LINK_TYPE", $lng->txt("cont_repository_item"));
                     break;
             }
             $this->tpl->setCurrentBlock("link");
             $this->tpl->setVariable("TXT_MISSING", "<b>" . $lng->txt("cont_target_missing") . " [" . $target . "]" . "</b>");
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilLinksTableGUI.php

示例12: _getPresentationTitle

 /**
  * get presentation title
  *
  */
 static function _getPresentationTitle($a_st_id, $a_include_numbers = false, $a_time_scheduled_activation = false, $a_lm_id = 0, $a_lang = "-")
 {
     global $ilDB;
     if ($a_lm_id == 0) {
         $a_lm_id = ilLMObject::_lookupContObjID($a_st_id);
     }
     if ($a_lm_id == 0) {
         return "";
     }
     // this is optimized when ilLMObject::preloadDataByLM is invoked (e.g. done in ilLMExplorerGUI)
     $title = ilLMObject::_lookupTitle($a_st_id);
     // this is also optimized since ilObjectTranslation re-uses instances for one lm
     include_once "./Services/Object/classes/class.ilObjectTranslation.php";
     $ot = ilObjectTranslation::getInstance($a_lm_id);
     $languages = $ot->getLanguages();
     if ($a_lang != "-" && $ot->getContentActivated() && isset($languages[$a_lang])) {
         include_once "./Modules/LearningModule/classes/class.ilLMObjTranslation.php";
         $lmobjtrans = new ilLMObjTranslation($a_st_id, $a_lang);
         if ($lmobjtrans->getTitle() != "") {
             $title = $lmobjtrans->getTitle();
         }
     }
     include_once "./Modules/LearningModule/classes/class.ilLMTree.php";
     $tree = ilLMTree::getInstance($a_lm_id);
     if ($a_include_numbers) {
         // this is optimized, since isInTree is cached
         if ($tree->isInTree($a_st_id)) {
             // optimization needed from here
             // get chapter tree node
             $query = "SELECT * FROM lm_tree WHERE child = " . $ilDB->quote($a_st_id, "integer") . " AND lm_id = " . $ilDB->quote($a_lm_id, "integer");
             $tree_set = $ilDB->query($query);
             $tree_node = $tree_set->fetchRow(DB_FETCHMODE_ASSOC);
             $depth = $tree_node["depth"];
             $nr = $tree->getChildSequenceNumber($tree_node, "st") . " ";
             for ($i = $depth - 1; $i > 1; $i--) {
                 // get next parent tree node
                 $query = "SELECT * FROM lm_tree WHERE child = " . $ilDB->quote($tree_node["parent"], "integer") . " AND lm_id = " . $ilDB->quote($a_lm_id, "integer");
                 $tree_set = $ilDB->query($query);
                 $tree_node = $tree_set->fetchRow(DB_FETCHMODE_ASSOC);
                 $seq = $tree->getChildSequenceNumber($tree_node, "st");
                 $nr = $seq . "." . $nr;
             }
         }
     }
     return $nr . $title;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:50,代码来源:class.ilStructureObject.php

示例13: getMapAreaLinkString

 /**
  * Get text name of internal link
  *
  * @param	string		$a_target		target object link id
  * @param	string		$a_type			type
  * @param	string		$a_frame		target frame
  *
  * @access	private
  */
 function getMapAreaLinkString($a_target, $a_type, $a_frame)
 {
     global $lng;
     $t_arr = explode("_", $a_target);
     if ($a_frame != "") {
         $frame_str = " (" . $a_frame . " Frame)";
     }
     switch ($a_type) {
         case "StructureObject":
             require_once "./Modules/LearningModule/classes/class.ilLMObject.php";
             $title = ilLMObject::_lookupTitle($t_arr[count($t_arr) - 1]);
             $link_str = $lng->txt("chapter") . ": " . $title . " [" . $t_arr[count($t_arr) - 1] . "]" . $frame_str;
             break;
         case "PageObject":
             require_once "./Modules/LearningModule/classes/class.ilLMObject.php";
             $title = ilLMObject::_lookupTitle($t_arr[count($t_arr) - 1]);
             $link_str = $lng->txt("page") . ": " . $title . " [" . $t_arr[count($t_arr) - 1] . "]" . $frame_str;
             break;
         case "GlossaryItem":
             require_once "./Modules/Glossary/classes/class.ilGlossaryTerm.php";
             $term =& new ilGlossaryTerm($t_arr[count($t_arr) - 1]);
             $link_str = $lng->txt("term") . ": " . $term->getTerm() . " [" . $t_arr[count($t_arr) - 1] . "]" . $frame_str;
             break;
         case "MediaObject":
             require_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
             $mob =& new ilObjMediaObject($t_arr[count($t_arr) - 1]);
             $link_str = $lng->txt("mob") . ": " . $mob->getTitle() . " [" . $t_arr[count($t_arr) - 1] . "]" . $frame_str;
             break;
         case "RepositoryItem":
             $title = ilObject::_lookupTitle(ilObject::_lookupObjId($t_arr[count($t_arr) - 1]));
             $link_str = $lng->txt("obj_" . $t_arr[count($t_arr) - 2]) . ": " . $title . " [" . $t_arr[count($t_arr) - 1] . "]" . $frame_str;
             break;
     }
     return $link_str;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:44,代码来源:class.ilImageMapEditorGUI.php

示例14: showPage

 /**
  * Show page
  *
  * @param
  * @return
  */
 function showPage()
 {
     global $lng;
     $page_id = (int) $_GET["help_page"];
     $h_tpl = new ilTemplate("tpl.help.html", true, true, "Services/Help");
     include_once "./Modules/LearningModule/classes/class.ilLMObject.php";
     $h_tpl->setCurrentBlock("backlink");
     $h_tpl->setVariable("TXT_BACK", $lng->txt("back"));
     $h_tpl->setVariable("ONCLICK_BACK", "return il.Help.listHelp(event, true);");
     $h_tpl->parseCurrentBlock();
     $h_tpl->setVariable("HEAD", $lng->txt("help") . " - " . ilLMObject::_lookupTitle($page_id));
     include_once "./Services/COPage/classes/class.ilPageUtil.php";
     if (!ilPageUtil::_existsAndNotEmpty("lm", $page_id)) {
         exit;
     }
     include_once "./Services/COPage/classes/class.ilPageObject.php";
     include_once "./Services/COPage/classes/class.ilPageObjectGUI.php";
     // get page object
     include_once "./Modules/LearningModule/classes/class.ilObjContentObject.php";
     include_once "./Modules/LearningModule/classes/class.ilLMPageGUI.php";
     $page_gui = new ilLMPageGUI($page_id);
     $cfg = $page_gui->getPageConfig();
     $page_gui->setPresentationTitle("");
     $page_gui->setTemplateOutput(false);
     $page_gui->setHeader("");
     $page_gui->setRawPageContent(true);
     $cfg->setEnablePCType("Map", false);
     $cfg->setEnablePCType("Tabs", false);
     $cfg->setEnablePCType("FileList", false);
     $page_gui->getPageObject()->buildDom();
     $int_links = $page_gui->getPageObject()->getInternalLinks();
     $link_xml = $this->getLinkXML($int_links);
     $link_xml .= $this->getLinkTargetsXML();
     //echo htmlentities($link_xml);
     $page_gui->setLinkXML($link_xml);
     $ret = $page_gui->showPage();
     $h_tpl->setVariable("CONTENT", $ret);
     $h_tpl->setVariable("CLOSE_IMG", ilUtil::img(ilUtil::getImagePath("icon_close2_s.png")));
     ilSession::set("help_pg", $page_id);
     $page = $h_tpl->get();
     // replace style classes
     //$page = str_replace("ilc_text_inline_Strong", "ilHelpStrong", $page);
     echo $page;
     exit;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:51,代码来源:class.ilHelpGUI.php

示例15: validatePages

 /**
  * Validate all pages
  */
 function validatePages()
 {
     include_once "./Modules/LearningModule/classes/class.ilLMPageObject.php";
     include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
     $mess = "";
     $pages = ilLMPageObject::getPageList($this->getId());
     foreach ($pages as $page) {
         if (ilLMPage::_exists($this->getType(), $page["obj_id"])) {
             $cpage = new ilLMPage($page["obj_id"]);
             $cpage->buildDom();
             $error = @$cpage->validateDom();
             if ($error != "") {
                 $this->lng->loadLanguageModule("content");
                 ilUtil::sendInfo($this->lng->txt("cont_import_validation_errors"));
                 $title = ilLMObject::_lookupTitle($page["obj_id"]);
                 $page_obj = new ilLMPageObject($this, $page["obj_id"]);
                 $mess .= $this->lng->txt("obj_pg") . ": " . $title;
                 $mess .= '<div class="small">';
                 foreach ($error as $e) {
                     $err_mess = implode($e, " - ");
                     if (!is_int(strpos($err_mess, ":0:"))) {
                         $mess .= htmlentities($err_mess) . "<br />";
                     }
                 }
                 $mess .= '</div>';
                 $mess .= "<br />";
             }
         }
     }
     return $mess;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:34,代码来源:class.ilObjContentObject.php


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