--- loncom/interface/loncoursequeueadmin.pm 2009/10/04 15:29:58 1.9.2.1 +++ loncom/interface/loncoursequeueadmin.pm 2009/11/19 18:16:21 1.9.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network # Utilities to administer domain course requests and course self-enroll requests # -# $Id: loncoursequeueadmin.pm,v 1.9.2.1 2009/10/04 15:29:58 raeburn Exp $ +# $Id: loncoursequeueadmin.pm,v 1.9.2.3 2009/11/19 18:16:21 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; } @@ -465,9 +465,9 @@ sub update_request_queue { push(@warn_approves,$uname.':'.$udom); } elsif ($udom eq 'gci') { my %changehash = ( - 'reqcrsotherdom.unofficial' => 'gcitest:autolimit='; + 'reqcrsotherdom.unofficial' => 'gcitest:autolimit=', ); - my $reqresult = &Apache::lonnet::put('environment',\%changeHash, + my $reqresult = &Apache::lonnet::put('environment',\%changehash, $udom,$uname); if ($reqresult ne 'ok') { push(@warn_coursereqs,$uname.':'.$udom); @@ -970,11 +970,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'));