diff --git a/mod/chat/pagelib.php b/mod/chat/pagelib.php index 6d96581b839..6cf0174110b 100644 --- a/mod/chat/pagelib.php +++ b/mod/chat/pagelib.php @@ -63,11 +63,14 @@ class page_chat extends page_generic_activity { } if(empty($morebreadcrumbs) && $this->user_allowed_editing()) { - $buttons = ''. - '
'.update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'chat')).'
'. - ''. - ''. - '
'; + $buttons = ''; + if(!empty($CFG->showblocksonmodpages)) { + $buttons .= ''; + } + $buttons .= '
'.update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'chat')).'
'. + ''. + ''. + '
'; } else { $buttons = ' '; diff --git a/mod/chat/view.php b/mod/chat/view.php index f08638317b0..39bc0274d8b 100644 --- a/mod/chat/view.php +++ b/mod/chat/view.php @@ -69,7 +69,7 @@ echo ''; - if(blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing()) { + if(!empty($CFG->showblocksonmodpages) && (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing())) { echo ''; diff --git a/mod/quiz/pagelib.php b/mod/quiz/pagelib.php index 76d799d7374..f28e7d78618 100644 --- a/mod/quiz/pagelib.php +++ b/mod/quiz/pagelib.php @@ -66,12 +66,14 @@ class page_quiz extends page_generic_activity { $buttons = '
'; blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT); echo '
'. - '
'. ''. '
'. - update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'quiz')). - '
'. - ''. - ''. - '
'; + update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'quiz')).''; + if(!empty($CFG->showblocksonmodpages)) { + $buttons .= '
'. + ''. + ''. + '
'; + } + $buttons .= ''; } else { $buttons = ' '; diff --git a/mod/quiz/view.php b/mod/quiz/view.php index de9f6bbdef0..51aee12a708 100644 --- a/mod/quiz/view.php +++ b/mod/quiz/view.php @@ -67,7 +67,7 @@ echo ''; - if(blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing()) { + if(!empty($CFG->showblocksonmodpages) && (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing())) { echo '';
'; blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT); echo '