--- loncom/interface/loncoursequeueadmin.pm 2009/09/11 02:27:50 1.9 +++ loncom/interface/loncoursequeueadmin.pm 2009/11/04 17:42:17 1.11 @@ -1,7 +1,7 @@ # The LearningOnline Network # Utilities to administer domain course requests and course self-enroll requests # -# $Id: loncoursequeueadmin.pm,v 1.9 2009/09/11 02:27:50 raeburn Exp $ +# $Id: loncoursequeueadmin.pm,v 1.11 2009/11/04 17:42:17 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -76,13 +76,13 @@ sub send_selfserve_notification { if ($context eq 'coursemanagers') { $rawsubj = 'Self-enrollment requests processed'; push(@rawmsg,{ - mt => 'Enrollment requests in the following course: [_1]have been processed.', + mt => 'Enrollment requests in the following course: [_1] have been processed.', args => ["\n $contextdesc"], }); } elsif ($context eq 'domainmanagers') { $rawsubj = 'Course requests reviewed'; push(@rawmsg,{ - mt => 'Course creation requests in the following domain: [_1]have been reviewed.', + mt => 'Course creation requests in the following domain: [_1] have been reviewed.', args => ["\n $contextdesc"], }); if (ref($textstr) eq 'ARRAY') { @@ -188,7 +188,7 @@ sub send_selfserve_notification { @{$item->{args}})."\n"; } } - if ($context eq 'managers') { + if ($context eq 'coursemanagers') { if ($approvedlist) { $message .= "\n\n".&Apache::lonlocal::mt_user($sender_lh,'Approved enrollments:')."\n".$approvedlist; } @@ -954,11 +954,15 @@ sub build_batchcreatehash { } sub can_clone_course { - my ($uname,$udom,$clonecrs,$clonedom) = @_; + my ($uname,$udom,$clonecrs,$clonedom,$crstype) = @_; my $canclone; + my $ccrole = 'cc'; + if ($crstype eq 'Community') { + $ccrole = 'co'; + } my %roleshash = &Apache::lonnet::get_my_roles($uname,$udom,'userroles',['active'], - ['cc'],[$clonedom]); - if (exists($roleshash{$clonecrs.':'.$clonedom.':cc'})) { + [$ccrole],[$clonedom]); + if (exists($roleshash{$clonecrs.':'.$clonedom.':'.$ccrole})) { $canclone = 1; } else { my %courseenv = &Apache::lonnet::userenvironment($clonedom,$clonecrs,('cloners'));