[LON-CAPA-cvs] cvs: modules /msu localenroll.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 20 Jan 2005 19:34:29 -0000


raeburn		Thu Jan 20 14:34:29 2005 EDT

  Modified files:              
    /modules/msu	localenroll.pm 
  Log:
  Years are 4 digit years for display in select boxes, with stored values only 2 digit. 
  
  
Index: modules/msu/localenroll.pm
diff -u modules/msu/localenroll.pm:1.14 modules/msu/localenroll.pm:1.15
--- modules/msu/localenroll.pm:1.14	Mon Dec  6 20:21:41 2004
+++ modules/msu/localenroll.pm	Thu Jan 20 14:34:29 2005
@@ -1,6 +1,6 @@
 # functions to glue school database system into Lon-CAPA for
 # automated enrollment
-# $Id: localenroll.pm,v 1.14 2004/12/07 01:21:41 raeburn Exp $
+# $Id: localenroll.pm,v 1.15 2005/01/20 19:34:29 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -310,8 +310,12 @@
             $$codes{$cid}{'Department'} = $3;
             $$codes{$cid}{'Number'} = $4;
             my $year = $2;
-            $year =~ s/^0//;
-            $$codes{$cid}{'Year'} = 2000 + $year;
+            my $numyear = $year;
+            $numyear =~ s/^0//;
+            $$codes{$cid}{'Year'} = $year;
+            unless (defined($$cat_titles{'Year'}{$year})) {
+                $$cat_titles{'Year'}{$year} = 2000 + $numyear;
+            }
         }
     }
     my $outcome = 'ok';