[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface courseprefs.pm
raeburn
raeburn at source.lon-capa.org
Thu Jun 12 22:03:41 EDT 2014
raeburn Fri Jun 13 02:03:41 2014 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface courseprefs.pm
Log:
- For 2.11
- Backport 1.67
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.49.2.14 loncom/interface/courseprefs.pm:1.49.2.15
--- loncom/interface/courseprefs.pm:1.49.2.14 Mon Jun 9 20:36:56 2014
+++ loncom/interface/courseprefs.pm Fri Jun 13 02:03:41 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.49.2.14 2014/06/09 20:36:56 raeburn Exp $
+# $Id: courseprefs.pm,v 1.49.2.15 2014/06/13 02:03:41 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2319,6 +2319,7 @@
my (%fromparam,%rowspan,%bymap,%byresource, at scopeorder,%toshow,%allmaps,
%byresponsetype,%bysubmission,%fromblocks);
@scopeorder = ('all','section/group','user');
+ my $now = time;
my $resourcedata = &Apache::lonparmset::readdata($cnum,$cdom);
if (ref($resourcedata) eq 'HASH') {
foreach my $key (keys(%{$resourcedata})) {
@@ -2332,6 +2333,19 @@
} else {
$value = '';
}
+ } elsif ($item eq 'printstartdate') {
+ if ($value =~ /^\d+$/) {
+ if ($value > $now) {
+ $value = 'future';
+ }
+ }
+ } elsif ($item eq 'printenddate') {
+ if ($value =~ /^\d+$/) {
+ if ($value < $now) {
+ $value = 'past';
+ }
+ }
+
}
my ($middle,$scope,$which,$level,$map,$resource);
if (grep(/^\Q$value\E$/,@{$Apache::lonrelrequtils::checkparms{$item}})) {
More information about the LON-CAPA-cvs
mailing list