diff -urN moodle/lib/blocklib.php moodle+print/lib/blocklib.php --- moodle/lib/blocklib.php 2007-05-19 02:48:14.000000000 +0000 +++ moodle+print/lib/blocklib.php 2007-06-15 07:51:26.000000000 +0000 @@ -254,6 +254,10 @@ function blocks_print_group(&$page, &$pageblocks, $position) { global $COURSE; + // PETER + // Simply return if PRINT is set. That seems to prevent blocks from displaying. + if( isset( $_REQUEST['PRINT'] ) ) return; + if(empty($pageblocks[$position])) { $pageblocks[$position] = array(); $maxweight = 0; diff -urN moodle/lib/weblib.php moodle+print/lib/weblib.php --- moodle/lib/weblib.php 2007-05-24 02:59:48.000000000 +0000 +++ moodle+print/lib/weblib.php 2007-06-15 07:53:37.000000000 +0000 @@ -2720,6 +2720,11 @@ } $CFG->stylesheets[] = $CFG->themewww.'/'.$theme.'/styles.php'.$paramstring; + // PETER + // Pull in the stylesheet that hides some page elements, if PRINT is set. + if( isset( $_REQUEST['PRINT'] ) ) + $CFG->stylesheets[] = $CFG->themewww .'/print.css'; + /// We have to change some URLs in styles if we are in a $HTTPSPAGEREQUIRED page if (!empty($HTTPSPAGEREQUIRED)) { $CFG->themewww = str_replace('http:', 'https:', $CFG->themewww); @@ -2799,7 +2804,13 @@ $loggedinas = get_string('loggedinnot', 'moodle'). " (frametarget href=\"$wwwroot/login/index.php\">".get_string('login').')'; } - return '