Permalink
Browse files

MDL-33123 book: Fixing numbering issue with hidden sub-chapters

  • Loading branch information...
1 parent f8dfdb5 commit b0b30cb648b8c7a9118c759691ffe47eb84eb021 @ankitagarwal ankitagarwal committed Jun 11, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/book/locallib.php
View
@@ -268,7 +268,11 @@ function book_get_toc($chapters, $chapter, $book, $cm, $edit) {
}
} else {
if ($book->numbering == BOOK_NUM_NUMBERS) {
- $title = "x.x $title";
+ if (empty($chapters[$ch->parent]->hidden)) {
+ $title = "$nch.x $title";
+ } else {
+ $title = "x.x $title";
+ }
}
$title = '<span class="dimmed_text">'.$title.'</span>';
}

0 comments on commit b0b30cb

Please sign in to comment.