本文整理汇总了PHP中ilLMObject::getPagesOfChapter方法的典型用法代码示例。如果您正苦于以下问题:PHP ilLMObject::getPagesOfChapter方法的具体用法?PHP ilLMObject::getPagesOfChapter怎么用?PHP ilLMObject::getPagesOfChapter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilLMObject
的用法示例。
在下文中一共展示了ilLMObject::getPagesOfChapter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showHelp
/**
* Show online help
*/
function showHelp()
{
global $ilHelp, $lng, $ilSetting;
if ($_GET["help_screen_id"] != "") {
ilSession::set("help_screen_id", $_GET["help_screen_id"]);
$help_screen_id = $_GET["help_screen_id"];
} else {
$help_screen_id = ilSession::get("help_screen_id");
}
$this->resetCurrentPage();
$id_arr = explode(".", $help_screen_id);
include_once "./Services/Help/classes/class.ilHelpMapping.php";
$help_arr = ilHelpMapping::getHelpSectionsForId($id_arr[0], $id_arr[1]);
$hm = (int) $ilSetting->get("help_module");
if ((OH_REF_ID > 0 || $hm > 0) && count($help_arr) > 0) {
if (OH_REF_ID > 0) {
$oh_lm_id = ilObject::_lookupObjId(OH_REF_ID);
} else {
include_once "./Services/Help/classes/class.ilObjHelpSettings.php";
$oh_lm_id = ilObjHelpSettings::lookupModuleLmId($hm);
}
include_once "./Services/Accordion/classes/class.ilAccordionGUI.php";
$acc = new ilAccordionGUI();
$acc->setId("oh_acc");
$acc->setBehaviour(ilAccordionGUI::FIRST_OPEN);
foreach ($help_arr as $h_id) {
include_once "./Modules/LearningModule/classes/class.ilLMObject.php";
$st_id = $h_id;
if (!ilLMObject::_exists($st_id)) {
continue;
}
$pages = ilLMObject::getPagesOfChapter($oh_lm_id, $st_id);
include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
$grp_list = new ilGroupedListGUI();
foreach ($pages as $pg) {
$grp_list->addEntry(ilLMObject::_lookupTitle($pg["child"]), "#", "", "return il.Help.showPage(" . $pg["child"] . ");");
}
$acc->addItem(ilLMObject::_lookupTitle($st_id), $grp_list->getHTML());
}
$h_tpl = new ilTemplate("tpl.help.html", true, true, "Services/Help");
$h_tpl->setVariable("HEAD", $lng->txt("help"));
$h_tpl->setVariable("CONTENT", $acc->getHTML());
$h_tpl->setVariable("CLOSE_IMG", ilUtil::img(ilUtil::getImagePath("icon_close2_s.png")));
echo $h_tpl->get();
}
exit;
}