Respect $CFG->showblocksonmodpages.

This commit is contained in:
defacer
2005-03-16 03:26:21 +00:00
parent 23b87060bf
commit 3f95436073
4 changed files with 18 additions and 13 deletions
+8 -5
View File
@@ -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 = '&nbsp;';
+1 -1
View File
@@ -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>';
+8 -6
View File
@@ -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 = '&nbsp;';
+1 -1
View File
@@ -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>';