[LON-CAPA-cvs] cvs: loncom /interface loncreateuser.pm
raeburn
raeburn@source.lon-capa.org
Tue, 03 Nov 2009 21:31:06 -0000
raeburn Tue Nov 3 21:31:06 2009 EDT
Modified files:
/loncom/interface loncreateuser.pm
Log:
- Accommodate Communities
- "co" is role to search for in community users to generate list of users who
may receive notification of self-enrollment request.
- co role is sectionless.
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.321 loncom/interface/loncreateuser.pm:1.322
--- loncom/interface/loncreateuser.pm:1.321 Sat Oct 31 14:27:48 2009
+++ loncom/interface/loncreateuser.pm Tue Nov 3 21:31:06 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.321 2009/10/31 14:27:48 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.322 2009/11/03 21:31:06 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4365,6 +4365,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();
@@ -4726,8 +4727,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)) {
@@ -5908,7 +5913,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> </td>';
} elsif ($env{'request.course.sec'} ne '') {
$row .= ' <td><input type="hidden" value="'.