[prev in list] [next in list] [prev in thread] [next in thread]
List: lon-capa-cvs
Subject: [LON-CAPA-cvs] cvs: rat / lonpage.pm
From: raeburn <raeburn () source ! lon-capa ! org>
Date: 2016-05-30 4:50:39
Message-ID: cvsraeburn1464583839 () cvsserver
[Download RAW message or body]
raeburn Mon May 30 04:50:39 2016 EDT
Modified files:
/rat lonpage.pm
Log:
- Remove duplicated code included in rev. 1.114.
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.114 rat/lonpage.pm:1.115
--- rat/lonpage.pm:1.114 Mon May 30 03:02:37 2016
+++ rat/lonpage.pm Mon May 30 04:50:39 2016
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Page Handler
#
-# $Id: lonpage.pm,v 1.114 2016/05/30 03:02:37 raeburn Exp $
+# $Id: lonpage.pm,v 1.115 2016/05/30 04:50:39 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -498,32 +498,25 @@
my \
@interval=&Apache::lonnet::EXT("resource.0.interval",$symb); if (@interval > 1) {
my $first_access;
- if ($first_access > 0) {
- if ($interval[1] eq 'map') {
- my $ignorecache;
- if \
($env{'form.'.$prefix.'markaccess'} eq 'yes') {
- $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 ($interval[1] eq 'map') { + \
my $ignorecache; + if \
($env{'form.'.$prefix.'markaccess'} eq 'yes') { + \
$ignorecache = 1; }
- if ($first_access > 0) {
- my ($timelimit) = \
($interval[0] =~ /^(\d+)/);
- if ($timelimit) {
- my $timeremains = \
$timelimit + $first_access - $now;
- if ($timeremains > 0) \
{
- $timerhastime = \
$timeremains;
- }
- }
+ \
$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) {
my ($timelimit) = \
($interval[0] =~ /^(\d+)/);
- my $timeremains = \
$first_access+$timelimit - $now;
- if ($timeremains > 0) {
- $timerhastime = \
$timeremains; + if ($timelimit) \
{ + my $timeremains = \
$timelimit + $first_access - $now; + \
if ($timeremains > 0) { + \
$timerhastime = $timeremains; + \
} }
}
}
_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic