[LON-CAPA-cvs] cvs: loncom(loncapaMITrelate_1) /interface courseprefs.pm
raeburn
raeburn at source.lon-capa.org
Fri Feb 17 12:00:29 EST 2012
raeburn Fri Feb 17 17:00:29 2012 EDT
Modified files: (Branch: loncapaMITrelate_1)
/loncom/interface courseprefs.pm
Log:
- Customization for MITrelate
- Backport 1.49.
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.28.2.10.2.1 loncom/interface/courseprefs.pm:1.28.2.10.2.2
--- loncom/interface/courseprefs.pm:1.28.2.10.2.1 Wed Feb 1 19:56:30 2012
+++ loncom/interface/courseprefs.pm Fri Feb 17 17:00:29 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.10.2.1 2012/02/01 19:56:30 raeburn Exp $
+# $Id: courseprefs.pm,v 1.28.2.10.2.2 2012/02/17 17:00:29 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