dirroot/mod/forum/lib.php"); require_once("$CFG->dirroot/mod/resource/lib.php"); // Bounds for block widths define('BLOCK_L_MIN_WIDTH', 100); define('BLOCK_L_MAX_WIDTH', 210); define('BLOCK_R_MIN_WIDTH', 100); define('BLOCK_R_MAX_WIDTH', 210); optional_variable($preferred_width_left, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT])); optional_variable($preferred_width_right, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT])); $preferred_width_left = min($preferred_width_left, BLOCK_L_MAX_WIDTH); $preferred_width_left = max($preferred_width_left, BLOCK_L_MIN_WIDTH); $preferred_width_right = min($preferred_width_right, BLOCK_R_MAX_WIDTH); $preferred_width_right = max($preferred_width_right, BLOCK_R_MIN_WIDTH); $strgroups = get_string("groups"); $strgroupmy = get_string("groupmy"); $editing = isediting($course->id); echo '
| '; blocks_print_group($PAGE, $pageblocks[BLOCK_POS_LEFT]); echo ' | '; } echo '';
if ($social = forum_get_course_forum($course->id, "social")) {
if (forum_is_subscribed($USER->id, $social->id)) {
$subtext = get_string("unsubscribe", "forum");
} else {
$subtext = get_string("subscribe", "forum");
}
$headertext = "
![]() "; forum_print_latest_discussions($social->id, 10, "plain", "", false); } else { notify("Could not find or create a social forum here"); } echo ' | ';
// The right column
if(blocks_have_content($pageblocks[BLOCK_POS_RIGHT]) || $editing) {
echo ''; blocks_print_group($PAGE, $pageblocks[BLOCK_POS_RIGHT]); if ($editing) { blocks_print_adminblock($PAGE, $pageblocks); } echo ' | '; } echo '