本文整理匯總了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;
}