[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmenu.pm
raeburn
raeburn at source.lon-capa.org
Tue May 29 15:41:28 EDT 2012
raeburn Tue May 29 19:41:28 2012 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonmenu.pm
Log:
- For 2.11.
- Backport 1.381.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.12 loncom/interface/lonmenu.pm:1.369.2.13
--- loncom/interface/lonmenu.pm:1.369.2.12 Tue May 29 16:49:23 2012
+++ loncom/interface/lonmenu.pm Tue May 29 19:41:27 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.369.2.12 2012/05/29 16:49:23 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.13 2012/05/29 19:41:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2025,10 +2025,19 @@
($Apache::inputtags::status[-1] eq 'CAN_ANSWER')) {
my $duedate = &Apache::lonnet::EXT("resource.0.duedate");
my @interval=&Apache::lonnet::EXT("resource.0.interval");
+ my $hastimeleft;
+ if (@interval > 1) {
+ my $first_access=&Apache::lonnet::get_first_access($interval[1]);
+ if ($first_access > 0) {
+ if ($first_access+$interval[0] > time) {
+ $hastimeleft = 1;
+ }
+ }
+ }
if (($duedate && $duedate > time) ||
- (!$duedate && @interval > 1)) {
+ (!$duedate && $hastimeleft)) {
my ($collapse,$expand,$alttxt,$title,$currdisp);
- if (@interval > 1) {
+ if (@interval > 1 && $hastimeleft) {
$currdisp = 'inline';
$collapse = '► ';
} else {
More information about the LON-CAPA-cvs
mailing list