]> git.mjollnir.org Git - moodle.git/commitdiff
'changes for flexible column arrangement - see MDL-8109'
authorurs_hunkler <urs_hunkler>
Mon, 8 Jan 2007 15:53:34 +0000 (15:53 +0000)
committerurs_hunkler <urs_hunkler>
Mon, 8 Jan 2007 15:53:34 +0000 (15:53 +0000)
course/format/topics/format.php
index.php

index 7485e77a72f6da31b3ebbfc59d713cdc58990a1c..0ce43b3d6bae76db279f7fa3508ee246f970284f 100644 (file)
     echo '<table id="layout-table" cellspacing="0"><tr>';
 
 /// 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 '<td style="width:'.$preferred_width_left.'px" id="left-column">';
         echo '</td>';
     }
 
+// uh-changes start
+            break;
+            case 'middle':
+// uh-changes end
 /// Start main column
     echo '<td id="middle-column"><a name="startofcontent"></a>';
 
 
     echo '</td>';
 
+// uh-changes start
+            break;
+            case 'right':
+// uh-changes end
     // The right column
     if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) {
         echo '<td style="width:'.$preferred_width_right.'px" id="right-column">';
         echo '</td>';
     }
 
+// uh-changes start
+            break;
+        }
+    }
+// uh-changes end
     echo '</tr></table>';
     
 ?>
index 3eb173be3f0d106bac1faa8be43ca30af770c4a5..4fa2e0191a17cab917e78ca67e0aa70f7c4d4a44 100644 (file)
--- a/index.php
+++ b/index.php
 <table id="layout-table" summary="">
   <tr>
   <?php
-
+// uh-changes start
+    // $CFG->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 '<td style="width: '.$preferred_width_left.'px;" id="left-column">';
         blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
         echo '</td>';
     }
-
+// uh-changes start
+            break;
+            case 'middle':
+// uh-changes end
     echo '<td id="middle-column">';
 
 
     }
 
     echo '</td>';
-
+// 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 '<td style="width: '.$preferred_width_right.'px;" id="right-column">';
         blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
         echo '</td>';
     }
+// uh-changes start
+            break;
+        }
+    }
+// uh-changes end
 ?>
 
   </tr>