--- loncom/interface/lonmenu.pm 2004/11/11 22:47:55 1.127 +++ loncom/interface/lonmenu.pm 2004/11/11 23:45:36 1.128 @@ -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.128 2004/11/11 23:45:36 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -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=(<