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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Sat, 02 Feb 2008 21:45:52 -0000


raeburn		Sat Feb  2 16:45:52 2008 EDT

  Modified files:              (Branch: version_2_6_X)
    /loncom/interface	loncommon.pm 
  Log:
  Backport 1.638.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.636 loncom/interface/loncommon.pm:1.636.2.1
--- loncom/interface/loncommon.pm:1.636	Sun Jan 20 19:35:58 2008
+++ loncom/interface/loncommon.pm	Sat Feb  2 16:45:47 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.636 2008/01/21 00:35:58 raeburn Exp $
+# $Id: loncommon.pm,v 1.636.2.1 2008/02/02 21:45:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -8088,14 +8088,21 @@
 	$cenv{'url'}=$oldcenv{'url'};
 # Restore title
 	$cenv{'description'}=$oldcenv{'description'};
-# restore grading mode
-	if (defined($oldcenv{'grading'})) {
-	    $cenv{'grading'}=$oldcenv{'grading'};
-	}
 # Mark as cloned
 	$cenv{'clonedfrom'}=$cloneid;
-	delete($cenv{'default_enrollment_start_date'});
-	delete($cenv{'default_enrollment_end_date'});
+# Need to clone grading mode
+        my %newenv=&Apache::lonnet::get('environment',['grading'],$$crsudom,$$crsunum);
+        $cenv{'grading'}=$newenv{'grading'};
+# Do not clone these environment entries
+        &Apache::lonnet::del('environment',
+                  ['default_enrollment_start_date',
+                   'default_enrollment_end_date',
+                   'question.email',
+                   'policy.email',
+                   'comment.email',
+                   'pch.users.denied',
+                   'plc.users.denied'],
+                   $$crsudom,$$crsunum);
     }
 
 #