--- loncom/interface/lonmenu.pm 2015/07/17 19:11:06 1.436 +++ loncom/interface/lonmenu.pm 2015/09/14 13:45:01 1.437 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.436 2015/07/17 19:11:06 raeburn Exp $ +# $Id: lonmenu.pm,v 1.437 2015/09/14 13:45:01 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2286,10 +2286,12 @@ sub countdown_timer { } my $duedate = &Apache::lonnet::EXT("resource.0.duedate"); my @interval=&Apache::lonnet::EXT("resource.0.interval"); + my ($timelimit,$usesdone); if (@interval > 1) { + ($timelimit,$usesdone) = split(/_/,$interval[0]); my $first_access=&Apache::lonnet::get_first_access($interval[1]); if ($first_access > 0) { - if ($first_access+$interval[0] > time) { + if ($first_access+$timelimit > time) { $hastimeleft = 1; } } @@ -2303,7 +2305,9 @@ sub countdown_timer { $currdisp = 'inline'; $collapse = '► '; if ((@interval > 1) && ($hastimeleft)) { - $donebutton = &done_button_js($interval[1]); + if ($usesdone eq 'done') { + $donebutton = &done_button_js($interval[1]); + } } } else { $currdisp = 'none';