[LON-CAPA-cvs] cvs: loncom /interface lonsupportreq.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Fri, 01 Sep 2006 21:07:12 -0000
raeburn Fri Sep 1 17:07:12 2006 EDT
Modified files:
/loncom/interface lonsupportreq.pm
Log:
Eliminate $_. In this case the change also corrects the behavior of sort_cats() -- now limits selectable semesters to those for which courses actually exist for the specified year.
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.36 loncom/interface/lonsupportreq.pm:1.37
--- loncom/interface/lonsupportreq.pm:1.36 Tue Jul 11 11:37:59 2006
+++ loncom/interface/lonsupportreq.pm Fri Sep 1 17:07:11 2006
@@ -1,5 +1,5 @@
#
-# $Id: lonsupportreq.pm,v 1.36 2006/07/11 15:37:59 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.37 2006/09/01 21:07:11 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1105,9 +1105,9 @@
my ($num,$cat_order,$codetitles,$idsarrayref,$sorted) = @_;
my @unsorted = @{$idsarrayref};
if (defined($$cat_order{$$codetitles[$num]})) {
- foreach (@{$$cat_order{$$codetitles[$num]}}) {
- if (grep/^$_$/,@unsorted) {
- push @{$sorted}, $_;
+ foreach my $item (@{$$cat_order{$$codetitles[$num]}}) {
+ if (grep/^\Q$item\E$/,@unsorted) {
+ push @{$sorted}, $item;
}
}
} else {