dirroot/mod/forum/lib.php"); require_once($CFG->libdir.'/ajax/ajaxlib.php'); $week = optional_param('week', -1, PARAM_INT); // 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; $lmax = (empty($THEME->block_l_max_width)) ? 210 : $THEME->block_l_max_width; $rmin = (empty($THEME->block_r_min_width)) ? 100 : $THEME->block_r_min_width; $rmax = (empty($THEME->block_r_max_width)) ? 210 : $THEME->block_r_max_width; define('BLOCK_L_MIN_WIDTH', $lmin); define('BLOCK_L_MAX_WIDTH', $lmax); define('BLOCK_R_MIN_WIDTH', $rmin); define('BLOCK_R_MAX_WIDTH', $rmax); $preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]), BLOCK_L_MAX_WIDTH); $preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), BLOCK_R_MAX_WIDTH); if ($week != -1) { $displaysection = course_set_display($course->id, $week); } else { if (isset($USER->display[$course->id])) { $displaysection = $USER->display[$course->id]; } else { $displaysection = course_set_display($course->id, 0); } } if ($course->newsitems) { $news = forum_get_course_forum($course->id, 'news'); } $streditsummary = get_string('editsummary'); $stradd = get_string('add'); $stractivities = get_string('activities'); $strshowallweeks = get_string('showallweeks'); $strweek = get_string('week'); $strgroups = get_string('groups'); $strgroupmy = get_string('groupmy'); $editing = $PAGE->user_is_editing(); if ($editing) { $strstudents = moodle_strtolower($course->students); $strweekhide = get_string('weekhide', '', $strstudents); $strweekshow = get_string('weekshow', '', $strstudents); $strmoveup = get_string('moveup'); $strmovedown = get_string('movedown'); } $context = get_context_instance(CONTEXT_COURSE, $course->id); /// Layout the whole page as three big columns. echo '
| ';
if (!empty($THEME->roundcorners)) {
echo ' ';
echo ' ';
}
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
if (!empty($THEME->roundcorners)) {
echo ' ';
}
echo ' | ';
}
break;
case 'middle':
/// Start main column
echo '';
if (!empty($THEME->roundcorners)) {
echo ' ';
echo ' ';
}
echo '';
print_heading_block(get_string('weeklyoutline'), 'outline');
echo '
';
}
echo ' | ';
break;
case 'right':
// The right column
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) {
echo '';
if (!empty($THEME->roundcorners)) {
echo ' ';
echo ' ';
}
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
if (!empty($THEME->roundcorners)) {
echo ' ';
}
echo ' | ';
}
break;
}
}
echo '|||||||||||||||