--- loncom/interface/courseprefs.pm 2010/01/03 01:59:25 1.8.2.4 +++ loncom/interface/courseprefs.pm 2010/02/12 00:39:51 1.8.2.6 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.8.2.4 2010/01/03 01:59:25 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 @@ sub store_changes { $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 @@ sub store_changes { } $output .= ''; } + } else { + foreach my $key (@delkeys) { + &Apache::lonnet::delenv('course.'.$cdom.'_'.$cnum.'.'.$key); + } } if (@need_env_update) { $chome = &Apache::lonnet::homeserver($cnum,$cdom); @@ -1756,11 +1760,11 @@ sub print_feedback { my %sections = &Apache::loncommon::get_sections($cdom,$cnum); my @sections = sort( { $a <=> $b } keys(%sections)); my %lt = &Apache::lonlocal::texthash ( - currone => 'Current recipient:', - curmult => 'Current recipients:', - add => 'Additional recipient:', - del => 'Delete?', - sec => 'Sections:', + currone => 'Current recipient:', + currmult => 'Current recipients:', + add => 'Additional recipient:', + del => 'Delete?', + sec => 'Sections:', ); foreach my $item (@{$ordered}) { @@ -1821,7 +1825,7 @@ sub user_table { if ($num) { $output .= ''. ''; - if ($num > 1) { + if ($num == 1) { $output .= $lt->{'currone'}; } else { $output .= $lt->{'currmult'}; @@ -1941,11 +1945,11 @@ sub print_discussion { my %sections = &Apache::loncommon::get_sections($cdom,$cnum); my @sections = sort( { $a <=> $b } keys(%sections)); my %lt = &Apache::lonlocal::texthash ( - currone => 'Disallowed:', - curmult => 'Disallowed:', - add => 'Disallow more:', - del => 'Delete?', - sec => 'Sections:', + currone => 'Disallowed:', + currmult => 'Disallowed:', + add => 'Disallow more:', + del => 'Delete?', + sec => 'Sections:', ); foreach my $item (@{$ordered}) {