[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface loncommon.pm

raeburn raeburn@source.lon-capa.org
Thu, 25 Feb 2010 16:01:15 -0000


raeburn		Thu Feb 25 16:01:15 2010 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	loncommon.pm 
  Log:
  - Backport 1.944.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.925.2.10 loncom/interface/loncommon.pm:1.925.2.11
--- loncom/interface/loncommon.pm:1.925.2.10	Mon Jan 18 15:44:35 2010
+++ loncom/interface/loncommon.pm	Thu Feb 25 16:01:15 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.925.2.10 2010/01/18 15:44:35 raeburn Exp $
+# $Id: loncommon.pm,v 1.925.2.11 2010/02/25 16:01:15 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -10050,19 +10050,19 @@
     my $clonehome=&Apache::lonnet::homeserver($clonecrsunum,$clonecrsudom);
     my $clonemsg;
     my $can_clone = 0;
-    my $lctype = lc($args->{'type'});
+    my $lctype = lc($args->{'crstype'});
     if ($lctype ne 'community') {
         $lctype = 'course';
     }
     if ($clonehome eq 'no_host') {
-        if ($args->{'type'} eq 'Community') {
+        if ($args->{'crstype'} eq 'Community') {
             $clonemsg = &mt('No new community created.').$linefeed.&mt('A new community could not be cloned from the specified original - [_1] - because it is a non-existent community.',$args->{'clonecourse'}.':'.$args->{'clonedomain'});
         } else {
             $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 ($args->{'type'} eq 'Community') {
+        if ($args->{'crstype'} eq 'Community') {
             if ($clonedesc{'type'} ne 'Community') {
                  $clonemsg = &mt('No new community created.').$linefeed.&mt('A new community could not be cloned from the specified original - [_1] - because it is a course not a community.',$args->{'clonecourse'}.':'.$args->{'clonedomain'});
                 return ($can_clone, $clonemsg, $cloneid, $clonehome);
@@ -10081,7 +10081,7 @@
                 $can_clone = 1;
             } else {
                 my $ccrole = 'cc';
-                if ($args->{'type'} eq 'Community') {
+                if ($args->{'crstype'} eq 'Community') {
                     $ccrole = 'co';
                 }
 	        my %roleshash =
@@ -10092,7 +10092,7 @@
 	        if (($roleshash{$args->{'clonecourse'}.':'.$args->{'clonedomain'}.':'.$ccrole}) || (grep(/^\Q$args->{'ccuname'}\E:\Q$args->{'ccdomain'}\E$/,@cloners))) {
 		    $can_clone = 1;
 	        } else {
-                    if ($args->{'type'} eq 'Community') {
+                    if ($args->{'crstype'} eq 'Community') {
                         $clonemsg = &mt('No new community created.').$linefeed.&mt('The new community could not be cloned from the existing community because the new community owner ([_1]) does not have cloning rights in the existing community ([_2]).',$args->{'ccuname'}.':'.$args->{'ccdomain'},$clonedesc{'description'});
                     } else {
                         $clonemsg = &mt('No new course created.').$linefeed.&mt('The new course could not be cloned from the existing course because the new course owner ([_1]) does not have cloning rights in the existing course ([_2]).',$args->{'ccuname'}.':'.$args->{'ccdomain'},$clonedesc{'description'});