[LON-CAPA-cvs] cvs: modules /msu localenroll.pm
raeburn
raeburn at source.lon-capa.org
Wed Jan 31 15:52:37 EST 2018
raeburn Wed Jan 31 20:52:37 2018 EDT
Modified files:
/modules/msu localenroll.pm
Log:
- Support search by e-mail address in insititutional directory searches.
(Used to determine institutional status when "Contact Helpdesk" form
is submitted).
Index: modules/msu/localenroll.pm
diff -u modules/msu/localenroll.pm:1.66 modules/msu/localenroll.pm:1.67
--- modules/msu/localenroll.pm:1.66 Wed Aug 5 19:54:41 2015
+++ modules/msu/localenroll.pm Wed Jan 31 20:52:37 2018
@@ -1,6 +1,6 @@
# functions to glue school database system into Lon-CAPA for
# automated enrollment
-# $Id: localenroll.pm,v 1.66 2015/08/05 19:54:41 raeburn Exp $
+# $Id: localenroll.pm,v 1.67 2018/01/31 20:52:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1055,6 +1055,15 @@
$condition = "WHERE Pid = '$srchterm'";
}
}
+ } elsif ($srchby eq 'email') {
+ if ($dbflag) {
+ if ($srchterm =~ /^(\w{2,8})\@msu\.edu$/) {
+ $condition = "WHERE MSUNetID = '$1'";
+ $ldapfilter = '(uid='.$1.')';
+ } else {
+ return;
+ }
+ }
}
if ($dbflag) {
my $matched = 0;
More information about the LON-CAPA-cvs
mailing list