[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface courseprefs.pm

raeburn raeburn@source.lon-capa.org
Fri, 12 Feb 2010 00:39:51 -0000


raeburn		Fri Feb 12 00:39:51 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	courseprefs.pm 
  Log:
  - Backport 1.14 (part).
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.8.2.5 loncom/interface/courseprefs.pm:1.8.2.6
--- loncom/interface/courseprefs.pm:1.8.2.5	Mon Jan 18 20:18:11 2010
+++ loncom/interface/courseprefs.pm	Fri Feb 12 00:39:51 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.8.2.5 2010/01/18 20:18:11 raeburn Exp $
+# $Id: courseprefs.pm,v 1.8.2.6 2010/02/12 00:39:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -983,9 +983,9 @@
                                         $displayname = &mt($text);
                                     }
                                     if (defined($yesno{$key})) {
-                                        $displayval = 'no';
+                                        $displayval = &mt('No');
                                         if ($changes->{$item}{$key} eq 'yes') {
-                                            $displayval = 'yes';                          
+                                            $displayval = &mt('Yes');         
                                         }
                                     } elsif (($key =~ /^default_enrollment_(start|end)_date$/) && ($displayval)) {
                                         $displayval = &Apache::lonlocal::locallocaltime($displayval);
@@ -1038,6 +1038,10 @@
                 }
                 $output .= '</span>';
             }
+        } else {
+            foreach my $key (@delkeys) {
+                &Apache::lonnet::delenv('course.'.$cdom.'_'.$cnum.'.'.$key);
+            }
         }
         if (@need_env_update) {
             $chome = &Apache::lonnet::homeserver($cnum,$cdom);