--- loncom/interface/lonprintout.pm 2002/09/12 15:25:49 1.63 +++ loncom/interface/lonprintout.pm 2002/09/16 20:38:46 1.67 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.63 2002/09/12 15:25:49 albertel Exp $ +# $Id: lonprintout.pm,v 1.67 2002/09/16 20:38:46 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -87,7 +87,7 @@ sub menu_for_output { Current document $title_for_single_resource -(you will print what you saw on the screen)
+(prints what you just saw on the screen)
ENDMENUOUT1 if ((not $ENV{'request.role'}=~m/^au\./) and (not $ENV{'request.role'}=~m/^ca\./)) { $r->print(<',$startlink); - my $chunk = substr($map_string,$startlink,$endlink-$startlink+7); - $_ = $chunk; - m/from=\"(\d+)\"/; - push @number_seq,$1; - while ($startlink != -1) { - $endlink = index($map_string,'',$startlink); - $chunk = substr($map_string,$startlink,$endlink-$startlink+7); - substr($map_string,$startlink,$endlink-$startlink+7) = ''; - $_ = $chunk; - m/to=\"(\d+)\"/; - push @number_seq,$1; - $startlink = index($map_string,'from="'.$1.'"',0); - $startlink = rindex($map_string,'',$startlink); - $chunk = substr($map_string,$startlink,$endlink-$startlink+7); - substr($map_string,$startlink,$endlink-$startlink+7) = ''; - $_ = $chunk; - m/from=\"(\d+)\"/; - unshift @number_seq,$1; - $stalink = index($map_string,' to="'.$number_seq[0].'"',0); - } - for (my $i=0;$i<=$#number_seq;$i++) { - $stalink = index($map_string,' id="'.$number_seq[$i].'"',0); - { - my $ahed1 = index($map_string,'src="',$stalink); - my $ahed2 = index($map_string,'',$stalink); - if ($ahed1 != -1) { - if ($ahed1 < $ahed2) { - $startlink = $ahed1; - } else { - $startlink = rindex($map_string,'src="',$stalink); - } - } else { - $startlink = rindex($map_string,'src="',$stalink); - } - - } - $startlink = index($map_string,'"',$startlink); - $endlink = index($map_string,'"',$startlink+1); - $chunk = substr($map_string,$startlink,$endlink-$startlink+1); - push @file_seq,$chunk; - } - return @file_seq; -} - sub details_for_menu { @@ -1055,6 +953,14 @@ sub details_for_menu { sub handler { my $r = shift; + + my $loaderror=&Apache::lonnet::overloaderror($r); + if ($loaderror) { return $loaderror; } + $loaderror= + &Apache::lonnet::overloaderror($r, + $ENV{'course.'.$ENV{'request.course.id'}.'.home'}); + if ($loaderror) { return $loaderror; } + $r->content_type('text/html'); $r->send_http_header; $r->print(&Apache::loncommon::bodytag("Printing"));