--- loncom/interface/lonmenu.pm 2001/06/08 13:02:44 1.5 +++ loncom/interface/lonmenu.pm 2001/10/05 16:49:02 1.9 @@ -5,7 +5,7 @@ # # 05/29/00,05/30 Gerd Kortemeyer) # -# 10/05,05/28,05/30,06/01,06/08 Gerd Kortemeyer +# 10/05,05/28,05/30,06/01,06/08,06/09,07/04,08/07 Gerd Kortemeyer package Apache::lonmenu; @@ -76,7 +76,10 @@ sub rawconfig { my $crs=''; if ($ENV{'request.course.id'}) { $crs='/'.$ENV{'request.course.id'}; - $crs=~s/\_/\//; + if ($ENV{'request.course.sec'}) { + $crs.='_'.$ENV{'request.course.sec'}; + } + $crs=~s/\_/\//g; } my $pub=($ENV{'request.state'} eq 'published'); my $con=($ENV{'request.state'} eq 'construct'); @@ -107,6 +110,15 @@ sub rawconfig { } } elsif ($pro eq 'author') { if ($author) { + if (($prt eq 'rca') && ($ENV{'request.role'}=~/^ca/)) { + my ($cadom,$caname)= + ($ENV{'request.role'}=~/(\w+)\/(\w+)$/); + $output.=switch($caname,$cadom, + $row,$col,$img,$top,$bot,$act); + } elsif ($prt eq 'any') { + $output.=switch($ENV{'user.name'},$ENV{'user.domain'}, + $row,$col,$img,$top,$bot,$act); + } } } } @desklines; @@ -135,16 +147,18 @@ sub footer { # ================================================================ Main Program sub BEGIN { -if ($readdesk ne 'done') { - { - my $config=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}. - '/mydesk.tab'); - while (my $configline=<$config>) { - chomp($configline); - $desklines[$#desklines+1]=$configline; + if ($readdesk) { + if ($readdesk ne 'done') { + { + my $config=Apache::File->new($Apache::lonnet::perlvar{ + 'lonTabDir'}.'/mydesk.tab'); + while (my $configline=<$config>) { + chomp($configline); + $desklines[$#desklines+1]=$configline; + } + } + } } - } -} } 1; __END__