--- loncom/interface/loncommon.pm 2006/07/04 21:31:02 1.419 +++ loncom/interface/loncommon.pm 2006/07/04 22:02:14 1.420 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.419 2006/07/04 21:31:02 raeburn Exp $ +# $Id: loncommon.pm,v 1.420 2006/07/04 22:02:14 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4113,10 +4113,10 @@ sub get_course_users { $section = 'none'; } if ((ref($sections) eq 'ARRAY') && (@{$sections} > 0)) { - if (grep/^all$/,@{$sections}) { + if (grep(/^all$/,@{$sections})) { $secmatch = 1; } elsif ($$classlist{$student}[$idx{section}] eq '') { - if (grep/^none$/,@{$sections}) { + if (grep(/^none$/,@{$sections})) { $secmatch = 1; } } else { @@ -4128,7 +4128,7 @@ sub get_course_users { next; } } - push (@{$seclists{$student}},$section); + push(@{$seclists{$student}},$section); if (defined($$types{'active'})) { if ($$classlist{$student}[$idx{status}] eq 'Active') { push(@{$$users{st}{$student}},'active'); @@ -4162,10 +4162,10 @@ sub get_course_users { if (($role) && (grep(/^\Q$role\E$/,@{$roles}))) { my ($uname,$udom) = split(/:/,$user); if ((ref($sections) eq 'ARRAY') && (@{$sections} > 0)) { - if (grep/^all$/,@{$sections}) { + if (grep(/^all$/,@{$sections})) { $secmatch = 1; } elsif ($usec eq '') { - if (grep/^none$/,@{$sections}) { + if (grep(/^none$/,@{$sections})) { $secmatch = 1; } } else { @@ -4185,7 +4185,7 @@ sub get_course_users { $usec); foreach my $type (keys(%{$types})) { if ($status eq $type) { - if (!grep/^\Q$type\E$/,@{$$users{$role}{$user}}) { + if (!grep(/^\Q$type\E$/,@{$$users{$role}{$user}})) { push(@{$$users{$role}{$user}},$type); } $match = 1; @@ -4195,7 +4195,7 @@ sub get_course_users { if (!exists($$userdata{$uname.':'.$udom})) { &get_user_info($udom,$uname,\%idx,$userdata); } - if (!grep/^\Q$usec\E$/,@{$seclists{$uname.':'.$udom}}) { + if (!grep(/^\Q$usec\E$/,@{$seclists{$uname.':'.$udom}})) { push(@{$seclists{$uname.':'.$udom}},$usec); } } @@ -4211,7 +4211,7 @@ sub get_course_users { if (defined($userdata) && !exists($$userdata{$owner.':'.$cdom})) { &get_user_info($cdom,$owner,\%idx,$userdata); - if (!grep/^none$/,@{$seclists{$owner.':'.$cdom}}) { + if (!grep(/^none$/,@{$seclists{$owner.':'.$cdom}})) { push(@{$seclists{$owner.':'.$cdom}},'none'); } }