Making Exit Book Button Available on all chapters (pages)

Making Exit Book Button Available on all chapters (pages)

by Ray Waller -
Number of replies: 2

Is it possible to add the Exit Book icon to all chapters of the book activity, so a user can return to the course w/o going to the last page or navigating to the breadcrumb trail or adding an exit link within the page content.

See image...

Attachment book_exit.png
Average of ratings: -
In reply to Ray Waller

Re: Making Exit Book Button Available on all chapters (pages)

by Ryan Archer -

+1 Ray, I'd like to see something similar. For now I'm really entertaining the thought to put my own button into every book chapter with html code.

In reply to Ray Waller

Re: Making Exit Book Button Available on all chapters (pages)

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Ray and Ryan,

Ya'll didn't say which version of book you are using, but since there haven't been too many updates maybe this will work for most versions of Moodle 2.x.

Only a few lines of code in ...yourmoodle/mod/book/view.php needs to be duplicated to put the exit book link on each page and keep completion tracking as is. You can almost do it by commenting out one line of code (160) but then there would not be an exit button on the last page and the completion tracking would be messed up. You need to duplicate lines 161 thru 164 and stick them between 159 and 160.

view.php BEFORE:

before changes

view.php AFTER:

after changes

HTH,

AL