From: urs_hunkler Date: Mon, 8 Jan 2007 15:53:34 +0000 (+0000) Subject: 'changes for flexible column arrangement - see MDL-8109' X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d55c9a1f330593188db92fd30ccf242bb3603cd3;p=moodle.git 'changes for flexible column arrangement - see MDL-8109' --- diff --git a/course/format/topics/format.php b/course/format/topics/format.php index 7485e77a72..0ce43b3d6b 100644 --- a/course/format/topics/format.php +++ b/course/format/topics/format.php @@ -68,6 +68,12 @@ echo ''; /// The left column ... +// uh-changes start + $lt = (empty($THEME->layouttable)) ? array('left', 'middle', 'right') : $THEME->layouttable; + foreach ($lt as $column) { + switch ($column) { + case 'left': +// uh-changes end if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) { echo ''; } +// uh-changes start + break; + case 'middle': +// uh-changes end /// Start main column echo ''; +// uh-changes start + break; + case 'right': +// uh-changes end // The right column if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) { echo ''; } +// uh-changes start + break; + } + } +// uh-changes end echo '
'; @@ -75,6 +81,10 @@ echo ''; @@ -260,6 +270,10 @@ echo ''; @@ -267,6 +281,11 @@ echo '
'; ?> diff --git a/index.php b/index.php index 3eb173be3f..4fa2e0191a 100644 --- a/index.php +++ b/index.php @@ -99,13 +99,24 @@ LayoutTable = array('left', 'middle', 'right'); + // $CFG->LayoutTable = array('left', 'right', 'middle'); + // $CFG->LayoutTable = array('middle', 'left', 'right'); + $lt = (empty($THEME->layouttable)) ? array('left', 'middle', 'right') : $THEME->layouttable; + foreach ($lt as $column) { + switch ($column) { + case 'left': +// uh-changes end if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) { echo ''; } - +// uh-changes start + break; + case 'middle': +// uh-changes end echo ''; - +// uh-changes start + break; + case 'right': +// uh-changes end // The right column if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing || has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) { echo ''; } +// uh-changes start + break; + } + } +// uh-changes end ?>
'; blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT); echo ''; @@ -225,7 +236,10 @@ } echo ''; @@ -236,6 +250,11 @@ blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT); echo '