version 1.28, 2004/04/23 19:59:01
|
version 1.30, 2005/04/07 06:56:27
|
Line 25
|
Line 25
|
# |
# |
# http://www.lon-capa.org/ |
# http://www.lon-capa.org/ |
# |
# |
# (Edit Handler for RAT Maps |
|
# (TeX Content Handler |
|
# |
|
# 05/29/00,05/30 Gerd Kortemeyer) |
|
# 7/1 Gerd Kortemeyer) |
|
# 7/1,7/3,7/4,7/7,7/8,7/10,7/26,10/2 Gerd Kortemeyer |
|
# 5/3,06/25,07/03,07/04,07/05 Gerd Kortemeyer |
|
|
|
package Apache::lonratsrv; |
package Apache::lonratsrv; |
|
|
Line 39 use strict;
|
Line 32 use strict;
|
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use Apache::File; |
use Apache::File; |
use HTML::TokeParser; |
use HTML::TokeParser; |
|
use Apache::lonnet; |
|
|
# ------------------------------------------------------------- From RAT to XML |
# ------------------------------------------------------------- From RAT to XML |
|
|
Line 212 sub savemap {
|
Line 205 sub savemap {
|
($fn=~/\.page(\.tmp)*$/)) { |
($fn=~/\.page(\.tmp)*$/)) { |
|
|
# ------------------------------------------------------------- Deal with input |
# ------------------------------------------------------------- Deal with input |
my @tags=split(/<&>/,$ENV{'form.output'}); |
my @tags=split(/<&>/,$env{'form.output'}); |
my $outstr=''; |
my $outstr=''; |
my $graphdef=0; |
my $graphdef=0; |
if ($tags[0] eq 'graphdef<:>yes') { |
if ($tags[0] eq 'graphdef<:>yes') { |
Line 295 sub savemap {
|
Line 288 sub savemap {
|
} |
} |
$outstr.="</map>\n"; |
$outstr.="</map>\n"; |
if ($fn=~/^\/*uploaded\/(\w+)\/(\w+)\/(.*)$/) { |
if ($fn=~/^\/*uploaded\/(\w+)\/(\w+)\/(.*)$/) { |
$ENV{'form.output'}=$outstr; |
$env{'form.output'}=$outstr; |
my $home=&Apache::lonnet::homeserver($2,$1); |
my $home=&Apache::lonnet::homeserver($2,$1); |
my $result=&Apache::lonnet::finishuserfileupload($2,$1,$home, |
my $result=&Apache::lonnet::finishuserfileupload($2,$1,$home, |
'output',$3); |
'output',$3); |
Line 322 sub savemap {
|
Line 315 sub savemap {
|
|
|
sub handler { |
sub handler { |
my $r=shift; |
my $r=shift; |
$r->content_type('text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
|
|
return OK if $r->header_only; |
return OK if $r->header_only; |