// format.php - course format featuring social forum
// included from view.php
+ if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ }
+
// Bounds for block widths
// more flexible for theme designers taken from theme config.php
$lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width;
if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
echo '<td style="width:'.$preferred_width_left.'px" id="left-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
- echo '<td id="middle-column"><a name="startofcontent"></a>';
+ echo '<td id="middle-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
+ echo '<a name="startofcontent"></a>';
if ($forum = forum_get_course_forum($course->id, 'social')) {
print_heading_block(get_string('socialheadline'));
if (forum_is_forcesubscribed($forum->id)) {
} else {
notify('Could not find or create a social forum here');
}
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
// The right column
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) {
echo '<td style="width:'.$preferred_width_right.'px" id="right-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
require_once($CFG->libdir.'/ajax/ajaxlib.php');
+
+ if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ }
$topic = optional_param('topic', -1, PARAM_INT);
if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
echo '<td style="width:'.$preferred_width_left.'px" id="left-column">';
- if (!empty($THEME->roundcorners)) {
- echo '<div class="bt"><div></div></div>';
- echo '<div class="i1"><div class="i2"><div class="i3">';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
- if (!empty($THEME->roundcorners)) {
- echo '</div></div></div>';
- echo '<div class="bb"><div></div></div>';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
case 'middle':
/// Start main column
echo '<td id="middle-column">';
- if (!empty($THEME->roundcorners)) {
- echo '<div class="bt"><div></div></div>';
- echo '<div class="i1"><div class="i2"><div class="i3">';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
echo '<a name="startofcontent"></a>';
print_heading_block(get_string('topicoutline'), 'outline');
echo '</div>';
}
- if (!empty($THEME->roundcorners)) {
- echo '</div></div></div>';
- echo '<div class="bb"><div></div></div>';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
break;
// The right column
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) {
echo '<td style="width:'.$preferred_width_right.'px" id="right-column">';
- if (!empty($THEME->roundcorners)) {
- echo '<div class="bt"><div></div></div>';
- echo '<div class="i1"><div class="i2"><div class="i3">';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
- if (!empty($THEME->roundcorners)) {
- echo '</div></div></div>';
- echo '<div class="bb"><div></div></div>';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
// Included from "view.php"
require_once($CFG->libdir.'/ajax/ajaxlib.php');
+
+ if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ }
$week = optional_param('week', -1, PARAM_INT);
if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
echo '<td style="width:'.$preferred_width_left.'px" id="left-column">';
- if (!empty($THEME->roundcorners)) {
- echo '<div class="bt"><div></div></div>';
- echo '<div class="i1"><div class="i2"><div class="i3">';
- }
-
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
-
- if (!empty($THEME->roundcorners)) {
- echo '</div></div></div>';
- echo '<div class="bb"><div></div></div>';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
/// Start main column
echo '<td id="middle-column">';
- if (!empty($THEME->roundcorners)) {
- echo '<div class="bt"><div></div></div>';
- echo '<div class="i1"><div class="i2"><div class="i3">';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
echo '<a name="startofcontent"></a>';
echo '</div>';
}
- if (!empty($THEME->roundcorners)) {
- echo '</div></div></div>';
- echo '<div class="bb"><div></div></div>';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) {
echo '<td style="width: '.$preferred_width_right.'px;" id="right-column">';
- if (!empty($THEME->roundcorners)) {
- echo '<div class="bt"><div></div></div>';
- echo '<div class="i1"><div class="i2"><div class="i3">';
- }
-
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
-
- if (!empty($THEME->roundcorners)) {
- echo '</div></div></div>';
- echo '<div class="bb"><div></div></div>';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
function admin_externalpage_print_header() {
global $CFG, $PAGE, $SITE, $THEME;
+
+ if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ }
define('ADMIN_EXT_HEADER_PRINTED', 'true');
$PAGE->print_header();
echo '<table id="layout-table" summary=""><tr>';
echo '<td style="width: ' . $preferred_width_left . 'px;" id="left-column">';
- if (!empty($THEME->roundcorners)) {
- echo '<div class="bt"><div></div></div>';
- echo '<div class="i1"><div class="i2"><div class="i3">';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
- if (!empty($THEME->roundcorners)) {
- echo '</div></div></div>';
- echo '<div class="bb"><div></div></div>';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
echo '<td id="middle-column">';
- if (!empty($THEME->roundcorners)) {
- echo '<div class="bt"><div></div></div>';
- echo '<div class="i1"><div class="i2"><div class="i3">';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
} else {
print_header();
}
function admin_externalpage_print_footer() {
global $CFG, $PAGE, $SITE, $THEME;
-
+
+ if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ }
+
define('ADMIN_EXT_FOOTER_PRINTED', 'true');
if (!empty($SITE->fullname)) {
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH,
blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
BLOCK_R_MAX_WIDTH);
- if (!empty($THEME->roundcorners)) {
- echo '</div></div></div>';
- echo '<div class="bb"><div></div></div>';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT)) {
echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
- if (!empty($THEME->roundcorners)) {
- echo '<div class="bt"><div></div></div>';
- echo '<div class="i1"><div class="i2"><div class="i3">';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
- if (!empty($THEME->roundcorners)) {
- echo '</div></div></div>';
- echo '<div class="bb"><div></div></div>';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
echo '</tr></table>';
function print_side_block_start($heading='', $attributes = array()) {
global $CFG, $THEME;
-
+
+ if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ }
+
// If there are no special attributes, give a default CSS class
if (empty($attributes) || !is_array($attributes)) {
$attributes = array('class' => 'sideblock');
//Accessibility: replaced <div> with H2; no, H2 more appropriate in moodleblock.class.php: _title_html.
// echo '<div class="header">'.$heading.'</div>';
echo '<div class="header">';
- if (!empty($THEME->roundcorners)) {
- echo '<div class="bt"><div></div></div>';
- echo '<div class="i1"><div class="i2"><div class="i3">';
- }
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
echo $heading;
- if (!empty($THEME->roundcorners)) {
+ if (!empty($THEME->customcorners)) {
echo '</div></div></div>';
}
echo '</div>';
} else {
- if (!empty($THEME->roundcorners)) {
+ if (!empty($THEME->customcorners)) {
echo '<div class="bt"><div></div></div>';
}
}
- if (!empty($THEME->roundcorners)) {
+ if (!empty($THEME->customcorners)) {
echo '<div class="i1"><div class="i2"><div class="i3">';
}
echo '<div class="content">';
*/
function print_side_block_end($attributes = array()) {
global $CFG, $THEME;
-
+
echo '</div>';
- if (!empty($THEME->roundcorners)) {
- echo '</div></div></div>';
- echo '<div class="bb"><div></div></div>';
+ if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ print_custom_corners_end();
}
echo '</div>';
echo "<!-- $file at line $line -->\n";
}
}
+
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
?>
\ No newline at end of file
require_once('lib.php');
require_once($CFG->libdir.'/blocklib.php');
require_once('pagelib.php');
+
+ if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ }
$id = optional_param('id', 0, PARAM_INT);
$c = optional_param('c', 0, PARAM_INT);
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">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
echo '<td id="middle-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
if ($chat->studentlogs or has_capability('mod/chat:readlog',$context)) {
echo '<div class="reportlink">';
/// Finish the page
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td></tr></table>';
print_footer($course);
require_once('pagelib.php');
+ if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ }
+
/// One of these is necessary!
$id = optional_param('id', 0, PARAM_INT); // course module id
echo '<table id="layout-table"><tr>';
if ((blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing())) {
echo '<td style="width: '.$blocks_preferred_width.'px;" id="left-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
echo '<td id="middle-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
}
print_heading(format_string($data->name));
/// If we have blocks, then print the left side here
if (!empty($CFG->showblocksonmodpages)) {
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>'; // Middle column
if ((blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $PAGE->user_is_editing())) {
echo '<td style="width: '.$blocks_preferred_width.'px;" id="right-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
echo '</tr></table>';
require_once("locallib.php");
require_once($CFG->libdir.'/blocklib.php');
require_once('pagelib.php');
+
+ if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ }
$id = optional_param('id', 0, PARAM_INT); // Course Module ID, or
$q = optional_param('q', 0, PARAM_INT); // quiz ID
// if no questions have been set up yet redirect to edit.php
if (!$quiz->questions and has_capability('mod/quiz:manage', $context)) {
- redirect('edit.php?quizid='.$quiz->id);
+ redirect('edit.php?cmid='.$cm->id);
}
add_to_log($course->id, "quiz", "view", "view.php?id=$cm->id", $quiz->id, $cm->id);
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">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
echo '<td id="middle-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
// Print the main part of the page
// Should we not be seeing if we need to print right-hand-side blocks?
// Finish the page.
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td></tr></table>';
print_footer($course);
}
}
+if (!empty($THEME->customcorners)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+}
+
/**
* resource_base is the base class for resource types
*
if((blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $PAGE->user_is_editing())) {
echo '<td style="width: '.$blocks_preferred_width.'px;" id="left-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}
echo '<td id="middle-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
echo '<div id="resource">';
}
$blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 210);
echo '</div>';
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
if((blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $PAGE->user_is_editing())) {
echo '<td style="width: '.$blocks_preferred_width.'px;" id="right-column">';
+ if (!empty($THEME->customcorners)) print_custom_corners_start();
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
+ if (!empty($THEME->customcorners)) print_custom_corners_end();
echo '</td>';
}