Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-33198-master' of git://github.com/ankitagarwal/moodle

  • Loading branch information...
commit 05b7836ff7ba1647b1ef1d3381d7d9ef861d425d 2 parents 543951c + 98e8c0c
@stronk7 stronk7 authored
View
13 mod/book/tool/print/index.php
@@ -91,6 +91,7 @@
</head>
<body>
<a name="top"></a>
+ <h1 class="book_title"><?php echo format_string($book->name, true, array('context'=>$context)) ?></h1>
<div class="chapter">
<?php
@@ -98,11 +99,11 @@
if (!$book->customtitles) {
if (!$chapter->subchapter) {
$currtitle = book_get_chapter_title($chapter->id, $chapters, $book, $context);
- echo '<p class="book_chapter_title">'.$currtitle.'</p>';
+ echo '<h2 class="book_chapter_title">'.$currtitle.'</h2>';
} else {
$currtitle = book_get_chapter_title($chapters[$chapter->id]->parent, $chapters, $book, $context);
$currsubtitle = book_get_chapter_title($chapter->id, $chapters, $book, $context);
- echo '<p class="book_chapter_title">'.$currtitle.'<br />'.$currsubtitle.'</p>';
+ echo '<h2 class="book_chapter_title">'.$currtitle.'</h2><h3 class="book_chapter_title">'.$currsubtitle.'</h3>';
}
}
@@ -128,7 +129,7 @@
</head>
<body>
<a name="top"></a>
- <p class="book_title"><?php echo format_string($book->name, true, array('context'=>$context)) ?></p>
+ <h1 class="book_title"><?php echo format_string($book->name, true, array('context'=>$context)) ?></h1>
<p class="book_summary"><?php echo format_text($book->intro, $book->introformat, array('noclean'=>true, 'context'=>$context)) ?></p>
<div class="book_info"><table>
<tr>
@@ -162,7 +163,11 @@
}
echo '<div class="book_chapter"><a name="ch'.$ch->id.'"></a>';
if (!$book->customtitles) {
- echo '<p class="book_chapter_title">'.$titles[$ch->id].'</p>';
+ if (!$chapter->subchapter) {
+ echo '<h2 class="book_chapter_title">'.$titles[$ch->id].'</h2>';
+ } else {
+ echo '<h3 class="book_chapter_title">'.$titles[$ch->id].'</h3>';
+ }
}
$content = str_replace($link1, '#ch', $chapter->content);
$content = str_replace($link2, '#top', $content);
View
6 mod/book/tool/print/locallib.php
@@ -60,11 +60,7 @@ function booktool_print_get_toc($chapters, $book, $cm) {
$toc .= html_writer::tag('a', '', array('name' => 'toc')); // Representation of toc (HTML).
- if ($book->customtitles) {
- $toc .= html_writer::tag('h1', get_string('toc', 'mod_book'));
- } else {
- $toc .= html_writer::tag('p', get_string('toc', 'mod_book'), array('class' => 'book_chapter_title'));
- }
+ $toc .= html_writer::tag('h2', get_string('toc', 'mod_book'), array('class' => 'book_chapter_title'));
$toc .= html_writer::start_tag('ul');
foreach ($chapters as $ch) {
if (!$ch->hidden) {
View
5 mod/book/view.php
@@ -181,11 +181,12 @@
$hidden = $chapter->hidden ? 'dimmed_text' : '';
if (!$chapter->subchapter) {
$currtitle = book_get_chapter_title($chapter->id, $chapters, $book, $context);
- echo '<p class="book_chapter_title '.$hidden.'">'.$currtitle.'</p>';
+ echo $OUTPUT->heading($currtitle, 2, array('class' => 'book_chapter_title '.$hidden));
} else {
$currtitle = book_get_chapter_title($chapters[$chapter->id]->parent, $chapters, $book, $context);
$currsubtitle = book_get_chapter_title($chapter->id, $chapters, $book, $context);
- echo '<p class="book_chapter_title '.$hidden.'">'.$currtitle.'<br />'.$currsubtitle.'</p>';
+ echo $OUTPUT->heading($currtitle, 2, array('class' => 'book_chapter_title '.$hidden));
+ echo $OUTPUT->heading($currsubtitle, 3, array('class' => 'book_chapter_title '.$hidden));
}
}
$chaptertext = file_rewrite_pluginfile_urls($chapter->content, 'pluginfile.php', $context->id, 'mod_book', 'chapter', $chapter->id);
Please sign in to comment.
Something went wrong with that request. Please try again.