Diff for /loncom/interface/lonnavmaps.pm between versions 1.442 and 1.443

version 1.442, 2010/01/07 12:42:43 version 1.443, 2010/01/26 11:33:48
Line 478  use Apache::loncommon(); Line 478  use Apache::loncommon();
 use Apache::lonenc();  use Apache::lonenc();
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonnet;  use Apache::lonnet;
   
 use POSIX qw (floor strftime);  use POSIX qw (floor strftime);
 use Time::HiRes qw( gettimeofday tv_interval );  use Time::HiRes qw( gettimeofday tv_interval );
 use LONCAPA;  use LONCAPA;
Line 492  sub NOTHING { return 3; } Line 493  sub NOTHING { return 3; }
   
 my $resObj = "Apache::lonnavmaps::resource";  my $resObj = "Apache::lonnavmaps::resource";
   
 # Keep these mappings in sync with lonquickgrades, which uses the colors  # Keep these mappings in sync with lonquickgrades, which usesthe colors
 # instead of the icons.  # instead of the icons.
 my %statusIconMap =   my %statusIconMap = 
     (      (
Line 3779  sub is_problem { Line 3780  sub is_problem {
     }      }
     return 0;      return 0;
 }  }
   #
   #  The has below is the set of status that are considered 'incomplete'
   #
   my %incomplete_hash = 
   (
    TRIES_LEFT()     => 1,
    OPEN()           => 1,
    ATTEMPTED()      => 1
   
    );
   #
   #  Return tru if a problem is incomplete... for now incomplete means that
   #  any part of the problem is incomplete. 
   #  Note that if the resources is not a problem, 0 is returned.
   #
   sub is_incomplete {
       my $self = shift;
       if ($self->is_problem()) {
    &Apache::lonnet::logthis('is problem');
    foreach my $part (@{$self->parts()}) {
       &Apache::lonnet::logthis("$part status ".$self->status($part));
       if (exists($incomplete_hash{$self->status($part)})) {
    return 1;
       }
    }
       }
       return 0;
          
   }
 sub is_raw_problem {  sub is_raw_problem {
     my $self=shift;      my $self=shift;
     my $src = $self->src();      my $src = $self->src();

Removed from v.1.442  
changed lines
  Added in v.1.443


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>