Respect $CFG->showblocksonmodpages.
This commit is contained in:
@@ -63,11 +63,14 @@ class page_chat extends page_generic_activity {
|
||||
}
|
||||
|
||||
if(empty($morebreadcrumbs) && $this->user_allowed_editing()) {
|
||||
$buttons = '<table><tr><td>'.update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'chat')).'</td>'.
|
||||
'<td><form target="'.$CFG->framename.'" method="get" action="view.php">'.
|
||||
'<input type="hidden" name="id" value="'.$this->modulerecord->id.'" />'.
|
||||
'<input type="hidden" name="edit" value="'.($this->user_is_editing()?'off':'on').'" />'.
|
||||
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditingoff':'blockseditingon').'" /></form></td></tr></table>';
|
||||
$buttons = '<table><tr><td>'.update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'chat')).'</td>';
|
||||
if(!empty($CFG->showblocksonmodpages)) {
|
||||
$buttons .= '<td><form target="'.$CFG->framename.'" method="get" action="view.php">'.
|
||||
'<input type="hidden" name="id" value="'.$this->modulerecord->id.'" />'.
|
||||
'<input type="hidden" name="edit" value="'.($this->user_is_editing()?'off':'on').'" />'.
|
||||
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></form></td>';
|
||||
}
|
||||
$buttons .= '</tr></table>';
|
||||
}
|
||||
else {
|
||||
$buttons = ' ';
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@
|
||||
|
||||
echo '<table id="layout-table"><tr>';
|
||||
|
||||
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 '<td style="width: '.$blocks_preferred_width.'px;" id="left-column">';
|
||||
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
|
||||
echo '</td>';
|
||||
|
||||
@@ -66,12 +66,14 @@ class page_quiz extends page_generic_activity {
|
||||
$buttons = '<table><tr><td><form target="'.$CFG->framename.'" method="get" action="edit.php">'.
|
||||
'<input type="hidden" name="quizid" value="'.$this->activityrecord->id.'" />'.
|
||||
'<input type="submit" value="'.get_string('editquestions', 'quiz').'" /></form></td><td>'.
|
||||
update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'quiz')).
|
||||
'</td>'.
|
||||
'<td><form target="'.$CFG->framename.'" method="get" action="view.php">'.
|
||||
'<input type="hidden" name="id" value="'.$this->modulerecord->id.'" />'.
|
||||
'<input type="hidden" name="edit" value="'.($this->user_is_editing()?'off':'on').'" />'.
|
||||
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></form></td></tr></table>';
|
||||
update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'quiz')).'</td>';
|
||||
if(!empty($CFG->showblocksonmodpages)) {
|
||||
$buttons .= '<td><form target="'.$CFG->framename.'" method="get" action="view.php">'.
|
||||
'<input type="hidden" name="id" value="'.$this->modulerecord->id.'" />'.
|
||||
'<input type="hidden" name="edit" value="'.($this->user_is_editing()?'off':'on').'" />'.
|
||||
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></form></td>';
|
||||
}
|
||||
$buttons .= '</tr></table>';
|
||||
}
|
||||
else {
|
||||
$buttons = ' ';
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@
|
||||
|
||||
echo '<table id="layout-table"><tr>';
|
||||
|
||||
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 '<td style="width: '.$blocks_preferred_width.'px;" id="left-column">';
|
||||
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
|
||||
echo '</td>';
|
||||
|
||||
Reference in New Issue
Block a user