--- loncom/interface/courseprefs.pm 2009/08/19 19:35:00 1.6 +++ loncom/interface/courseprefs.pm 2009/10/13 04:48:03 1.8 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.6 2009/08/19 19:35:00 raeburn Exp $ +# $Id: courseprefs.pm,v 1.8 2009/10/13 04:48:03 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -554,7 +554,6 @@ sub process_changes { if ($newvalues{$ext_entry} ne $values->{$stdrole.'.plaintext'}) { my $dupname = 0; if ($newvalues{$ext_entry} ne '') { - my $dupname = 0; if (grep(/^\Q$newvalues{$ext_entry}\E$/,@replacements)) { $dupname = 1; push(@{$disallowed->{'rolenames'}{'replacements'}},$newvalues{$ext_entry}); @@ -655,7 +654,7 @@ sub process_changes { } foreach my $key (keys(%env)) { if ($key =~ /^form\.\Q$entry\E_($match_username:$match_domain)$/) { - if ($env{'form.'.$key}) { + if ($env{$key}) { my $nothide = $1; if (!grep(/^\Q$nothide\E$/,@new_nothide)) { push(@new_nothide,$nothide); @@ -2411,7 +2410,9 @@ sub nothidepriv_row { } } if (exists($privileged{$udom}{$uname})) { - push(@privusers,$user); + unless (grep(/^\Q$user\E$/,@privusers)) { + push(@privusers,$user); + } } } if (@privusers) { @@ -2431,8 +2432,8 @@ sub nothidepriv_row { ''. ' '. - ''. + $hideon.' value="" />'.&mt('Hidden').' '. + ''. ''; } $datatable .= '';