// prepare $toc and $currtitle, $currsubtitle require('tocPopup.php'); if ($edit) { $tocwidth = $CFG->book_tocwidth + 80; } else { $tocwidth = $CFG->book_tocwidth; } /*$doimport = ($isteacher and $edit) ? '<font size="-1"> (<a href="import.php?id='.$cm->id.'">'.get_string('doimport', 'book').'</a>)</font>' : '';*/ if($navchapter->id !=0){ $breadcrumbs .= '<td id="current"><div id="start"> </div><div id="main"><a href="popup.php?id='.$cm->id.'&pagenum=1&navigationnum='.$navpath->navpathnum.'&target_navigation_chapter=0&show_navigation='.$show_navigation.'">'. $navpath->name.'</a></div><div id="end"> </div></td>'. hiperbook_link_parent_chapters($navchapter->id, $cm, $groupid, true); } // ===================================================== // Book display HTML code // ===================================================== ?><div id="bookname"><?php echo $book->name; ?></div><? // trata dos caminhos de navegacao // se professor, ou sem grupos ou grupos visiveis -> mostra todos // grupos separados, mostra apenas os do grupo do usuario
function hiperbook_link_parent_chapters($navigation_chapter_id, $cm, $groupid = 0, $popup = false) { // busca a navegacao atual $navigation_chapter = get_record('hiperbook_navigation_chapters', 'id', $navigation_chapter_id); $chapter = get_record('hiperbook_chapters', 'id', $navigation_chapter->chapterid); $navpath = get_record('hiperbook_navigationpath', 'id', $navigation_chapter->navigationid); //se tem pai if ($navigation_chapter->parentnavchapterid != 0) { $parentnavchapter = get_record('hiperbook_navigation_chapters', 'id', $navigation_chapter->parentnavchapterid); $parentchapters_links .= hiperbook_link_parent_chapters($parentnavchapter->id, $cm, $groupid, $popup); } $parentchapters_links .= '<td id="past"><div id="start"> > </div><div id="main"><a title="' . htmlspecialchars($parentchapter->title) . '" href="'; if ($popup) { $parentchapters_links .= 'popup.php'; } else { $parentchapters_links .= 'view.php'; } $parentchapters_links .= '?id=' . $cm->id . '&target_navigation_chapter=' . $navigation_chapter->id . '&groupid=' . $groupid . '">' . $chapter->title . '</a> </div><div id="end"> </div></td>'; return $parentchapters_links; }