--- loncom/interface/lonmenu.pm 2006/06/28 20:56:00 1.187 +++ loncom/interface/lonmenu.pm 2006/08/14 09:11:55 1.203 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.187 2006/06/28 20:56:00 albertel Exp $ +# $Id: lonmenu.pm,v 1.203 2006/08/14 09:11:55 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -52,6 +52,8 @@ use vars qw(@desklines $readdesk); my @inlineremote; + + # ================================================================ Little texts sub initlittle { @@ -62,10 +64,10 @@ sub initlittle { 'Roles':'Courses'), 'docs' => 'Course Documents', 'exit' => 'Exit', + 'login' => 'Log In', 'launch' => 'Launch Remote Control', - 'groups' => 'Course Groups', + 'groups' => 'Groups', 'gdoc' => 'Group Documents', - 'teams' => 'Teams', ); } @@ -91,6 +93,10 @@ sub menubuttons { my $escurl=&escape(&Apache::lonenc::check_encrypt($env{'request.noversionuri'})); my $escsymb=&escape(&Apache::lonenc::check_encrypt($env{'request.symb'})); + my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif"); + $logo = 'LON-CAPA Logo'; + if ($env{'request.state'} eq 'construct') { if (($env{'request.noversionuri'} eq '') || (!defined($env{'request.noversionuri'}))) { my $returnurl = $env{'request.filename'}; @@ -100,11 +106,11 @@ sub menubuttons { } if ($env{'request.course.id'}) { my %coursegroups; - my $viewgrps_permission = - &Apache::lonnet::allowed('vcg',$env{'request.course.id'}); + my $viewgrps_permission = + &Apache::lonnet::allowed('vcg',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')); if (!$viewgrps_permission) { %coursegroups = &Apache::lonnet::get_active_groups($env{'user.domain'},$env{'user.name'},$env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'}); - } + } if ((keys(%coursegroups) > 0) || ($viewgrps_permission)) { $showgroups = 1; } @@ -131,7 +137,7 @@ ENDDOCS } if ($showgroups) { $groups =(<$lt{'groups'} +$lt{'groups'} ENDGROUPS } } @@ -168,18 +174,15 @@ ENDMAINMENU my $vlink=&Apache::loncommon::designparm($function.'.vlink',$domain); my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain); if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') { - my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif"); return (< - - $lt{'exit'} + $logo + + + $lt{'login'} - - Logo - LON-CAPA  - - + ENDINLINEMENU @@ -202,9 +205,8 @@ my $is_group = (&Apache::loncommon::cour ENDDOCS } if ($showgroups) { - my $text = ($is_group) ? $lt{'teams'} : $lt{'groups'}; $groups =(<$text +$lt{'groups'} ENDGROUPS } if ( @@ -235,11 +237,12 @@ ENDCRELOAD } my $form=&serverform(); my $utility=&utilityfunctions(); - my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif"); my $remote; if ($env{'user.adv'}) { $remote = ''.$lt{'launch'}.'' } + + my $helplink=&Apache::loncommon::top_nav_help('Help'); return (< // BEGIN LON-CAPA Internal @@ -249,6 +252,7 @@ $utility +$logo $reloadlink $navmaps @@ -256,8 +260,8 @@ $docs $groups $remote - - + +
$lt{'main'}$lt{'roles'}$lt{'exit'}$helplink$lt{'exit'}
$form @@ -386,7 +390,7 @@ sub innerregister { &Apache::lonnet::allowed('opa',$crs)) { $hwkadd.=&switch('','',7,3,'pparm.gif','problem[_2]','parms[_2]', "gocmd('/adm/parmset','set')", - 'Modify deadlines, etc, for this resource'); + 'Modify parameter settings for this resource'); } # -- End Homework ### @@ -445,10 +449,7 @@ sub innerregister { ('','',6,1,'cstr.gif','edit[_1]','resource[_2]', "go('".$cfile."');","Edit this resource"); } elsif ($editbutton eq '') { - $editbutton=&switch('','',6,1,'port.gif', - 'port-[_1]','folio[_1]', - "go('/adm/portfolio');", - "Enter my portfolio space"); + $editbutton=&clear(6,1); } } ### @@ -463,16 +464,17 @@ sub innerregister { $is_const_dir = 1; } else { $currdir =~ s#[^/]+$##; + my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn); $menuitems=(< // BEGIN LON-CAPA Internal @@ -780,7 +790,7 @@ ENDRESIZE $returnval.=(<'.$returnval.'';