Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
d55c9a1f
Commit
d55c9a1f
authored
Jan 08, 2007
by
urs_hunkler
Browse files
'changes for flexible column arrangement - see MDL-8109'
parent
86aab05c
Changes
2
Hide whitespace changes
Inline
Side-by-side
course/format/topics/format.php
View file @
d55c9a1f
...
...
@@ -68,6 +68,12 @@
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">'
;
...
...
@@ -75,6 +81,10 @@
echo
'</td>'
;
}
// uh-changes start
break
;
case
'middle'
:
// uh-changes end
/// Start main column
echo
'<td id="middle-column"><a name="startofcontent"></a>'
;
...
...
@@ -260,6 +270,10 @@
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">'
;
...
...
@@ -267,6 +281,11 @@
echo
'</td>'
;
}
// uh-changes start
break
;
}
}
// uh-changes end
echo
'</tr></table>'
;
?>
index.php
View file @
d55c9a1f
...
...
@@ -99,13 +99,24 @@
<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">'
;
...
...
@@ -225,7 +236,10 @@
}
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">'
;
...
...
@@ -236,6 +250,11 @@
blocks_print_group
(
$PAGE
,
$pageblocks
,
BLOCK_POS_RIGHT
);
echo
'</td>'
;
}
// uh-changes start
break
;
}
}
// uh-changes end
?>
</tr>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment