Diff for /rat/lonratsrv.pm between versions 1.38 and 1.42

version 1.38, 2006/11/02 21:26:54 version 1.42, 2011/10/25 19:23:20
Line 26 Line 26
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
   
   
 package Apache::lonratsrv;  package Apache::lonratsrv;
   
 use strict;  use strict;
 use Apache::Constants qw(:common);  use Apache::Constants qw(:common);
   use LONCAPA();
 use LONCAPA::map();  use LONCAPA::map();
   
   
Line 43  sub handler { Line 45  sub handler {
   return OK if $r->header_only;    return OK if $r->header_only;
   
   my $url=$r->uri;    my $url=$r->uri;
   $url=~/\/(\w+)\/ratserver$/;    $url=~m{/(\w+)/ratserver$};
   my $mode=$1;    my $mode=$1;
   
   $url=~s/\/loadonly\/ratserver$/\/save\/ratserver/;    $url=~s{/loadonly/ratserver$}{/save/ratserver};
       
   my $fn=$r->filename;    my $fn=$r->filename;
   my $lonDocRoot=$r->dir_config('lonDocRoot');  
   if ( $fn =~ /\Q$lonDocRoot\E/ ) {  
       #internal authentication, needs fixup.  
       $fn = $url;  
       $fn=~s|^/~(\w+)|/home/$1/public_html|;  
       $fn=~s|/[^/]*/ratserver$||;  
   }  
   my $errtext='';    my $errtext='';
   my $infotext='';    my $infotext='';
   my $outtext='';    my $outtext='';
Line 95  ENDSCRIPT Line 90  ENDSCRIPT
   
 1;  1;
 __END__  __END__
   
   
   =head1 NAME
   
   Apache::lonratsrv
   
   =head1 SYNOPSIS
   
   Handler that takes output from RAT and stores
   it on disk. Handles the upper hidden frame of
   the added window that comes up in RAT. (3
   frames come up in RAT server, code, and
   output. This module handles server
   connection.)
   
   This is part of the LearningOnline Network with CAPA project
   described at http://www.lon-capa.org.
   
   =cut

Removed from v.1.38  
changed lines
  Added in v.1.42


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