--- rat/lonratsrv.pm 2006/11/02 21:26:54 1.38 +++ rat/lonratsrv.pm 2011/10/25 19:23:20 1.42 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Server for RAT Maps # -# $Id: lonratsrv.pm,v 1.38 2006/11/02 21:26:54 albertel Exp $ +# $Id: lonratsrv.pm,v 1.42 2011/10/25 19:23:20 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -26,10 +26,12 @@ # http://www.lon-capa.org/ # + package Apache::lonratsrv; use strict; use Apache::Constants qw(:common); +use LONCAPA(); use LONCAPA::map(); @@ -43,19 +45,12 @@ sub handler { return OK if $r->header_only; my $url=$r->uri; - $url=~/\/(\w+)\/ratserver$/; + $url=~m{/(\w+)/ratserver$}; my $mode=$1; - $url=~s/\/loadonly\/ratserver$/\/save\/ratserver/; + $url=~s{/loadonly/ratserver$}{/save/ratserver}; 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 $infotext=''; my $outtext=''; @@ -95,3 +90,22 @@ ENDSCRIPT 1; __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