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

raeburn raeburn@source.lon-capa.org
Tue, 19 Jan 2010 20:52:25 -0000


raeburn		Tue Jan 19 20:52:25 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	loncreateuser.pm 
  Log:
  - Backport 1.322.
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.295.2.21 loncom/interface/loncreateuser.pm:1.295.2.22
--- loncom/interface/loncreateuser.pm:1.295.2.21	Tue Jan 19 20:49:41 2010
+++ loncom/interface/loncreateuser.pm	Tue Jan 19 20:52:24 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.295.2.21 2010/01/19 20:49:41 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.295.2.22 2010/01/19 20:52:24 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4271,6 +4271,7 @@
 
 sub print_selfenroll_menu {
     my ($r,$context,$permission) = @_;
+    my $crstype = &Apache::loncommon::course_type();
     my $formname = 'enrollstudent';
     my $nolink = 1;
     my ($row,$lt) = &get_selfenroll_titles();
@@ -4634,8 +4635,12 @@
                            &mt('No').'</label>';
                 my %advhash = &Apache::lonnet::get_course_adv_roles($cid,1);
                 my (@ccs,%notified);
-                if ($advhash{'cc'}) {
-                    @ccs = split(/,/,$advhash{'cc'});
+                my $ccrole = 'cc';
+                if ($crstype eq 'Community') {
+                    $ccrole = 'co';
+                }
+                if ($advhash{$ccrole}) {
+                    @ccs = split(/,/,$advhash{$ccrole});
                 }
                 if ($currnotified) {
                     foreach my $current (split(/,/,$currnotified)) {
@@ -5760,7 +5765,7 @@
               $protectedcourse.'_'.$role.'" /></td>'."\n".
               ' <td>'.$plrole.'</td>'."\n".
               ' <td>'.$area.'<br />Domain: '.$domain.'</td>'."\n";
-    if ($role eq 'cc') {
+    if (($role eq 'cc') || ($role eq 'co')) {
         $row .= '<td>&nbsp;</td>';
     } elsif ($env{'request.course.sec'} ne '') {
         $row .= ' <td><input type="hidden" value="'.