Diff for /loncom/interface/lonmenu.pm between versions 1.127 and 1.128

version 1.127, 2004/11/11 22:47:55 version 1.128, 2004/11/11 23:45:36
Line 227  sub innerregister { Line 227  sub innerregister {
     my $target = shift;      my $target = shift;
     my $result = '';      my $result = '';
     my ($uname,$thisdisfn);      my ($uname,$thisdisfn);
     my $const_space = 0;      my $const_space = ($ENV{'request.state'} eq 'construct');
     if ($ENV{'request.filename'} =~ /^\/home\/([^\/]+)\/public_html\/(.*)/) {  
         $const_space = 1;  
         $uname = $1;  
         $thisdisfn = $2;  
     }  
   
     if ($ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; }      if ($ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; }
   
Line 252  sub innerregister { Line 247  sub innerregister {
     if ($noremote) {      if ($noremote) {
  $newmail='<font face="Arial,Helvetica,sans-serif"><table bgcolor="'.$pgbg.'" border="0" cellspacing="1" cellpadding="1" width="100%"><tr><td bgcolor="'.$tabbg.'">';   $newmail='<font face="Arial,Helvetica,sans-serif"><table bgcolor="'.$pgbg.'" border="0" cellspacing="1" cellpadding="1" width="100%"><tr><td bgcolor="'.$tabbg.'">';
     }      }
     if ($textual && $const_space) {  
         my $formaction='/priv/'.$uname.'/'.$thisdisfn;  
         $formaction=~s/\/+/\//g;  
         my $titleinfo = '<form name="dirs" method="post" action="'.$formaction  
               .'" target="_top">'.  
         &Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn,'_top','/priv','','-1').  
         &Apache::lonhtmlcommon::select_recent('construct','recent',  
                  'this.form.action=this.form.recent.value;this.form.submit()').  
               '</form>';  
         &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='&nbsp;'; }  
         $newmail .= <<END;  
 <table width="100%" cellspacing="0" border="0" cellpadding="0">  
 <tr>  
 <td>  
 $titleinfo  
 </td>  
 <td align="right">  
 <font size="2" face="Arial, Helvetica, sans-serif">  
     $ENV{'environment.firstname'}  
     $ENV{'environment.middlename'}  
     $ENV{'environment.lastname'}  
     $ENV{'environment.generation'}  
     </font>&nbsp;<br />  
     <font size="2" face="Arial, Helvetica, sans-serif">$role</font>&nbsp;  
 </td></tr>  
 </table>  
 END  
     }  
     if (($textual) && ($ENV{'request.symb'}) && ($ENV{'request.course.id'})) {      if (($textual) && ($ENV{'request.symb'}) && ($ENV{'request.course.id'})) {
  my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($ENV{'request.symb'});   my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($ENV{'request.symb'});
         $newmail.=$ENV{'course.'.$ENV{'request.course.id'}.'.description'};          $newmail.=$ENV{'course.'.$ENV{'request.course.id'}.'.description'};
Line 401  END Line 364  END
 # Prepare the rest of the buttons  # Prepare the rest of the buttons
         my $menuitems;          my $menuitems;
         if ($const_space) {          if ($const_space) {
       my ($uname,$thisdisfn) =
    ($ENV{'request.filename'}=~m|^/home/([^/]+)/public_html/(.*)|);
             my $currdir = '/priv/'.$uname.'/'.$thisdisfn;              my $currdir = '/priv/'.$uname.'/'.$thisdisfn;
             $currdir =~ s#[^/]+$##;              $currdir =~ s#[^/]+$##;
             $menuitems=(<<ENDMENUITEMS);              $menuitems=(<<ENDMENUITEMS);

Removed from v.1.127  
changed lines
  Added in v.1.128


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>