[LON-CAPA-cvs] cvs: modules /msu localenroll.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Wed, 17 Oct 2007 22:22:50 -0000
albertel Wed Oct 17 18:22:50 2007 EDT
Modified files:
/modules/msu localenroll.pm
Log:
- if searching for specific users and the search terms fail to be useful,
just early out with no data
Index: modules/msu/localenroll.pm
diff -u modules/msu/localenroll.pm:1.30 modules/msu/localenroll.pm:1.31
--- modules/msu/localenroll.pm:1.30 Wed Sep 12 15:59:55 2007
+++ modules/msu/localenroll.pm Wed Oct 17 18:22:47 2007
@@ -1,6 +1,6 @@
# functions to glue school database system into Lon-CAPA for
# automated enrollment
-# $Id: localenroll.pm,v 1.30 2007/09/12 19:59:55 raeburn Exp $
+# $Id: localenroll.pm,v 1.31 2007/10/17 22:22:47 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -583,6 +583,11 @@
$condition = "WHERE Pid = '$srchterm'";
}
}
+
+ if ($srchby && !$condition) {
+ return;
+ }
+
foreach my $table (@{$srchtables}) {
my $statement = "SELECT MSUNetID,Pid,FirstName,LastName,Person_Type FROM $table $condition";
my $sth = $dbh->prepare("$statement");