--- loncom/interface/lonpopulate.pm 2005/04/07 06:56:23 1.23 +++ loncom/interface/lonpopulate.pm 2005/04/07 07:34:52 1.24 @@ -1,5 +1,5 @@ # automated enrollment configuration handler -# $Id: lonpopulate.pm,v 1.23 2005/04/07 06:56:23 albertel Exp $ +# $Id: lonpopulate.pm,v 1.24 2005/04/07 07:34:52 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2248,37 +2248,12 @@ sub print_viewclass_response { my $secidx=&Apache::loncoursedata::CL_SECTION; my $typeidx=&Apache::loncoursedata::CL_TYPE; my $lockedidx=&Apache::loncoursedata::CL_LOCKEDTYPE; - my @typechglist = (); - my @lockchglist = (); &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['chgauto','chgmanual','lockchg','unlockchg']); - if ($env{'form.chgauto'}) { - if (ref($env{'form.chgauto'}) eq 'ARRAY') { - push @typechglist, @{$env{'form.chgauto'}}; - } else { - push @typechglist, $env{'form.chgauto'}; - } - } - if ($env{'form.chgmanual'}) { - if (ref($env{'form.chgmanual'}) eq 'ARRAY') { - push @typechglist, @{$env{'form.chgmanual'}}; - } else { - push @typechglist, $env{'form.chgmanual'}; - } - } - if ($env{'form.lockchg'}) { - if (ref($env{'form.lockchg'}) eq 'ARRAY') { - push @lockchglist, @{$env{'form.lockchg'}}; - } else { - push @lockchglist, $env{'form.lockchg'}; - } - } - if ($env{'form.unlockchg'}) { - if (ref($env{'form.unlockchg'}) eq 'ARRAY') { - push @lockchglist, @{$env{'form.unlockchg'}}; - } else { - push @lockchglist, $env{'form.unlockchg'}; - } - } + my @typechglist = (&Apache::loncommon::get_env_multiple('form.chgauto'), + &Apache::loncommon::get_env_multiple('form.chgmanual')); + my @lockchglist = (&Apache::loncommon::get_env_multiple('form.lockchg'), + &Apache::loncommon::get_env_multiple('form.unlockchg')); + foreach my $student (sort @typechglist) { my ($uname,$udom) = split/:/,$student; my $sdata = $classlist->{$student};