[LON-CAPA-cvs] cvs: loncom /interface loncreatecourse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 09 Sep 2004 19:24:01 -0000


albertel		Thu Sep  9 15:24:01 2004 EDT

  Modified files:              
    /loncom/interface	loncreatecourse.pm 
  Log:
  - restore grading mode to cloned courses BUG#3407
  
  
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.66 loncom/interface/loncreatecourse.pm:1.67
--- loncom/interface/loncreatecourse.pm:1.66	Wed Aug 25 16:48:04 2004
+++ loncom/interface/loncreatecourse.pm	Thu Sep  9 15:24:01 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Create a course
 #
-# $Id: loncreatecourse.pm,v 1.66 2004/08/25 20:48:04 albertel Exp $
+# $Id: loncreatecourse.pm,v 1.67 2004/09/09 19:24:01 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -583,6 +583,10 @@
 	    $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'});
@@ -758,7 +762,7 @@
     $cenv{'internal.encpref'}=100+int(9*rand(99));
     #
     # By default, use standard grading
-    $cenv{'grading'} = 'standard';
+    if (!defined($cenv{'grading'})) { $cenv{'grading'} = 'standard'; }
 
     $r->print('<br />'.&mt('Setting environment').': '.                 
           &Apache::lonnet::put('environment',\%cenv,$crsudom,$crsunum).'<br>');