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

This commit is contained in:
Ankit Agarwal 2012-06-11 13:18:11 +08:00
parent f8dfdb524b
commit b0b30cb648

View File

@ -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>';
}