version 1.683, 2022/10/19 02:10:20
|
version 1.684, 2022/10/22 17:24:54
|
Line 5931 sub handler {
|
Line 5931 sub handler {
|
my %codebase = (); |
my %codebase = (); |
my ($upload_result,$upload_output,$uploadphase); |
my ($upload_result,$upload_output,$uploadphase); |
if ($canedit) { |
if ($canedit) { |
|
undef($suppchanges); |
if (($env{'form.uploaddoc.filename'}) && |
if (($env{'form.uploaddoc.filename'}) && |
($env{'form.cmd'}=~/^upload_(\w+)/)) { |
($env{'form.cmd'}=~/^upload_(\w+)/)) { |
my $context = $1; |
my $context = $1; |
Line 5942 sub handler {
|
Line 5943 sub handler {
|
if ($hadchanges) { |
if ($hadchanges) { |
&mark_hash_old(); |
&mark_hash_old(); |
} |
} |
|
if ($suppchanges) { |
|
&Apache::lonnet::update_supp_caches($coursedom,$coursenum); |
|
undef($suppchanges); |
|
} |
$r->print($upload_output); |
$r->print($upload_output); |
} elsif ($env{'form.phase'} eq 'upload_embedded') { |
} elsif ($env{'form.phase'} eq 'upload_embedded') { |
# Process file upload - phase two - upload embedded objects |
# Process file upload - phase two - upload embedded objects |
Line 6903 my %suporderhash = (
|
Line 6908 my %suporderhash = (
|
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
} |
} |
if ($suppchanges) { |
if ($suppchanges) { |
my %servers = &Apache::lonnet::internet_dom_servers($coursedom); |
&Apache::lonnet::update_supp_caches($coursedom,$coursenum); |
my @ids=&Apache::lonnet::current_machine_ids(); |
|
foreach my $server (keys(%servers)) { |
|
next if (grep(/^\Q$server\E$/,@ids)); |
|
my $hashid=$coursenum.':'.$coursedom; |
|
my $cachekey = &escape('showsupp').':'.&escape($hashid); |
|
&Apache::lonnet::remote_devalidate_cache($server,[$cachekey]); |
|
} |
|
&Apache::lonnet::has_unhidden_suppfiles($coursenum,$coursedom,1); |
|
&Apache::lonnet::count_supptools($coursenum,$coursedom,1); |
|
my $now = time; |
|
if ($env{'request.course.id'} eq $coursedom.'_'.$coursenum) { |
|
&Apache::lonnet::appenv({'request.course.suppupdated' => $now}); |
|
} |
|
&Apache::lonnet::put('environment',{'internal.supplementalchange' => $now}, |
|
$coursedom,$coursenum); |
|
&Apache::lonnet::appenv( |
|
{'course.'.$coursedom.'_'.$coursenum.'.internal.supplementalchange' => $now}); |
|
&Apache::lonnet::do_cache_new('suppchange',$coursedom.'_'.$coursenum,$now,600); |
|
undef($suppchanges); |
undef($suppchanges); |
} |
} |
} |
} |
Line 7092 sub remove_archive {
|
Line 7079 sub remove_archive {
|
if ($url eq $env{'form.archiveurl'}) { |
if ($url eq $env{'form.archiveurl'}) { |
if (&handle_edit_cmd($docuname,$docudom)) { |
if (&handle_edit_cmd($docuname,$docudom)) { |
($errtext,$fatal) = &storemap($docuname,$docudom,$map,1); |
($errtext,$fatal) = &storemap($docuname,$docudom,$map,1); |
|
if ($suppchanges) { |
|
&Apache::lonnet::update_supp_caches($docudom,$docuname); |
|
undef($suppchanges); |
|
} |
if ($fatal) { |
if ($fatal) { |
if ($container eq 'page') { |
if ($container eq 'page') { |
$delwarning = &mt('An error occurred updating the contents of the current page.'); |
$delwarning = &mt('An error occurred updating the contents of the current page.'); |