Diff for /loncom/interface/lonnavmaps.pm between versions 1.241 and 1.244

version 1.241, 2003/11/06 15:24:13 version 1.244, 2004/01/30 23:38:19
Line 371  sub getDescription { Line 371  sub getDescription {
                 $triesString = "<b>$triesString</b>";                  $triesString = "<b>$triesString</b>";
             }              }
         }          }
         if ($res->duedate()) {          if ($res->duedate($part)) {
             return &mt("Due")." " . timeToHumanString($res->duedate($part)) .              return &mt("Due")." " . timeToHumanString($res->duedate($part)) .
                 " $triesString";                  " $triesString";
         } else {          } else {
Line 393  sub dueInLessThen24Hours { Line 393  sub dueInLessThen24Hours {
   
     return ($status == $res->OPEN() ||      return ($status == $res->OPEN() ||
             $status == $res->TRIES_LEFT()) &&              $status == $res->TRIES_LEFT()) &&
            $res->duedate() && $res->duedate() < time()+(24*60*60) &&      $res->duedate($part) && $res->duedate($part) < time()+(24*60*60) &&
            $res->duedate() > time();      $res->duedate($part) > time();
 }  }
   
 # Convenience function, so others can use it: Is there only one try remaining for the  # Convenience function, so others can use it: Is there only one try remaining for the
Line 406  sub lastTry { Line 406  sub lastTry {
     my $tries = $res->tries($part);      my $tries = $res->tries($part);
     my $maxtries = $res->maxtries($part);      my $maxtries = $res->maxtries($part);
     return $tries && $maxtries && $maxtries > 1 &&      return $tries && $maxtries && $maxtries > 1 &&
         $maxtries - $tries == 1 && $res->duedate() &&          $maxtries - $tries == 1 && $res->duedate($part) &&
         $res->duedate() > time();          $res->duedate($part) > time();
 }  }
   
 # This puts a human-readable name on the ENV variable.  # This puts a human-readable name on the ENV variable.
Line 895  sub render_resource { Line 895  sub render_resource {
             $icon = $params->{'indentString'};              $icon = $params->{'indentString'};
         }          }
     } else {      } else {
  my $curfext= (split (/\./,$resource->src))[-1];   $icon = "<img src='".&Apache::loncommon::icon($resource->src).
  my $embstyle = &Apache::loncommon::fileembstyle($curfext);      "' alt='' border='0' />";
  # The unless conditional that follows is a bit of overkill  
  if (!(!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn')) {  
     $icon = "<img src='/adm/lonIcons/$curfext.gif' alt='' border='0' />";  
  }  
     }      }
   
     # Display the correct map icon to open or shut map      # Display the correct map icon to open or shut map
Line 2345  consisting entirely of empty resources e Line 2341  consisting entirely of empty resources e
 ending resource, will cause a lot of BRANCH_STARTs and BRANCH_ENDs,  ending resource, will cause a lot of BRANCH_STARTs and BRANCH_ENDs,
 but only one resource will be returned.  but only one resource will be returned.
   
   =back
   
 =head2 Normal Usage  =head2 Normal Usage
   
 Normal usage of the iterator object is to do the following:  Normal usage of the iterator object is to do the following:
Line 2365  the depth of the iterator to see when it Line 2363  the depth of the iterator to see when it
 code. It is difficult to get right and harder to understand then  code. It is difficult to get right and harder to understand then
 this. They should be migrated to this new style.  this. They should be migrated to this new style.
   
 =back  
   
 =cut  =cut
   
 # Here are the tokens for the iterator:  # Here are the tokens for the iterator:

Removed from v.1.241  
changed lines
  Added in v.1.244


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