--- loncom/interface/lonmenu.pm 2009/07/21 14:36:08 1.276 +++ loncom/interface/lonmenu.pm 2009/08/06 04:09:45 1.278 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.276 2009/07/21 14:36:08 droeschl Exp $ +# $Id: lonmenu.pm,v 1.278 2009/08/06 04:09:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -299,8 +299,8 @@ ENDCRELOAD my $helplink = &Apache::loncommon::top_nav_help('Help'); return (< -// BEGIN LON-CAPA Internal // @@ -357,8 +357,14 @@ sub registerurl { (!&Apache::lonnet::is_on_map( &unescape($env{'request.noversionuri'})))) && (!$forcereg))) { - return $result. - ''.$force_title; + return + $result + .'' + .$force_title; } # Graphical display after login only if ($env{'request.registered'} && !$forcereg) { return ''; } @@ -712,6 +718,7 @@ ENDREGTEXT $result = (< +// ENDREGTHIS } @@ -762,6 +770,7 @@ ENDDONOTREGTEXT $result = (< +// ENDDONOTREGTHIS } @@ -856,6 +866,7 @@ sub startupremote { my $message=&mt('"Waiting for Remote Control window to load: "+[_1]','waited'); return(< +// ENDREMOTESTARTUP } @@ -913,8 +925,10 @@ ENDREMOTESTARTUP sub setflags() { return(< +// ENDSETFLAGS } @@ -923,7 +937,9 @@ sub maincall() { if ($env{'environment.remote'} eq 'off') { return ''; } return(< +// ENDMAINCALL } @@ -965,7 +981,12 @@ sub reopenmenu { sub open { my $returnval=''; if ($env{'environment.remote'} eq 'off') { - return ''; + return + ''; } my $menuname = &get_menu_name(); @@ -978,11 +999,13 @@ sub open { #} #ENDRESIZE # } - $returnval.=(< ENDOPEN return ''; } @@ -1248,9 +1271,16 @@ sub rawconfig { $output.=&clear($row,$col); next; } - } elsif ($prt eq 'reqcrs') { + } elsif (($prt eq 'reqcrsnsc') || ($prt eq 'reqcrsshc')) { + next if (&Apache::lonnet::allowed('mky',$requested_domain)); + if (($prt eq 'reqcrsnsc') && ($show_course)) { + next; + } + if (($prt eq 'reqcrsshc') && (!$show_course)) { + next; + } my $showreqcrs = 0; - foreach my $type ('official','unofficial') { + foreach my $type ('official','unofficial','community') { if (&Apache::lonnet::usertools_access($env{'user.name'}, $env{'user.domain'}, $type,undef,'requestcourses')) { @@ -1285,6 +1315,7 @@ sub close { my $menuname = &get_menu_name(); return(< +// ENDCLOSE }