Exit button

Exit button

by Chardelle Busch -
Number of replies: 5
Picture of Core developers

Hi Petr and everybody using his book module,

I have just made a change that some of you might be interested in.  I have changed the nav_next_dis button so that when a user gets to the last page in the book, there is a link back to the course homepage (see image).  (I just like this type of navigation linearity.)  Remember I have made my own custom pix, so my next gif actually says "next".  It was easy to just change my "next" gif to an "exit" gif to replace the nave_next_dis gif. 

To do this, change this code (you should be able to just copy and paste the code here) in the view.php file (it is about line 156 and comes before the // prepare print icons section):

} else {
    $chnavigation .= '<a title="'.get_string('exit', 'book').'" href="/course/view.php?id='.$course->id.'"><img src="pix/nav_next_dis.gif" height=22 width=49 border=0></img>';
}

And be sure to change the height and width to match your own gif.

Then add this line to the lang file:

$string['exit'] = 'Exit Book';  or whatever you would like the mouseover to say--it could be Return to Course instead of Exit Book.

Chardelle

Attachment exit.gif
Average of ratings: -
In reply to Chardelle Busch

Re: Exit button

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Interesting!
I am preparing version 1.0a, this will be included smile

Thanks
In reply to Petr Skoda

Re: Exit button

by Chardelle Busch -
Picture of Core developers

Hey skodak,

Just wanted to mention something for your new version.  I noticed that if you backup and restore a course with books, the "settings" of the book--i.e. chapter numbering, display printing and custom title--do not restore--they go back to the default settings.  I don't know if there is some code to make these settings restore if they have been changed but if you find some....

Thanks,

Chardelle

In reply to Chardelle Busch

Re: Exit button

by Dawn Wright -

Chardelle,

 I visited your course and it looks great. Is the book generated by the book module or did you do additional customization?

In reply to Dawn Wright

Re: Exit button

by Chardelle Busch -
Picture of Core developers

Hi Dawn,

Thanks.  Yes, it is the book module.  Although I have done some customization to the images (as you can see above) and a little bit to the layout (reducing some extra spaces, etc.).  If you look for the "book theme" discussion in this forum you will find how to get the book binder image to come up in your pages.

Chardelle