--- loncom/interface/lonmenu.pm 2006/07/14 19:49:46 1.196
+++ 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.196 2006/07/14 19:49:46 www 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' => '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 = '
| ';
+
if ($env{'request.state'} eq 'construct') {
if (($env{'request.noversionuri'} eq '') || (!defined($env{'request.noversionuri'}))) {
my $returnurl = $env{'request.filename'};
@@ -101,7 +107,7 @@ sub menubuttons {
if ($env{'request.course.id'}) {
my %coursegroups;
my $viewgrps_permission =
- &Apache::lonnet::allowed('vcg',$env{'request.course.id'});
+ &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'});
}
@@ -129,11 +135,11 @@ ENDRELOAD
$lt{'docs'}
ENDDOCS
}
-# if ($showgroups) {
-# $groups =(<$lt{'groups'}
-#ENDGROUPS
-# }
+ if ($showgroups) {
+ $groups =(<$lt{'groups'}
+ENDGROUPS
+ }
}
my $form=&serverform();
my $utility=&utilityfunctions();
@@ -168,14 +174,14 @@ 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'}
|
- LON-CAPA |
@@ -198,12 +204,11 @@ my $is_group = (&Apache::loncommon::cour
$text |
ENDDOCS
}
-# if ($showgroups) {
-# my $text = ($is_group) ? $lt{'teams'} : $lt{'groups'};
-# $groups =(<$text
-#ENDGROUPS
-# }
+ if ($showgroups) {
+ $groups =(<$lt{'groups'}
+ENDGROUPS
+ }
if (
($env{'request.noversionuri'}=~m[^/(res|public)/] &&
$env{'request.symb'} eq '')
@@ -232,18 +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 $helptopic='Student_Intro';
- if ($env{'request.role'}=~/^(ca|au)/) {
- $helptopic='Authoring_Intro';
- } elsif ($env{'request.role'}=~/^cc/) {
- $helptopic='Course_Coordination_Intro';
- }
- my $helplink=&Apache::loncommon::help_open_topic($helptopic,'Help');
+
+ my $helplink=&Apache::loncommon::top_nav_help('Help');
return (<
// BEGIN LON-CAPA Internal
@@ -253,8 +252,7 @@ $utility
$form
@@ -466,16 +464,17 @@ sub innerregister {
$is_const_dir = 1;
} else {
$currdir =~ s#[^/]+$##;
+ my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn);
$menuitems=(<
// BEGIN LON-CAPA Internal