Diff for /rat/lonwrapper.pm between versions 1.29 and 1.37

version 1.29, 2008/11/10 13:22:23 version 1.37, 2009/11/24 05:37:35
Line 26 Line 26
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
   
 =pod  
   
 =head1 NAME  
   
 Apache::lonwrapper - External and binary file management.  
   
 =head1 SYNOPSIS  
   
 Wrapper for external and binary files as standalone resources. Edit handler for rat maps; TeX content handler.  
   
 This is part of the LearningOnline Network with CAPA project  
 described at http://www.lon-capa.org.  
   
 =head2 Subroutines  
   
 =cut  
   
   
 package Apache::lonwrapper;  package Apache::lonwrapper;
   
Line 70  sub simple_menu { Line 53  sub simple_menu {
 sub wrapper {  sub wrapper {
     my ($topurl,$bottomurl) = @_;      my ($topurl,$bottomurl) = @_;
   
     if ($env{'browser.interface'} eq 'textual') {  
 #  
 # ssi-based rendering for text-based interface  
 #  
  return   
     &Apache::loncommon::start_page('Menu',undef,  
   {'bgcolor'        => '#FFFFFF',  
    'force_register' => 1,  
        }).  
     &Apache::lonnet::ssi_body($bottomurl).  
     &Apache::loncommon::end_page();  
     }  
   
   
     my %layout = ('border' => 0);      my %layout = ('border' => 0);
     if ($env{'environment.remote'} eq 'off') {      if ($env{'environment.remote'} eq 'off') {
         if ($env{'environment.icons'} eq 'iconsonly') {          if (($env{'request.course.id'}) &&
            $layout{'rows'} = "100,*";              (&Apache::lonnet::allowed('opa',$env{'request.course.id'}.
                ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')))) {
               $layout{'rows'} = "135,*";
         } else {          } else {
    $layout{'rows'} = "200,*";              $layout{'rows'} = "100,*";
         }          }
     } else {      } else {
  $layout{'rows'} = "1,*";   $layout{'rows'} = "1,*";
Line 106  sub wrapper { Line 77  sub wrapper {
  &Apache::loncommon::end_page({'frameset' => 1});   &Apache::loncommon::end_page({'frameset' => 1});
           
     foreach my $url ($topurl,$bottomurl) {      foreach my $url ($topurl,$bottomurl) {
  if ($url !~ /^http:/) {   if ($url !~ /^https?\:/) {
     $url = &Apache::lonenc::check_encrypt($url);      $url = &Apache::lonenc::check_encrypt($url);
  }   }
     }      }
Line 162  sub handler { Line 133  sub handler {
 #  #
  if ($is_ext) {   if ($is_ext) {
     $ENV{'QUERY_STRING'}=~s/(^|\&)symb=[^\&]*/$1/;      $ENV{'QUERY_STRING'}=~s/(^|\&)symb=[^\&]*/$1/;
               $ENV{'QUERY_STRING'} =~ s/\&$//;  
  }   }
  $url.=(($url=~/\?/)?'&':'?').$ENV{'QUERY_STRING'};           unless ($ENV{'QUERY_STRING'} eq '') {
       $url.=(($url=~/\?/)?'&':'?').$ENV{'QUERY_STRING'};
           }
  # reappend the query arguments   # reappend the query arguments
  $r->print(&wrapper($orgurl,$url));   $r->print(&wrapper($orgurl,$url));
     } # not just the menu      } # not just the menu
Line 173  sub handler { Line 147  sub handler {
 1;  1;
 __END__  __END__
   
   =pod
   
   =head1 NAME
   
   Apache::lonwrapper - External and binary file management.
   
   =head1 SYNOPSIS
   
   Wrapper for external and binary files as standalone resources. Edit handler for rat maps; TeX content handler.
   
   This is part of the LearningOnline Network with CAPA project
   described at http://www.lon-capa.org.
   
   =head1 Subroutines
   
   =over
   
   =item simple_menu()
   
   =item wrapper()
   
   =item handler()
   
   =back
   
   =cut
   
   
   

Removed from v.1.29  
changed lines
  Added in v.1.37


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.