--- loncom/homework/grades.pm 2003/11/10 16:35:57 1.154 +++ loncom/homework/grades.pm 2003/11/10 16:38:06 1.155 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.154 2003/11/10 16:35:57 albertel Exp $ +# $Id: grades.pm,v 1.155 2003/11/10 16:38:06 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -749,8 +749,7 @@ LISTJAVASCRIPT sub processGroup { my ($request) = shift; my $ctr = 0; - my @stuchecked = (ref($ENV{'form.stuinfo'}) ? @{$ENV{'form.stuinfo'}} - : ($ENV{'form.stuinfo'})); + my @stuchecked = &Apache::loncommon::get_env_multiple('form.stuinfo'); my $total = scalar(@stuchecked)-1; foreach (@stuchecked) { @@ -1829,12 +1828,7 @@ sub processHandGrade { $ENV{'form.msgsub'},$message); } if ($ENV{'form.collaborator'.$ctr}) { - my @collabstrs; - if (ref($ENV{'form.collaborator'.$ctr}) eq 'ARRAY') { - @collabstrs=@{$ENV{'form.collaborator'.$ctr}}; - } else { - @collabstrs=$ENV{'form.collaborator'.$ctr}; - } + my @collabstrs=&Apache::loncommon::get_env_multiple("form.collaborator$ctr"); foreach my $collabstr (@collabstrs) { my ($part,@collaborators) = split(/:/,$collabstr); foreach (@collaborators) { @@ -3784,16 +3778,17 @@ GRADINGMENUJS $result.=''."\n". ' Select Section:   '; $result.='Student Status:'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,1,undef); - if (ref($sections)) { - $result.=' (Section "no" implies the students were not assigned a section.)
' - if (grep /no/,@$sections); + if (ref($sections) && (grep /no/,@$sections)) { + $result.=' (Section "no" implies the students were not assigned a section.)
'; } $result.='';