From c87b4c876526552102211343573500b2cd817c15 Mon Sep 17 00:00:00 2001 From: nfreear Date: Thu, 13 Apr 2006 14:37:32 +0000 Subject: [PATCH] Clean up code (Bugs 5027, 5161), 'weekscss' course format. --- course/format/weekscss/format.php | 82 ++----------------------------- 1 file changed, 5 insertions(+), 77 deletions(-) diff --git a/course/format/weekscss/format.php b/course/format/weekscss/format.php index f3aa27f462..e7a1e4b739 100644 --- a/course/format/weekscss/format.php +++ b/course/format/weekscss/format.php @@ -28,27 +28,7 @@ require_once("$CFG->dirroot/mod/forum/lib.php"); $week = optional_param('week', -1, PARAM_INT); -/* - // Bounds for block widths; in PIXELS. - define('BLOCK_L_MIN_WIDTH', 100); - define('BLOCK_L_MAX_WIDTH', 210); - define('BLOCK_R_MIN_WIDTH', 100); - define('BLOCK_R_MAX_WIDTH', 210); - - $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); - // 'Answer' in pixels: left 180, right 210. - - //Accessibility: relative block widths to approximate current pixel widths. - // Min/max-width not supported by IE6. - $preferred_width_left = '18%; '; - $preferred_width_right = '18%; '; - $width_center = '60%; '; - $min_max_block= 'min-width:100px; max-width:210px; '; - $min_max_main = 'min-width:25em; max-width:37em; '; //33em -*/ + if ($week != -1) { $displaysection = course_set_display($course->id, $week); } else { @@ -98,7 +78,6 @@ /// The left column ... if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) { - //echo '
'; echo '
'; blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT); echo '
'; @@ -106,14 +85,12 @@ /// The right column, BEFORE the middle-column. if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) { - //echo '
'; echo '
'; blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT); echo '
'; } /// Start main column - //echo '
'; echo '
'; print_heading_block(get_string('weeklyoutline'), 'outline'); @@ -148,9 +125,9 @@ echo format_text($thissection->summary, FORMAT_HTML, $summaryformatoptions); if (isediting($course->id)) { - echo ''.$streditsummary.'

'; + ' class="icon edit" alt="'.$streditsummary.'" />

'; } echo '
'; @@ -160,7 +137,7 @@ print_section_add_menus($course, $section, $modnames); } - echo '
'; //'
 
'; + echo '
'; echo "\n"; } @@ -279,38 +256,7 @@ } } - echo '
'; /*'
'; - - if ($displaysection == $section) { - echo ''. - ''.$strshowallweeks.'
'; - } else { - $strshowonlyweek = get_string("showonlyweek", "", $section); - echo ''. - ''.$strshowonlyweek.'
'; - } - - if (isediting($course->id)) { - if ($thissection->visible) { // Show the hide/show eye - echo ''. - ''.$strweekhide.'
'; - } else { - echo ''. - ''.$strweekhide.'
'; - } - if ($section > 1) { // Add a arrow to move section up - echo ''. - ''.$strmoveup.'
'; - } - - if ($section < $course->numsections) { // Add a arrow to move section down - echo ''. - ''.$strmovedown.'
'; - } - } - - ///echo '
'; - */ + echo ''; echo "\n"; } @@ -328,25 +274,7 @@ echo ''; -/* // The right column - if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing) { - echo '
'; - blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT); - echo '
'; - } - - echo '
'; -*/ echo ''; echo '
'; -if ($CFG->debug > 7) { -?> -

Debug, document.body.clientWidth: - -

- \ No newline at end of file -- 2.39.5