From 01e1f34e1665f1a25cd98551ba523df872e27df4 Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 7 Apr 2008 12:16:10 +0000 Subject: [PATCH] MDL-14240 reverting previous commit --- course/format/weeks/format.php | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/course/format/weeks/format.php b/course/format/weeks/format.php index 23923123e2..7ad603e2d4 100644 --- a/course/format/weeks/format.php +++ b/course/format/weeks/format.php @@ -29,29 +29,6 @@ $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); - - // some defines for time periods (all are seconds) - define( 'SECONDS_ONEWEEK', 604800 ); - define( 'SECONDS_SIXDAYS', 518400 ); - define( 'SECONDS_TWOHOURS', 7200 ); - - - $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 { @@ -173,10 +150,10 @@ $timenow = time(); $weekdate = $course->startdate; // this should be 0:00 Monday of that week - $weekdate += SECONDS_TWOHOURS; // Add two hours to avoid possible DST problems + $weekdate += 7200; // Add two hours to avoid possible DST problems $section = 1; $sectionmenu = array(); - $weekofseconds = SECONDS_ONEWEEK; + $weekofseconds = 604800; $course->enddate = $course->startdate + ($weekofseconds * $course->numsections); $strftimedateshort = ' '.get_string('strftimedateshort'); @@ -185,7 +162,7 @@ $nextweekdate = $weekdate + ($weekofseconds); $weekday = userdate($weekdate, $strftimedateshort); - $endweekday = userdate($weekdate+SECONDS_SIXDAYS, $strftimedateshort); + $endweekday = userdate($weekdate+518400, $strftimedateshort); if (!empty($sections[$section])) { $thissection = $sections[$section]; -- 2.39.5