--- loncom/interface/lonmenu.pm 2006/05/08 22:34:01 1.180
+++ loncom/interface/lonmenu.pm 2006/12/06 11:34:37 1.207
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.180 2006/05/08 22:34:01 albertel Exp $
+# $Id: lonmenu.pm,v 1.207 2006/12/06 11:34:37 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -44,12 +44,15 @@ use Apache::lonhtmlcommon();
use Apache::loncommon();
use Apache::lonenc();
use Apache::lonlocal;
+use LONCAPA qw(:DEFAULT :match);
use vars qw(@desklines $readdesk);
my @inlineremote;
+
+
# ================================================================ Little texts
sub initlittle {
@@ -60,8 +63,11 @@ sub initlittle {
'Roles':'Courses'),
'docs' => 'Course Documents',
'exit' => 'Exit',
+ 'login' => 'Log In',
'launch' => 'Launch Remote Control',
- 'groups' => 'Groups');
+ 'groups' => 'Groups',
+ 'gdoc' => 'Group Documents',
+ );
}
# ============================= This gets called at the top of the body section
@@ -83,23 +89,27 @@ sub menubuttons {
my $docs='';
my $groups='';
my $showgroups=0;
- my $escurl=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($env{'request.noversionuri'}));
- my $escsymb=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($env{'request.symb'}));
+ 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 = '
';
if ($env{'request.state'} eq 'construct') {
if (($env{'request.noversionuri'} eq '') || (!defined($env{'request.noversionuri'}))) {
my $returnurl = $env{'request.filename'};
$returnurl =~ s:^/home/([^/]+)/public_html/(.*)$:/priv/$1/$2:;
- $escurl = &Apache::lonnet::escape($returnurl);
+ $escurl = &escape($returnurl);
}
}
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;
}
@@ -109,12 +119,12 @@ sub menubuttons {
# Textual display only
if ($env{'request.course.id'}) {
$navmaps=(<$lt{'nav'}
+$lt{'nav'}
ENDNAV
if (($env{'request.noversionuri'}=~/^\/adm\//) &&
($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) &&
($env{'request.noversionuri'}!~/^\/adm\/.*\/(smppg|bulletinboard|aboutme)(\?|$)/)) {
- my $escreload=&Apache::lonnet::escape('return:');
+ my $escreload=&escape('return:');
$reloadlink=(<$lt{'ret'}
ENDRELOAD
@@ -126,7 +136,7 @@ ENDDOCS
}
if ($showgroups) {
$groups =(<$lt{'groups'}
+$lt{'groups'}
ENDGROUPS
}
}
@@ -163,18 +173,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 (<