Skip to content

Commit

Permalink
Merge branch 'MDL-41595_M26' of git://github.com/lazydaisy/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 17, 2013
2 parents c8f052d + f6fa4b7 commit ba57caa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mod/book/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function book_get_chapter_title($chid, $chapters, $book, $context) {
}

/**
* Add the book TOC sticky block to the 1st region available
* Add the book TOC sticky block to the default region
*
* @param array $chapters
* @param stdClass $chapter
Expand All @@ -169,9 +169,8 @@ function book_add_fake_block($chapters, $chapter, $book, $cm, $edit) {
$bc->attributes['class'] = 'block block_book_toc';
$bc->content = $toc;

$regions = $PAGE->blocks->get_regions();
$firstregion = reset($regions);
$PAGE->blocks->add_fake_block($bc, $firstregion);
$defaultregion = $PAGE->blocks->get_default_region();
$PAGE->blocks->add_fake_block($bc, $defaultregion);
}

/**
Expand Down

0 comments on commit ba57caa

Please sign in to comment.