--- loncom/interface/loncommon.pm 2009/08/14 08:32:17 1.692.4.11 +++ loncom/interface/loncommon.pm 2009/08/14 08:37:53 1.692.4.12 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.692.4.11 2009/08/14 08:32:17 raeburn Exp $ +# $Id: loncommon.pm,v 1.692.4.12 2009/08/14 08:37:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -9286,8 +9286,9 @@ sub check_clone { $clonemsg = &mt('No new course created.').$linefeed.&mt('A new course could not be cloned from the specified original - [_1] - because it is a non-existent course.',$args->{'clonecourse'}.':'.$args->{'clonedomain'}); } else { my %clonedesc = &Apache::lonnet::coursedescription($cloneid,{'one_time' => 1}); - if ($env{'request.role.domain'} eq $args->{'clonedomain'}) { - $can_clone = 1; + if (($env{'request.role.domain'} eq $args->{'clonedomain'}) && + (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'}))) { + $can_clone = 1; } else { my %clonehash = &Apache::lonnet::get('environment',['cloners'], $args->{'clonedomain'},$args->{'clonecourse'}); @@ -9314,7 +9315,7 @@ sub check_clone { } sub construct_course { - my ($args,$logmsg,$courseid,$crsudom,$crsunum,$udom,$uname,$context) = @_; + my ($args,$logmsg,$courseid,$crsudom,$crsunum,$udom,$uname,$context,$cnum) = @_; my $outcome; my $linefeed = '
'."\n"; if ($context eq 'auto') { @@ -9352,7 +9353,9 @@ sub construct_course { $args->{'crscode'}, $args->{'ccuname'}.':'. $args->{'ccdomain'}, - $args->{'crstype'}); + $args->{'crstype'}, + $cnum); + # Note: The testing routines depend on this being output; see # Utils::Course. This needs to at least be output as a comment