--- loncom/interface/lonmenu.pm 2004/11/11 22:47:55 1.127 +++ loncom/interface/lonmenu.pm 2004/11/13 21:07:19 1.129 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.127 2004/11/11 22:47:55 albertel Exp $ +# $Id: lonmenu.pm,v 1.129 2004/11/13 21:07:19 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -98,13 +98,13 @@ ENDRELOAD } my $utility=&utilityfunctions(); my $output=(< + $lt{'main'} $reloadlink $navmaps
- ENDMAINMENU @@ -137,7 +137,7 @@ ENDMAINMENU if ($ENV{'request.course.id'}) { $navmaps=(< -$lt{'nav'} +$lt{'nav'} ENDNAV if (($ENV{'request.noversionuri'}=~/^\/adm\//) && ($ENV{'request.noversionuri'}!~/^\/adm\/wrapper\//) && @@ -155,7 +155,7 @@ ENDRELOAD } my $utility=&utilityfunctions(); return (< + @@ -167,7 +167,7 @@ $utility $reloadlink $navmaps - + $lt{'launch'} @@ -175,7 +175,7 @@ $navmaps - $reg @@ -227,12 +227,7 @@ sub innerregister { my $target = shift; my $result = ''; my ($uname,$thisdisfn); - my $const_space = 0; - if ($ENV{'request.filename'} =~ /^\/home\/([^\/]+)\/public_html\/(.*)/) { - $const_space = 1; - $uname = $1; - $thisdisfn = $2; - } + my $const_space = ($ENV{'request.state'} eq 'construct'); if ($ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; } @@ -252,38 +247,6 @@ sub innerregister { if ($noremote) { $newmail=' - - -
'; } - if ($textual && $const_space) { - my $formaction='/priv/'.$uname.'/'.$thisdisfn; - $formaction=~s/\/+/\//g; - my $titleinfo = '
'. - &Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn,'_top','/priv','','-1'). - &Apache::lonhtmlcommon::select_recent('construct','recent', - 'this.form.action=this.form.recent.value;this.form.submit()'). - '
'; - &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction); - $newmail .= &constspaceform(); -# role and realm - my ($role,$realm) = &Apache::lonnet::plaintext((split(/\./,$ENV{'request.role'}))[0]); - unless ($realm) { $realm=' '; } - $newmail .= < -
-$titleinfo - - - $ENV{'environment.firstname'} - $ENV{'environment.middlename'} - $ENV{'environment.lastname'} - $ENV{'environment.generation'} -  
- $role  -
-END - } if (($textual) && ($ENV{'request.symb'}) && ($ENV{'request.course.id'})) { my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($ENV{'request.symb'}); $newmail.=$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; @@ -401,6 +364,8 @@ END # Prepare the rest of the buttons my $menuitems; if ($const_space) { + my ($uname,$thisdisfn) = + ($ENV{'request.filename'}=~m|^/home/([^/]+)/public_html/(.*)|); my $currdir = '/priv/'.$uname.'/'.$thisdisfn; $currdir =~ s#[^/]+$##; $menuitems=(<$inlineremote[21] $inlineremote[23] +$inlineremote[21] $inlineremote[23] $inlineremote[61]$inlineremote[62]$inlineremote[63] $inlineremote[71]$inlineremote[72]$inlineremote[73] $inlineremote[81]$inlineremote[82]$inlineremote[83] @@ -457,7 +422,7 @@ ENDREALRES ENDINLINE } $result =(< + $timesync @@ -466,7 +431,7 @@ $tablestart $inlinebuttons $tableend $form - @@ -479,7 +444,7 @@ ENDREGTEXT my $navstatus=&get_nav_status(); $result = (< + @@ -656,7 +621,7 @@ sub maincall() { if (($ENV{'browser.interface'} eq 'textual') || ($ENV{'environment.remote'} eq 'off')) { return ''; } return(< + ENDMAINCALL @@ -714,7 +679,7 @@ var menu=window.open("/res/adm/pages/men "height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5"); self.name='loncapaclient'; ENDOPEN - return ''; + return ''; } @@ -942,7 +907,7 @@ sub close { ($ENV{'environment.remote'} eq 'off')) { return ''; } my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; return(< +