version 1.436, 2015/07/17 19:11:06
|
version 1.437, 2015/09/14 13:45:01
|
Line 2286 sub countdown_timer {
|
Line 2286 sub countdown_timer {
|
} |
} |
my $duedate = &Apache::lonnet::EXT("resource.0.duedate"); |
my $duedate = &Apache::lonnet::EXT("resource.0.duedate"); |
my @interval=&Apache::lonnet::EXT("resource.0.interval"); |
my @interval=&Apache::lonnet::EXT("resource.0.interval"); |
|
my ($timelimit,$usesdone); |
if (@interval > 1) { |
if (@interval > 1) { |
|
($timelimit,$usesdone) = split(/_/,$interval[0]); |
my $first_access=&Apache::lonnet::get_first_access($interval[1]); |
my $first_access=&Apache::lonnet::get_first_access($interval[1]); |
if ($first_access > 0) { |
if ($first_access > 0) { |
if ($first_access+$interval[0] > time) { |
if ($first_access+$timelimit > time) { |
$hastimeleft = 1; |
$hastimeleft = 1; |
} |
} |
} |
} |
Line 2303 sub countdown_timer {
|
Line 2305 sub countdown_timer {
|
$currdisp = 'inline'; |
$currdisp = 'inline'; |
$collapse = '► '; |
$collapse = '► '; |
if ((@interval > 1) && ($hastimeleft)) { |
if ((@interval > 1) && ($hastimeleft)) { |
$donebutton = &done_button_js($interval[1]); |
if ($usesdone eq 'done') { |
|
$donebutton = &done_button_js($interval[1]); |
|
} |
} |
} |
} else { |
} else { |
$currdisp = 'none'; |
$currdisp = 'none'; |