--- loncom/lonnet/perl/lonnet.pm 2006/10/17 05:56:46 1.794 +++ loncom/lonnet/perl/lonnet.pm 2006/10/19 21:23:23 1.797 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.794 2006/10/17 05:56:46 albertel Exp $ +# $Id: lonnet.pm,v 1.797 2006/10/19 21:23:23 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -413,17 +413,6 @@ sub delenv { return 'ok'; } -=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; @@ -4277,9 +4266,9 @@ sub auto_instcode_defaults { foreach my $pair (split(/\&/,$response)) { my ($name,$value)=split(/\=/,$pair); if ($name eq 'code_order') { - $code_order = [split(/\&/,&unescape($value))]; + @{$code_order} = split(/\&/,&unescape($value)); } else { - $$returnhash{&unescape($name)}=&unescape($value); + $returnhash->{&unescape($name)}=&unescape($value); } } } @@ -5037,8 +5026,13 @@ sub modify_access_controls { for (my $i=0; $i<$numnew; $i++) { my $newkey = $newitems[$i]; my $newid = &Apache::loncommon::get_cgi_id(); - $newkey =~ s/^(\d+)/$newid/; - $translation{$1} = $newid; + if ($newkey =~ /^\d+:/) { + $newkey =~ s/^(\d+)/$newid/; + $translation{$1} = $newid; + } elsif ($newkey =~ /^\d+_\d+_\d+:/) { + $newkey =~ s/^(\d+_\d+_\d+)/$newid/; + $translation{$1} = $newid; + } $new_values{$file_name."\0".$newkey} = $$changes{'activate'}{$newitems[$i]}; $new_control{$newkey} = $now; @@ -7554,6 +7548,13 @@ B: removes all items fr environment file that matches the regular expression in $regexp. The values are also delted from the current processes %env. +=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 + =back =head2 User Information