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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 17 Jul 2006 18:04:12 -0000


albertel		Mon Jul 17 14:04:12 2006 EDT

  Modified files:              
    /modules/msu	localstudentphoto.pm 
  Log:
  - case on the sources appears to have gone random
  
  
Index: modules/msu/localstudentphoto.pm
diff -u modules/msu/localstudentphoto.pm:1.2 modules/msu/localstudentphoto.pm:1.3
--- modules/msu/localstudentphoto.pm:1.2	Tue Feb  7 00:14:03 2006
+++ modules/msu/localstudentphoto.pm	Mon Jul 17 14:04:07 2006
@@ -1,6 +1,6 @@
 # The LON-CAPA dummy student photo fetch mechnism
 #
-# $Id: localstudentphoto.pm,v 1.2 2006/02/07 05:14:03 raeburn Exp $
+# $Id: localstudentphoto.pm,v 1.3 2006/07/17 18:04:07 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -66,6 +66,15 @@
     }
     if ($pid =~ /^(A\d{7})(\d)/i) {
         $source = '/mnt/photos/'.lc($1).'.'.$2.'jp';
+        if (!-e "$source") {
+	    $source = '/mnt/photos/'.uc($1).'.'.$2.'jp';
+	    if (!-e "$source") {
+		$source = '/mnt/photos/'.lc($1).'.'.$2.'JP';
+		if (!-e "$source") {
+		    $source = '/mnt/photos/'.uc($1).'.'.$2.'JP';
+		}
+	    }
+	}
         if (-e "$source") {
             my @fileinfo = stat("$source");
             $sourcelastmod = $fileinfo[9];