version 1.38, 2006/11/02 21:26:54
|
version 1.41, 2008/11/20 15:19:05
|
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'); |
my $lonDocRoot=$r->dir_config('lonDocRoot'); |
if ( $fn =~ /\Q$lonDocRoot\E/ ) { |
if ( $fn =~ /\Q$lonDocRoot\E/ ) { |
#internal authentication, needs fixup. |
#internal authentication, needs fixup. |
$fn = $url; |
$fn = $url; |
$fn=~s|^/~(\w+)|/home/$1/public_html|; |
$fn=~s{^/~($LONCAPA::username_re)}{/home/$1/public_html}; |
$fn=~s|/[^/]*/ratserver$||; |
$fn=~s{/[^/]*/ratserver$}{}; |
} |
} |
my $errtext=''; |
my $errtext=''; |
my $infotext=''; |
my $infotext=''; |
Line 95 ENDSCRIPT
|
Line 97 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 |
|
|