version 1.114, 2016/05/30 03:02:37
|
version 1.116, 2016/05/30 09:27:35
|
Line 498 ENDEXT
|
Line 498 ENDEXT
|
my @interval=&Apache::lonnet::EXT("resource.0.interval",$symb); |
my @interval=&Apache::lonnet::EXT("resource.0.interval",$symb); |
if (@interval > 1) { |
if (@interval > 1) { |
my $first_access; |
my $first_access; |
if ($first_access > 0) { |
if ($interval[1] eq 'map') { |
if ($interval[1] eq 'map') { |
my $ignorecache; |
my $ignorecache; |
if ($env{'form.'.$prefix.'markaccess'} eq 'yes') { |
if ($env{'form.'.$prefix.'markaccess'} eq 'yes') { |
$ignorecache = 1; |
$ignorecache = 1; |
|
} |
|
$first_access=&Apache::lonnet::get_first_access($interval[1],undef,$pagesymb,$ignorecache); |
|
if (($first_access) && (!$pagefirstaccess)) { |
|
$pagefirstaccess = $first_access; |
|
} |
|
} else { |
|
$first_access=&Apache::lonnet::get_first_access($interval[1],$symb); |
|
} |
} |
if ($first_access > 0) { |
$first_access=&Apache::lonnet::get_first_access($interval[1],undef,$pagesymb,$ignorecache); |
my ($timelimit) = ($interval[0] =~ /^(\d+)/); |
if (($first_access) && (!$pagefirstaccess)) { |
if ($timelimit) { |
$pagefirstaccess = $first_access; |
my $timeremains = $timelimit + $first_access - $now; |
|
if ($timeremains > 0) { |
|
$timerhastime = $timeremains; |
|
} |
|
} |
|
} |
} |
|
} else { |
|
$first_access=&Apache::lonnet::get_first_access($interval[1],$symb); |
|
} |
|
if ($first_access > 0) { |
my ($timelimit) = ($interval[0] =~ /^(\d+)/); |
my ($timelimit) = ($interval[0] =~ /^(\d+)/); |
my $timeremains = $first_access+$timelimit - $now; |
if ($timelimit) { |
if ($timeremains > 0) { |
my $timeremains = $timelimit + $first_access - $now; |
$timerhastime = $timeremains; |
if ($timeremains > 0) { |
|
$timerhastime = $timeremains; |
|
} |
} |
} |
} |
} |
} |
} |
Line 969 sub add_countdown_timer {
|
Line 962 sub add_countdown_timer {
|
$type = $donebuttonextras->{'type'}; |
$type = $donebuttonextras->{'type'}; |
} else { |
} else { |
$donebuttontext = &mt('Done'); |
$donebuttontext = &mt('Done'); |
|
$type = 'map'; |
} |
} |
$donebutton = |
$donebutton = |
&Apache::lonmenu::done_button_js($type,'','',$proctor,$donebuttontext); |
&Apache::lonmenu::done_button_js($type,'','',$proctor,$donebuttontext); |