version 1.7, 2023/08/28 18:58:44
|
version 1.10, 2023/11/26 20:47:15
|
Line 38 use File::Copy;
|
Line 38 use File::Copy;
|
use Apache::lonacc; |
use Apache::lonacc; |
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::xml_to_loncapa; |
use Apache::xml_to_loncapa; |
|
use Apache::lonlocal; |
|
|
sub handler { |
sub handler { |
my $request = shift; |
my $request = shift; |
|
|
$request->content_type('text/plain'); |
$request->content_type('text/plain'); |
|
|
|
my %editors = &Apache::loncommon::permitted_editors($request->uri); |
|
unless ($editors{'daxe'}) { |
|
$request->content_type('text/plain'); |
|
$request->print(&mt('Daxe editor not enabled for this Authoring Space')); |
|
return OK; |
|
} |
|
|
# path should be in the form "/daxeopen/priv/..." |
# path should be in the form "/daxeopen/priv/..." |
# or "/daxeopen/uploaded/$cdom/$cnum/(docs|supplemental)/(default|\d+)/\d+/" |
# or "/daxeopen/uploaded/$cdom/$cnum/(docs|supplemental)/(default|\d+)/\d+/" |
my $path = $env{'form.path'}; |
my $path = $env{'form.path'}; |
Line 125 sub handler {
|
Line 133 sub handler {
|
$unsupported = $1; |
$unsupported = $1; |
} |
} |
unless ($unsupported) { |
unless ($unsupported) { |
my $url = &Apache::lonnet::finishuserfileupload($cnum,$cdom,'file', |
my $url = &Apache::lonnet::userfileupload('file','daxesave',"$type/$folder/$rid", |
"$type/$folder/$rid/$fname"); |
undef,undef,undef,$cnum,$cdom); |
if ($url =~ m{^/uploaded/$cdom/$cnum/$type/$folder/$rid/}) { |
if ($url =~ m{^/uploaded/$cdom/$cnum/$type/$folder/$rid/}) { |
$request->print("ok\n"); |
$request->print("ok\n"); |
} else { |
} else { |