version 1.157, 2005/04/07 06:56:23
|
version 1.158, 2005/04/07 07:34:52
|
Line 2686 END
|
Line 2686 END
|
|
|
sub process_attachments { |
sub process_attachments { |
my ($currnewattach,$currdelold,$keepold) = @_; |
my ($currnewattach,$currdelold,$keepold) = @_; |
if (exists($env{'form.currnewattach'})) { |
|
if (ref($env{'form.currnewattach'}) eq 'ARRAY') { |
@{$currnewattach}= |
@{$currnewattach} = @{$env{'form.currnewattach'}}; |
&Apache::loncommon::get_env_multiple('form.currnewattach'); |
} else { |
@{$currdelold}= |
$$currnewattach[0] = $env{'form.currnewattach'}; |
&Apache::loncommon::get_env_multiple('form.deloldattach'); |
} |
|
} |
|
if (exists($env{'form.deloldattach'})) { |
|
if (ref($env{'form.deloldattach'}) eq 'ARRAY') { |
|
@{$currdelold} = @{$env{'form.deloldattach'}}; |
|
} else { |
|
$$currdelold[0] = $env{'form.deloldattach'}; |
|
} |
|
} |
|
if (exists($env{'form.delnewattach'})) { |
if (exists($env{'form.delnewattach'})) { |
my @currdelnew = (); |
my @currdelnew = |
|
&Apache::loncommon::get_env_multiple('form.delnewattach'); |
my @currnew = (); |
my @currnew = (); |
if (ref($env{'form.delnewattach'}) eq 'ARRAY') { |
|
@currdelnew = @{$env{'form.delnewattach'}}; |
|
} else { |
|
$currdelnew[0] = $env{'form.delnewattach'}; |
|
} |
|
foreach my $newone (@{$currnewattach}) { |
foreach my $newone (@{$currnewattach}) { |
my $delflag = 0; |
my $delflag = 0; |
foreach (@currdelnew) { |
foreach (@currdelnew) { |
Line 2722 sub process_attachments {
|
Line 2709 sub process_attachments {
|
} |
} |
@{$currnewattach} = @currnew; |
@{$currnewattach} = @currnew; |
} |
} |
if (exists($env{'form.keepold'})) { |
@{$keepold} = &Apache::loncommon::get_env_multiple('form.keepold'); |
if (ref($env{'form.keepold'}) eq 'ARRAY') { |
|
@{$keepold} = @{$env{'form.keepold'}}; |
|
} else { |
|
$$keepold[0] = $env{'form.keepold'}; |
|
} |
|
} |
|
} |
} |
|
|
sub generate_attachments_button { |
sub generate_attachments_button { |