--- loncom/interface/lonmenu.pm 2006/07/31 22:53:07 1.201
+++ loncom/interface/lonmenu.pm 2007/04/13 13:39:32 1.213
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.201 2006/07/31 22:53:07 albertel Exp $
+# $Id: lonmenu.pm,v 1.213 2007/04/13 13:39:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -44,14 +44,15 @@ use Apache::lonhtmlcommon();
use Apache::loncommon();
use Apache::lonenc();
use Apache::lonlocal;
-use lib '/home/httpd/lib/perl/';
-use LONCAPA;
+use LONCAPA qw(:DEFAULT :match);
-use vars qw(@desklines $readdesk);
+use vars qw(@desklines %category_names %category_members %category_positions $readdesk);
my @inlineremote;
+
+
# ================================================================ Little texts
sub initlittle {
@@ -62,6 +63,7 @@ sub initlittle {
'Roles':'Courses'),
'docs' => 'Course Documents',
'exit' => 'Exit',
+ 'login' => 'Log In',
'launch' => 'Launch Remote Control',
'groups' => 'Groups',
'gdoc' => 'Group Documents',
@@ -176,8 +178,8 @@ ENDMAINMENU
$logo
|
-
- $lt{'exit'}
+ |
+ $lt{'login'}
|
@@ -405,7 +407,7 @@ sub innerregister {
my $desc = "Enter my resource construction space";
# Set defaults for co-authors
if ($env{'request.role'} =~ /^ca/) {
- ($cadom,$caname)=($env{'request.role'}=~/(\w+)\/(\w+)$/);
+ ($cadom,$caname)=($env{'request.role'}=~/($match_domain)\/($match_username)$/);
($top,$bottom) = ('co con-','struct');
$action = "go('/priv/".$caname."');";
$desc = "Enter construction space as co-author";
@@ -427,7 +429,7 @@ sub innerregister {
my $cfudom='';
if ($env{'request.filename'}) {
my $file=&Apache::lonnet::declutter($env{'request.filename'});
- $file=~s/^(\w+)\/(\w+)/\/priv\/$2/;
+ $file=~s/^($match_domain)\/($match_username)/\/priv\/$2/;
# Check that the user has permission to edit this resource
($cfuname,$cfudom)=&Apache::loncacc::constructaccess($file,$1);
if (defined($cfudom)) {
@@ -443,7 +445,7 @@ sub innerregister {
# Finally, turn the button on or off
if ($cfile && !$const_space) {
$editbutton=&switch
- ('','',6,1,'cstr.gif','edit[_1]','resource[_2]',
+ ('','',6,1,'pcstr.gif','edit[_1]','resource[_2]',
"go('".$cfile."');","Edit this resource");
} elsif ($editbutton eq '') {
$editbutton=&clear(6,1);
@@ -462,26 +464,27 @@ sub innerregister {
} else {
$currdir =~ s#[^/]+$##;
my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn);
+ my $esc_currdir = &Apache::loncommon::escape_single($currdir);
$menuitems=(<'.$text.'';
} else {
- $inlineremote[10*$row+$col]="\n
".
+ $inlineremote[$idx]="\n
".
$desc.' '.$text.'';
}
} else {
# Inline Remote
+ if ($env{'environment.icons'} ne 'classic') {
+ $img=~s/\.gif$/\.png/;
+ }
if ($nobreak==2) { return ''; }
my $text=$top.' '.$bot;
$text=~s/\s*\-\s*//gs;
@@ -844,17 +858,17 @@ sub switch {
if ($env{'browser.interface'} eq 'faketextual') {
# Accessibility
if ($nobreak==3) {
- $inlineremote[10*$row+$col]="\n".
+ $inlineremote[$idx]="\n".
'';
} elsif ($nobreak) {
- $inlineremote[10*$row+$col]="\n".
+ $inlineremote[$idx]="\n
".
'
';
} else {
- $inlineremote[10*$row+$col]="\n
".
+ $inlineremote[$idx]="\n
".
'