[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface loncreateuser.pm

raeburn raeburn@source.lon-capa.org
Wed, 20 Jan 2010 14:35:37 -0000


raeburn		Wed Jan 20 14:35:37 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	loncreateuser.pm 
  Log:
  - Changes in 1.329 omitted from earlier backport (1.295.2.26).
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.295.2.27 loncom/interface/loncreateuser.pm:1.295.2.28
--- loncom/interface/loncreateuser.pm:1.295.2.27	Wed Jan 20 02:57:09 2010
+++ loncom/interface/loncreateuser.pm	Wed Jan 20 14:35:36 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.295.2.27 2010/01/20 02:57:09 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.295.2.28 2010/01/20 14:35:36 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1484,10 +1484,10 @@
         if ($area =~ m{^/($match_domain)/($match_courseid)} ) {
             $class='Course';
             my ($coursedom,$coursedir) = ($1,$2);
-            $sortkey.="\0$coursedom";
+            my $cid = $1.'_'.$2;
             # $1.'_'.$2 is the course id (eg. 103_12345abcef103l3).
             my %coursedata=
-                &Apache::lonnet::coursedescription($1.'_'.$2);
+                &Apache::lonnet::coursedescription($cid);
             if ($coursedir =~ /^$match_community$/) {
                 $class='Community';
             }
@@ -1509,8 +1509,8 @@
                 }
             }
             $sortkey.="\0$coursedir";
-            $inccourses->{$1.'_'.$2}=1;
-            if ((&Apache::lonnet::allowed('c'.$role_code,$1.'/'.$2)) ||
+            $inccourses->{$cid}=1;
+            if ((&Apache::lonnet::allowed('c'.$role_code,$coursedom.'/'.$coursedir)) ||
                 (&Apache::lonnet::allowed('c'.$role_code,$ccdomain))) {
                 $allowed=1;
             }
@@ -1524,13 +1524,13 @@
                     }
                 }
             }
-            if ((&Apache::lonnet::allowed('dro',$1)) ||
+            if ((&Apache::lonnet::allowed('dro',$coursedom)) ||
                 (&Apache::lonnet::allowed('dro',$ccdomain))) {
                $delallowed=1;
             }
 # - custom role. Needs more info, too
             if ($croletitle) {
-                if (&Apache::lonnet::allowed('ccr',$1.'/'.$2)) {
+                if (&Apache::lonnet::allowed('ccr',$coursedom.'/'.$coursedir)) {
                     $allowed=1;
                     $thisrole.='.'.$role_code;
                 }