[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /interface courseprefs.pm
raeburn
raeburn at source.lon-capa.org
Wed Apr 11 09:02:39 EDT 2012
raeburn Wed Apr 11 13:02:39 2012 EDT
Modified files: (Branch: version_2_10_X)
/loncom/interface courseprefs.pm
Log:
- Backport 1.49.
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.28.2.11 loncom/interface/courseprefs.pm:1.28.2.12
--- loncom/interface/courseprefs.pm:1.28.2.11 Wed Feb 1 19:54:35 2012
+++ loncom/interface/courseprefs.pm Wed Apr 11 13:02:39 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.28.2.11 2012/02/01 19:54:35 raeburn Exp $
+# $Id: courseprefs.pm,v 1.28.2.12 2012/04/11 13:02:39 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -680,7 +680,21 @@
}
}
} elsif (ref($item->{'ordered'}) eq 'ARRAY') {
- @ordered = @{$item->{'ordered'}};
+ if ($action eq 'courseinfo') {
+ my ($can_toggle_cat,$can_categorize) =
+ &can_modify_catsettings($cdom,$crstype);
+ foreach my $entry (@{$item->{'ordered'}}) {
+ next if (($entry eq 'hidefromcat') &&
+ (!$can_toggle_cat));
+ next if (($entry eq 'categories') &&
+ (!$can_categorize));
+ next if (($entry eq 'loncaparev') ||
+ ($entry eq 'owner'));
+ push(@ordered,$entry);
+ }
+ } else {
+ @ordered = @{$item->{'ordered'}};
+ }
}
if (@ordered > 0) {
if ($action eq 'feedback') {
@@ -722,7 +736,6 @@
}
} else {
foreach my $entry (@ordered) {
- next if (($entry eq 'loncaparev') || ($entry eq 'owner'));
if ($entry eq 'cloners') {
if ($env{'form.cloners_all'}) {
$newvalues{$entry} = '*';
More information about the LON-CAPA-cvs
mailing list