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

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 28 Dec 2006 19:59:49 -0000


raeburn		Thu Dec 28 14:59:49 2006 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Fixing regression in get_users_groups(). 
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.815 loncom/lonnet/perl/lonnet.pm:1.816
--- loncom/lonnet/perl/lonnet.pm:1.815	Thu Dec 28 12:36:51 2006
+++ loncom/lonnet/perl/lonnet.pm	Thu Dec 28 14:59:48 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.815 2006/12/28 17:36:51 albertel Exp $
+# $Id: lonnet.pm,v 1.816 2006/12/28 19:59:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4513,7 +4513,8 @@
         @usersgroups = split(/:/,$grouplist);
     } else {  
         $grouplist = '';
-        my %roleshash = &dump('roles',$udom,$uname,$courseid);
+        my $courseurl = &courseid_to_courseurl($courseid);
+        my %roleshash = &dump('roles',$udom,$uname,$courseurl);
         my ($tmp) = keys(%roleshash);
         if ($tmp=~/^error:/) {
             &logthis('Error retrieving roles: '.$tmp.' for '.$uname.':'.$udom);
@@ -4522,7 +4523,7 @@
                                   '.default_enrollment_end_date'};
             my $now = time;
             foreach my $key (keys(%roleshash)) {
-                if ($key =~ /^\Q$courseid\E\/(\w+)\_gr$/) {
+                if ($key =~ /^\Q$courseurl\E\/(\w+)\_gr$/) {
                     my $group = $1;
                     if ($roleshash{$key} =~ /_(\d+)_(\d+)$/) {
                         my $start = $2;