[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm
raeburn
raeburn at source.lon-capa.org
Wed Feb 15 16:36:30 EST 2012
raeburn Wed Feb 15 21:36:30 2012 EDT
Modified files:
/loncom/interface courseprefs.pm
Log:
- Bug 6470.
- If courses are categorized by a DC, modification of "General course settings"
by a CC should not cause aasigned course categorization to be deleted.
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.48 loncom/interface/courseprefs.pm:1.49
--- loncom/interface/courseprefs.pm:1.48 Wed Dec 14 23:55:50 2011
+++ loncom/interface/courseprefs.pm Wed Feb 15 21:36:30 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.48 2011/12/14 23:55:50 raeburn Exp $
+# $Id: courseprefs.pm,v 1.49 2012/02/15 21:36:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -665,7 +665,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') {
@@ -707,7 +721,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