--- loncom/interface/loncommon.pm 2009/08/06 20:40:59 1.881 +++ loncom/interface/loncommon.pm 2009/08/08 19:55:04 1.882 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.881 2009/08/06 20:40:59 raeburn Exp $ +# $Id: loncommon.pm,v 1.882 2009/08/08 19:55:04 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -9860,7 +9860,8 @@ 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'}) { + 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'], @@ -9888,7 +9889,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') { @@ -9926,7 +9927,8 @@ 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