--- loncom/interface/lonmenu.pm 2006/07/31 22:53:07 1.201
+++ 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.201 2006/07/31 22:53:07 albertel Exp $
+# $Id: lonmenu.pm,v 1.207 2006/12/06 11:34:37 foxr 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);
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)) {
@@ -470,8 +472,8 @@ s&7&1&del.gif&delete[_1]&resource[_2]&go
s&7&2&prt.gif&prepare[_1]&printout[_1]&gocstr('/adm/printout','/~$uname/$cleandisfn')&Prepare a printable document
ENDMENUITEMS
}
- } elsif (defined($env{'request.course.id'}) &&
- $env{'request.symb'} ne '') {
+ } elsif ( defined($env{'request.course.id'}) &&
+ $env{'request.symb'} ne '' ) {
$menuitems=(< {
'onload' => 'javascript:document.goannotate.submit();'}});
+ my $end_page_annotate =
+ &Apache::loncommon::end_page({'js_ready' => 1});
+
my $start_page_bookmark =
&Apache::loncommon::start_page('Bookmarks',undef,
{'only_body' => 1,
'js_ready' => 1,
'bgcolor' => '#BBBBBB',});
- my $end_page =
+ my $end_page_bookmark =
&Apache::loncommon::end_page({'js_ready' => 1});
return (<"
+""
+"<\\/form>"
- +'$end_page');
+ +'$end_page_annotate');
annotator.document.close();
}
@@ -1217,7 +1227,7 @@ function set_bookmark() {
+"value='Save' /> <\\/center><\\/td>"
+"<\\/tr><\\/table><\\/form><\\/center>"
- +'$end_page' );
+ +'$end_page_bookmark' );
bmquery.document.close();
}