When "Disable Printing" is selected in the Book Setting Students are still able to see the Print Icons. They get an error when attempting to print.
Build Moodle 1.9.7+ (Build: 20100210)
Book code from latest version as of Feb 10th.
I have noticed this as well. It is annoying as the students keep asking why they cannot print as they think there is an error rather than what the teacher wants.
I have changed some code and now seems to be working. Have tested briefly and seems to be fine but probably some more thorough testing is required.
If printing is disabled the Print Icons are still being displayed modifying the following code fixes this issue.
File:
/moodle/mod/book/view.php
Replace !allowprint below;
/// prepare print icons
if (!$allowprint) {
$printbook = '';
$printchapter = '';
With
/// prepare print icons
if ($book->disableprinting) {
$printbook = '';
$printchapter = '';
One caveat on this it does remove print icons for all levels of privilege from student to admin.
If printing is disabled the Print Icons are still being displayed modifying the following code fixes this issue.
File:
/moodle/mod/book/view.php
Replace !allowprint below;
/// prepare print icons
if (!$allowprint) {
$printbook = '';
$printchapter = '';
With
/// prepare print icons
if ($book->disableprinting) {
$printbook = '';
$printchapter = '';
One caveat on this it does remove print icons for all levels of privilege from student to admin.