--- loncom/interface/lonmenu.pm 2007/08/30 23:00:41 1.226 +++ loncom/interface/lonmenu.pm 2007/10/11 22:49:49 1.228 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.226 2007/08/30 23:00:41 albertel Exp $ +# $Id: lonmenu.pm,v 1.228 2007/10/11 22:49:49 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -121,9 +121,7 @@ sub menubuttons { $navmaps=(<$lt{'nav'} ENDNAV - if (($env{'request.noversionuri'}=~/^\/adm\//) && - ($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) && - ($env{'request.noversionuri'}!~/^\/adm\/.*\/(smppg|bulletinboard|aboutme)(\?|$)/)) { + if (&show_return_link()) { my $escreload=&escape('return:'); $reloadlink=(<$lt{'ret'} @@ -196,7 +194,7 @@ ENDINLINEMENU $navmaps=(<$lt{'nav'} ENDNAV -my $is_group = (&Apache::loncommon::course_type() eq 'Group'); + my $is_group = (&Apache::loncommon::course_type() eq 'Group'); if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { my $text = ($is_group) ? $lt{'gdoc'} : $lt{'docs'}; $docs=(<$lt{'groups'} ENDGROUPS } - if ( - ($env{'request.noversionuri'}=~m[^/(res|public)/] && - $env{'request.symb'} eq '') - || - (($env{'request.noversionuri'}=~/^\/adm\//) && - ($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) && - ($env{'request.noversionuri'}!~ - m[^/adm/.*/(smppg|bulletinboard|aboutme)($|\?)]) - ) - ) { + foreach my $key (sort(keys(%env))) { + next if ($key !~ /^request/); + &Apache::lonnet::logthis("$key =>".$env{$key}); + } + if (&show_return_link()) { my $escreload=&escape('return:'); $reloadlink=(<$lt{'ret'} @@ -274,6 +267,19 @@ ENDINLINEMENU } } +sub show_return_link { + return (($env{'request.noversionuri'}=~m{^/(res|public)/} && + $env{'request.symb'} eq '') + || + ($env{'request.noversionuri'}=~ m{^/cgi-bin/printout.pl}) + || + (($env{'request.noversionuri'}=~/^\/adm\//) && + ($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) && + ($env{'request.noversionuri'}!~ + m[^/adm/.*/(smppg|bulletinboard|aboutme)($|\?)]) + )); +} + # ====================================== This gets called in the header section sub registerurl { @@ -573,8 +579,8 @@ ENDLINE $timesync $tablestart $inlinebuttons -$newmail $tableend +$newmail 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.