diff -ruN mod/book/config.html /var/www/moodle/mod/book/config.html --- mod/book/config.html 2008-03-25 11:16:24.000000000 +0000 +++ /var/www/moodle/mod/book/config.html 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ - - -
- - - - - - - - - - - - -
-

book_tocwidth:

-
- '140', '160'=>'160', '180'=>'180', '200'=>'200', - '220'=>'220', '240'=>'240', '260'=>'260', '280'=>'280', '300'=>'300'); - choose_from_menu ($choices, 'book_tocwidth', $CFG->book_tocwidth, ''); - ?> - - -
- -
- -
diff -ruN mod/book/delete.php /var/www/moodle/mod/book/delete.php --- mod/book/delete.php 2008-03-25 11:16:24.000000000 +0000 +++ /var/www/moodle/mod/book/delete.php 2008-03-25 19:36:43.000000000 +0000 @@ -8,21 +8,9 @@ $strbooks = get_string('modulenameplural', 'book'); $strbook = get_string('modulename', 'book'); -if ($course->category) { - $navigation = ''.$course->shortname.' ->'; -} else { - $navigation = ''; -} +$navigation = build_navigation('', $cm); -print_header( "$course->shortname: $book->name", - $course->fullname, - "$navigation id>$strbooks -> $book->name", - '', - '', - true, - '', - '' - ); +print_header("$course->shortname: $book->name", $course->fullname, $navigation); ///form processing if ($confirm) { // the operation was confirmed. diff -ruN mod/book/edit.php /var/www/moodle/mod/book/edit.php --- mod/book/edit.php 2008-03-25 11:16:24.000000000 +0000 +++ /var/www/moodle/mod/book/edit.php 2008-03-25 19:37:34.000000000 +0000 @@ -123,22 +123,9 @@ } ///prepare the page header -if ($course->category) { - $navigation = ''.$course->shortname.' ->'; -} else { - $navigation = ''; -} - -print_header( "$course->shortname: $book->name", - $course->fullname, - "$navigation id\">$strbooks -> id\">$book->name -> $stredit", - '', - '', - true, - '', - '' - ); +$navigation = build_navigation('', $cm); +print_header("$course->shortname: $book->name", $course->fullname, $navigation); $icon = ' '; print_heading_with_help($pageheading, 'edit', 'book', $icon); diff -ruN mod/book/import.php /var/www/moodle/mod/book/import.php --- mod/book/import.php 2008-03-25 11:16:24.000000000 +0000 +++ /var/www/moodle/mod/book/import.php 2008-03-25 19:36:43.000000000 +0000 @@ -45,21 +45,12 @@ $strbooks = get_string('modulenameplural', 'book'); $strimport = get_string('import', 'book'); -if ($course->category) { - $navigation = ''.$course->shortname.' ->'; -} else { - $navigation = ''; -} +$navlinks = array(); +$navlinks[] = array('name' => $strimport, 'link' => '', 'type' => 'title'); + +$navigation = build_navigation($navlinks, $cm); -print_header( "$course->shortname: $book->name", - $course->fullname, - "$navigation id\">$strbooks -> id\">$book->name -> $strimport", - '', - '', - true, - '', - '' - ); +print_header("$course->shortname: $book->name", $course->fullname, $navigation); /// If data submitted, then process, store and relink. if (($form = data_submitted()) && (confirm_sesskey())) { diff -ruN mod/book/index.php /var/www/moodle/mod/book/index.php --- mod/book/index.php 2008-03-25 11:16:24.000000000 +0000 +++ /var/www/moodle/mod/book/index.php 2008-03-25 19:36:43.000000000 +0000 @@ -28,22 +28,12 @@ $strbooks = get_string('modulenameplural', 'book'); $strbook = get_string('modulename', 'book'); -/// Print the header -if ($course->category) { - $navigation = ''.$course->shortname.' ->'; -} else { - $navigation = ''; -} -print_header( "$course->shortname: $strbooks", - $course->fullname, - "$navigation $strbooks", - '', - '', - true, - '', - navmenu($course) - ); +$navlinks = array(); +$navlinks[] = array('name' => $strbooks, 'link' => '', 'type' => 'activity'); +$navigation = build_navigation($navlinks); + +print_header_simple($strbooks, '', $navigation, '', '', true, '', navmenu($course)); add_to_log($course->id, 'book', 'view all', 'index.php?id='.$course->id, ''); diff -ruN mod/book/lang/en_utf8/book.php /var/www/moodle/mod/book/lang/en_utf8/book.php --- mod/book/lang/en_utf8/book.php 2008-03-25 11:16:24.000000000 +0000 +++ /var/www/moodle/mod/book/lang/en_utf8/book.php 2008-03-25 19:36:43.000000000 +0000 @@ -5,6 +5,7 @@ $string['toc'] = 'Table of Contents'; $string['tocwidth'] = 'Select width of the Table of Contents for all books.'; +$string['book_tocwidth'] = 'Table of Contents width'; $string['faq'] = 'Book FAQ'; $string['disableprinting'] = 'Disable Printing'; diff -ruN mod/book/settings.php /var/www/moodle/mod/book/settings.php --- mod/book/settings.php 1970-01-01 01:00:00.000000000 +0100 +++ /var/www/moodle/mod/book/settings.php 2008-03-25 19:36:43.000000000 +0000 @@ -0,0 +1,11 @@ +'140', '160'=>'160', '180'=>'180', '200'=>'200', + '220'=>'220', '240'=>'240', '260'=>'260', '280'=>'280', '300'=>'300'); + + +$settings->add(new admin_setting_configselect('book_tocwidth', get_string('book_tocwidth', 'book'), + get_string('tocwidth', 'book'), '180', $choices)); + + +?> diff -ruN mod/book/view.php /var/www/moodle/mod/book/view.php --- mod/book/view.php 2008-03-25 11:16:25.000000000 +0000 +++ /var/www/moodle/mod/book/view.php 2008-03-25 19:36:43.000000000 +0000 @@ -98,11 +98,7 @@ $strTOC = get_string('TOC', 'book'); /// prepare header -if ($course->category) { - $navigation = ''.$course->shortname.' ->'; -} else { - $navigation = ''; -} +$navigation = build_navigation('', $cm); $buttons = $allowedit ? ''. '
'.update_module_button($cm->id, $course->id, $strbook).' '.book_edit_button($cm->id, $course->id, $chapter->id).'
' @@ -110,7 +106,7 @@ print_header( "$course->shortname: $book->name ($chapter->title)", $course->fullname, - "$navigation id\">$strbooks -> $book->name", + $navigation, '', '', true,