[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Tue Aug 21 00:04:58 EDT 2012


raeburn		Tue Aug 21 04:04:58 2012 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Separate area and rolecode correctly for course roles where section contains
    underscore, or for co-author roles where author's username contains underscore.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1185 loncom/lonnet/perl/lonnet.pm:1.1186
--- loncom/lonnet/perl/lonnet.pm:1.1185	Sun Aug 19 00:18:41 2012
+++ loncom/lonnet/perl/lonnet.pm	Tue Aug 21 04:04:58 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1185 2012/08/19 00:18:41 raeburn Exp $
+# $Id: lonnet.pm,v 1.1186 2012/08/21 04:04:58 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3713,7 +3713,7 @@
         }
         my ($rolecode,$username,$domain,$section,$area);
         if ($context eq 'userroles') {
-            ($area,$rolecode) = split(/_/,$entry);
+            ($area,$rolecode) = ($entry =~ /^(.+)_([^_]+)$/);
             (undef,$domain,$username,$section) = split(/\//,$area);
         } else {
             ($role,$username,$domain,$section) = split(/\:/,$entry);




More information about the LON-CAPA-cvs mailing list