Diff for /rat/lonwrapper.pm between versions 1.23 and 1.32.2.2

version 1.23, 2006/04/11 19:42:32 version 1.32.2.2, 2010/02/11 15:12:11
Line 26 Line 26
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
   
   
 package Apache::lonwrapper;  package Apache::lonwrapper;
   
 use strict;  use strict;
 use Apache::Constants qw(:common);  use Apache::Constants qw(:common);
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::lonxml();  use Apache::lonxml();
 use Apache::lonmenu;  use Apache::lonenc();
   use Apache::lonmenu();
   
 # ================================================================ Main Handler  # ================================================================ Main Handler
   
Line 67  sub wrapper { Line 69  sub wrapper {
   
     my %layout = ('border' => 0);      my %layout = ('border' => 0);
     if ($env{'environment.remote'} eq 'off') {      if ($env{'environment.remote'} eq 'off') {
  $layout{'rows'} = "180,*";          if ($env{'environment.icons'} eq 'iconsonly') {
              $layout{'rows'} = "100,*";
           } else {
      $layout{'rows'} = "200,*";
           }
     } else {      } else {
  $layout{'rows'} = "1,*";   $layout{'rows'} = "1,*";
  $topurl = "/adm/rat/empty.html";   $topurl = "/adm/rat/empty.html";
Line 81  sub wrapper { Line 87  sub wrapper {
   
     my $end_page =       my $end_page = 
  &Apache::loncommon::end_page({'frameset' => 1});   &Apache::loncommon::end_page({'frameset' => 1});
       
         foreach my $url ($topurl,$bottomurl) {
    if ($url !~ /^https?\:/) {
       $url = &Apache::lonenc::check_encrypt($url);
    }
       }
 #  #
 # frame-based rendering for graphical interface  # frame-based rendering for graphical interface
 #  #
Line 117  sub handler { Line 127  sub handler {
     $orgurl.=(($orgurl=~/\?/)?'&':'?').'wrapperdisplay=menu';      $orgurl.=(($orgurl=~/\?/)?'&':'?').'wrapperdisplay=menu';
     $url=~s/^\/adm\/wrapper//;      $url=~s/^\/adm\/wrapper//;
     my $is_ext = $url =~ m|^/ext/|;      my $is_ext = $url =~ m|^/ext/|;
     $url=~s/^\/ext\//http\:\/\//;      $url=~s{^/ext/}{http://};
       $url=~s|http://https://|https://|;
     $url=~s|:|:|g;      $url=~s|:|:|g;
 #  #
 # Actual URL  # Actual URL
Line 134  sub handler { Line 145  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 145  sub handler { Line 159  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.23  
changed lines
  Added in v.1.32.2.2


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