version 1.1, 2006/10/10 20:16:26
|
version 1.2, 2007/04/20 01:54:29
|
Line 37 use Apache::lonnavmaps();
|
Line 37 use Apache::lonnavmaps();
|
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Time::HiRes qw( gettimeofday tv_interval ); |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 224 MENU
|
Line 225 MENU
|
my $curRes; |
my $curRes; |
my $foundDoableProblem = 0; |
my $foundDoableProblem = 0; |
my $minimumduedate; |
my $minimumduedate; |
|
my $now = time(); |
|
|
while ($curRes = $iterator->next()) { |
while ($curRes = $iterator->next()) { |
if (ref($curRes) && $curRes->is_problem()) { |
if (ref($curRes) && $curRes->is_problem()) { |
my $status = $curRes->status(); |
my $status = $curRes->status(); |
if ($curRes->completable()) { |
my $thisduedate=$curRes->duedate(); |
my $thisduedate=$curRes->duedate(); |
if ($thisduedate > $now |
unless ($foundDoableProblem) { |
&& $curRes->completable()) { |
$minimumduedate=$thisduedate; |
|
} |
|
|
|
$foundDoableProblem = 1; |
$foundDoableProblem = 1; |
|
|
if ($thisduedate<=$minimumduedate) { |
if (!defined($minimumduedate) |
|
|| $thisduedate<$minimumduedate) { |
# Pop open all previous maps |
# Pop open all previous maps |
my $stack = $iterator->getStack(); |
my $stack = $iterator->getStack(); |
pop @$stack; # last resource in the stack is the problem |
pop @$stack; # last resource in the stack is the problem |