Diff for /loncom/interface/lonnavmaps.pm between versions 1.416 and 1.419

version 1.416, 2008/11/18 20:18:37 version 1.419, 2008/12/04 08:56:28
Line 425  manner: Line 425  manner:
 Very, very, very, VERY English-only... goodness help a localizer on  Very, very, very, VERY English-only... goodness help a localizer on
 this func...  this func...
   
 =item   =item resource()
   
 =item   returns 0
   
 =item   =item communication_status()
   
 =item   returns 1
   
 =item   =item quick_status()
   
 =item   returns 2
   
 =item   =item long_status()
   
 =item   returns 3
   
 =item   =item part_status_summary()
   
 =item   returns 4
   
 =item   =item render_resource()
   
 =item   =item render_communication_status()
   
 =item   =item render_quick_status()
   
   =item render_long_status()
   
   =item render_parts_summary_status()
   
   =item setDefault()
   
   =item cmp_title()
   
   =item render()
   
   =item add_linkitem()
   
   =item show_linkitems()
   
 =back  =back
   
Line 544  this.document.navform.submit(); Line 558  this.document.navform.submit();
 ENDUPDATE  ENDUPDATE
 }  }
   
 # Convenience functions: Returns a string that adds or subtracts  
 # the second argument from the first hash, appropriate for the   
 # query string that determines which folders to recurse on  
 sub addToFilter {  sub addToFilter {
     my $hashIn = shift;      my $hashIn = shift;
     my $addition = shift;      my $addition = shift;
Line 565  sub removeFromFilter { Line 577  sub removeFromFilter {
     return join(",", keys(%hash));      return join(",", keys(%hash));
 }  }
   
 # Convenience function: Given a stack returned from getStack on the iterator,  
 # return the correct src() value.  
 sub getLinkForResource {  sub getLinkForResource {
     my $stack = shift;      my $stack = shift;
     my $res;      my $res;
Line 604  sub getLinkForResource { Line 614  sub getLinkForResource {
     return;      return;
 }  }
   
 # Convenience function: This separates the logic of how to create  
 # the problem text strings ("Due: DATE", "Open: DATE", "Not yet assigned",  
 # etc.) into a separate function. It takes a resource object as the  
 # first parameter, and the part number of the resource as the second.  
 # It's basically a big switch statement on the status of the resource.  
   
 sub getDescription {  sub getDescription {
     my $res = shift;      my $res = shift;
Line 681  sub getDescription { Line 687  sub getDescription {
     }      }
 }  }
   
 # Convenience function, so others can use it: Is the problem due in less than  
 # 24 hours, and still can be done?  
   
 sub dueInLessThan24Hours {  sub dueInLessThan24Hours {
     my $res = shift;      my $res = shift;
Line 695  sub dueInLessThan24Hours { Line 699  sub dueInLessThan24Hours {
     $res->duedate($part) > time();      $res->duedate($part) > time();
 }  }
   
 # Convenience function, so others can use it: Is there only one try remaining for the  
 # part, with more than one try to begin with, not due yet and still can be done?  
 sub lastTry {  sub lastTry {
     my $res = shift;      my $res = shift;
     my $part = shift;      my $part = shift;
Line 708  sub lastTry { Line 711  sub lastTry {
         $res->duedate($part) > time();          $res->duedate($part) > time();
 }  }
   
 # This puts a human-readable name on the env variable.  
   
 sub advancedUser {  sub advancedUser {
     return $env{'request.role.adv'};      return $env{'request.role.adv'};
 }  }
   
   
 # timeToHumanString takes a time number and converts it to a  
 # human-readable representation, meant to be used in the following  
 # manner:  
 # print "Due $timestring"  
 # print "Open $timestring"  
 # print "Answer available $timestring"  
 # Very, very, very, VERY English-only... goodness help a localizer on  
 # this func...  
   
   
 sub timeToHumanString {  sub timeToHumanString {
     my ($time,$type,$format) = @_;      my ($time,$type,$format) = @_;
   
Line 975  sub render_resource { Line 966  sub render_resource {
     # Is this the current resource?      # Is this the current resource?
     if (!$params->{'displayedHereMarker'} &&       if (!$params->{'displayedHereMarker'} && 
         $resource->symb() eq $params->{'here'} ) {          $resource->symb() eq $params->{'here'} ) {
         $curMarkerBegin = '<font color="red" size="+2">&gt;</font>';          $curMarkerBegin = '<span class="LC_fontcolor_red LC_fontsize_large">&gt;</span>';
         $curMarkerEnd = '<font color="red" size="+2">&lt;</font>';          $curMarkerEnd = '<span class="LC_fontcolor_red LC_fontsize_large">&lt;</span>';
         $params->{'displayedHereMarker'} = 1;          $params->{'displayedHereMarker'} = 1;
     }      }
   
Line 1855  ENDBLOCK Line 1846  ENDBLOCK
   
 1;  1;
   
   
   
   
   
   
   
   
   
 package Apache::lonnavmaps::navmap;  package Apache::lonnavmaps::navmap;
   
 =pod  =pod

Removed from v.1.416  
changed lines
  Added in v.1.419


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