ENDBODY
}
@@ -2360,6 +2366,32 @@ sub add_to_env {
=pod
+=item * get_env_multiple($name)
+
+gets $name from the %ENV hash, it seemlessly handles the cases where multiple
+values may be defined and end up as an array ref.
+
+returns an array of values
+
+=cut
+
+sub get_env_multiple {
+ my ($name) = @_;
+ my @values;
+ if (defined($ENV{$name})) {
+ # exists is it an array
+ if (ref($ENV{$name})) {
+ @values=@{ $ENV{$name} };
+ } else {
+ $values[0]=$ENV{$name};
+ }
+ }
+ return(@values);
+}
+
+
+=pod
+
=back
=head1 CSV Upload/Handling functions
@@ -2713,9 +2745,10 @@ the routine &Apache::lonnet::transfer_pr
############################################################
############################################################
-
+my $uniq=0;
sub get_cgi_id {
- return (time.'_'.int(rand(1000)));
+ $uniq=($uniq++)%100000;
+ return (time.'_'.$uniq);
}
############################################################