Diff for /loncom/interface/loncommon.pm between versions 1.234 and 1.239

version 1.234, 2004/11/23 07:29:24 version 1.239, 2004/12/02 18:58:30
Line 2285  sub get_student_view { Line 2285  sub get_student_view {
   if (defined($moreenv)) {    if (defined($moreenv)) {
       %form=(%form,%{$moreenv});        %form=(%form,%{$moreenv});
   }    }
   if ($target eq 'tex') {$form{'grade_target'} = 'tex';}    if (defined($target)) { $form{'grade_target'} = $target; }
   $feedurl=&Apache::lonnet::clutter($feedurl);    $feedurl=&Apache::lonnet::clutter($feedurl);
   my $userview=&Apache::lonnet::ssi_body($feedurl,%form);    my $userview=&Apache::lonnet::ssi_body($feedurl,%form);
   $userview=~s/\<body[^\>]*\>//gi;    $userview=~s/\<body[^\>]*\>//gi;
Line 2599  ENDROLE Line 2599  ENDROLE
  $font.'"><b>'.$title.'</b></font>';   $font.'"><b>'.$title.'</b></font>';
         if ($customtitle) {          if ($customtitle) {
             $titleinfo = $customtitle;              $titleinfo = $customtitle;
         }           }
   
  if ($ENV{'request.state'} eq 'construct') {   if ($ENV{'request.state'} eq 'construct') {
     my ($uname,$thisdisfn)=      my ($uname,$thisdisfn)=
  ($ENV{'request.filename'} =~ m|^/home/([^/]+)/public_html/(.*)|);   ($ENV{'request.filename'} =~ m|^/home/([^/]+)/public_html/(.*)|);
     my $formaction='/priv/'.$uname.'/'.$thisdisfn;      my $formaction='/priv/'.$uname.'/'.$thisdisfn;
     $formaction=~s/\/+/\//g;      $formaction=~s/\/+/\//g;
     $titleinfo = '<form name="dirs" method="post" action="'.$formaction              unless ($customtitle) {  #this is for resources; directories have customtitle, and crumbs and select recent are created in lonpubdir.pm  
  .'" target="_top">'                  my $parentpath = '';
  .&Apache::lonhtmlcommon::crumbs($uname.'/'.$thisdisfn,'_top','/priv','',-1,1)."<br />"                  if ($thisdisfn =~ m-(.+/)[^/]*$-) {
  .&Apache::lonhtmlcommon::select_recent('construct','recent','this.form.action=this.form.recent.value;this.form.submit()')                      $parentpath = $1;
  .'</form>'                  }
  .&Apache::lonmenu::constspaceform();          $titleinfo = &Apache::loncommon::help_open_menu('','','','',3,'Authoring').
                         '<font face="Arial, Helvetica, sans-serif"><b>Construction Space</b>:</font>&nbsp;'. 
     &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction);                        '<form name="dirs" method="post" action="'.$formaction
     if ($thisdisfn!~m|/$|) {  $forcereg=1; }      .'" target="_top"><tt><b>'
  }      .&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv','','+1',1)."</b></tt><br />"
       .&Apache::lonhtmlcommon::select_recent('construct','recent','this.form.action=this.form.recent.value;this.form.submit()')
       .'</form>'
       .&Apache::lonmenu::constspaceform();
   
         return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',              }
                                                       $forcereg).      $forcereg=1;
       '<table bgcolor="'.$pgbg.'" width="100%" border="0" cellspacing="3" cellpadding="3"><tr><td rowspan="3" bgcolor="'.$tabbg.'">'.$titleinfo.'</td>'.$roleinfo.'</tr></table>';          }
           my $titletable = '<table bgcolor="'.$pgbg.'" width="100%" border="0" '.
                            'cellspacing="3" cellpadding="3">'.
                            '<tr><td rowspan="3" bgcolor="'.$tabbg.'">'.
                            $titleinfo.'</td>'.$roleinfo.'</tr></table>';
           if ($ENV{'request.state'} eq 'construct') {
               $bodytag .= &Apache::lonmenu::menubuttons($forcereg,'web',$forcereg,$titletable);
    } else {
               $bodytag .= &Apache::lonmenu::menubuttons($forcereg,'web',$forcereg).
                           $titletable;
           }
           return $bodytag;
     }      }
   
 #  #
Line 3361  they are plotted.  If undefined, default Line 3376  they are plotted.  If undefined, default
 =item @Values: An array of array references.  Each array reference holds data  =item @Values: An array of array references.  Each array reference holds data
 to be plotted in a stacked bar chart.  to be plotted in a stacked bar chart.
   
   =item If the final element of @Values is a hash reference the key/value
   pairs will be added to the graph definition.
   
 =back  =back
   
 Returns:  Returns:
Line 3872  sub escape_double { Line 3890  sub escape_double {
 #   Escapes the last element of a full URL.  #   Escapes the last element of a full URL.
 sub escape_url {  sub escape_url {
     my ($url)   = @_;      my ($url)   = @_;
     my @urlslices = split(/\//, $url);      my @urlslices = split(/\//, $url,-1);
     my $lastitem = &Apache::lonnet::escape(pop(@urlslices));      my $lastitem = &Apache::lonnet::escape(pop(@urlslices));
     return join('/',@urlslices).'/'.$lastitem;      return join('/',@urlslices).'/'.$lastitem;
 }  }

Removed from v.1.234  
changed lines
  Added in v.1.239


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