[LON-CAPA-cvs] cvs: loncom /interface lonpickcourse.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Fri, 28 Jan 2005 19:26:54 -0000


raeburn		Fri Jan 28 14:26:54 2005 EDT

  Modified files:              
    /loncom/interface	lonpickcourse.pm 
  Log:
  Guy's suggested style improvements.
  
  
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.24 loncom/interface/lonpickcourse.pm:1.25
--- loncom/interface/lonpickcourse.pm:1.24	Thu Jan 27 14:20:55 2005
+++ loncom/interface/lonpickcourse.pm	Fri Jan 28 14:26:54 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a course
 #
-# $Id: lonpickcourse.pm,v 1.24 2005/01/27 19:20:55 raeburn Exp $
+# $Id: lonpickcourse.pm,v 1.25 2005/01/28 19:26:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -226,11 +226,7 @@
                 $descr = &Apache::lonnet::unescape($courses{$course});
             }
             my $description = lc($descr);
-            if (exists($by_descrip{$description})) {
-                push @{$by_descrip{$description}}, ($course);
-            } else {
-                @{$by_descrip{$description}} = ($course);
-            }
+            push (@{$by_descrip{$description}}, $course);
 	}
 	foreach my $description (sort(keys(%by_descrip))) {
             foreach my $course (@{$by_descrip{$description}}) {