[LON-CAPA-cvs] cvs: loncom / lonsql /enrollment Autoenroll.pl /interface lonpopulate.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 07 Nov 2005 15:43:32 -0000


raeburn		Mon Nov  7 10:43:32 2005 EDT

  Modified files:              
    /loncom	lonsql 
    /loncom/enrollment	Autoenroll.pl 
    /loncom/interface	lonpopulate.pm 
  Log:
  Bug 4441. Accommodation of non-word characters in institutional codes. Sanity checking now needed. 
  
  
Index: loncom/lonsql
diff -u loncom/lonsql:1.67 loncom/lonsql:1.68
--- loncom/lonsql:1.67	Wed Apr 13 14:39:13 2005
+++ loncom/lonsql	Mon Nov  7 10:43:03 2005
@@ -3,7 +3,7 @@
 # The LearningOnline Network
 # lonsql - LON TCP-MySQL-Server Daemon for handling database requests.
 #
-# $Id: lonsql,v 1.67 2005/04/13 18:39:13 albertel Exp $
+# $Id: lonsql,v 1.68 2005/11/07 15:43:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -431,7 +431,7 @@
                 my $locresult = '';
                 my $querystr = &unescape($arg3);
                 foreach (split/%%/,$querystr) {
-                    if (/^(\w+)=([^=]+)$/) {
+                    if (/^([^=]+)=([^=]+)$/) {
                         @{$affiliates{$1}} = split/,/,$2;
                     }
                 }
Index: loncom/enrollment/Autoenroll.pl
diff -u loncom/enrollment/Autoenroll.pl:1.14 loncom/enrollment/Autoenroll.pl:1.15
--- loncom/enrollment/Autoenroll.pl:1.14	Mon Apr 11 20:20:01 2005
+++ loncom/enrollment/Autoenroll.pl	Mon Nov  7 10:43:22 2005
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 #
 #Automated Enrollment script
-# $Id: Autoenroll.pl,v 1.14 2005/04/12 00:20:01 raeburn Exp $
+# $Id: Autoenroll.pl,v 1.15 2005/11/07 15:43:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -105,7 +105,7 @@
                         }
                     }
                     foreach my $xlist (@crosslistings) {
-                        if ($xlist =~ m/^(\w+):(\w*)$/) {
+                        if ($xlist =~ m/^([^:]+):(\w*)$/) {
                             my $course_id = $1;
                             my $gp = $2;
                             if (!grep/^$course_id$/,@{$affiliates{$crs}}) {
Index: loncom/interface/lonpopulate.pm
diff -u loncom/interface/lonpopulate.pm:1.32 loncom/interface/lonpopulate.pm:1.33
--- loncom/interface/lonpopulate.pm:1.32	Fri Nov  4 16:55:39 2005
+++ loncom/interface/lonpopulate.pm	Mon Nov  7 10:43:31 2005
@@ -1,5 +1,5 @@
 # automated enrollment configuration handler
-# $Id: lonpopulate.pm,v 1.32 2005/11/04 21:55:39 albertel Exp $
+# $Id: lonpopulate.pm,v 1.33 2005/11/07 15:43:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2104,7 +2104,7 @@
 	
 	if (@currxlists > 0) {
 	    foreach (@currxlists) {
-		if (m/^(\w+):(\w*)$/) {
+		if (m/^([^:]+):(\w*)$/) {
 		    unless (grep/^$1$/,@allcourses) { 
 			push @allcourses,$1;
 			$LC_code{$1} = $2;