[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm
raeburn
raeburn@source.lon-capa.org
Fri, 04 Sep 2009 21:42:38 -0000
raeburn Fri Sep 4 21:42:38 2009 EDT
Modified files:
/loncom/interface courseprefs.pm
Log:
Privileged users (Domain Coordinators) in staff listing.
- Fix name of form element in %env.
- Only show each DC once in cases where a DC has multiple course roles.
- Values for radiobutton nothide form elements were reversed.
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.6 loncom/interface/courseprefs.pm:1.7
--- loncom/interface/courseprefs.pm:1.6 Wed Aug 19 19:35:00 2009
+++ loncom/interface/courseprefs.pm Fri Sep 4 21:42:38 2009
@@ -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.7 2009/09/04 21:42:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -655,7 +655,7 @@
}
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 +2411,9 @@
}
}
if (exists($privileged{$udom}{$uname})) {
- push(@privusers,$user);
+ unless (grep(/^\Q$user\E$/,@privusers)) {
+ push(@privusers,$user);
+ }
}
}
if (@privusers) {
@@ -2431,8 +2433,8 @@
'</td><td align="left">'.
'<span class="LC_nobreak"><label>'.
'<input type="radio" name="'.$item.'_'.$user.'"'.
- $hideon.' value="yes" />'.&mt('Hidden').'</label> '.
- '<label><input type="radio" name="'.$item.'_'.$user.'"'. $hideoff.' value="" />'.&mt('Shown').'</label></span></td>'.
+ $hideon.' value="" />'.&mt('Hidden').'</label> '.
+ '<label><input type="radio" name="'.$item.'_'.$user.'"'. $hideoff.' value="yes" />'.&mt('Shown').'</label></span></td>'.
'</tr>';
}
$datatable .= '</table>';