Diff for /loncom/interface/lonnavmaps.pm between versions 1.133 and 1.134

version 1.133, 2003/01/31 22:46:50 version 1.134, 2003/02/04 16:14:27
Line 717  sub real_handler { Line 717  sub real_handler {
     $navmap->untieHashes();      $navmap->untieHashes();
   
     $r->print("</body></html>");      $r->print("</body></html>");
       $r->rflush();
   
     return OK;      return OK;
 }  }
Line 1083  sub render_resource { Line 1084  sub render_resource {
   
     my $nonLinkedText = ''; # stuff after resource title not in link      my $nonLinkedText = ''; # stuff after resource title not in link
   
     my $it = $params->{'iterator'};      my $link = $params->{"resourceLink"};
       my $src = $resource->src();
       my $it = $params->{"iterator"};
     my $filter = $it->{FILTER};      my $filter = $it->{FILTER};
     my $stack = $it->getStack();  
     my $src = getLinkForResource($stack);  
   
     my $srcHasQuestion = $src =~ /\?/;  
     my $link = $src.  
         ($srcHasQuestion?'&':'?') .  
         'symb=' . &Apache::lonnet::escape($resource->symb()).  
         '"';  
   
     my $title = $resource->compTitle();      my $title = $resource->compTitle();
     if ($src =~ /^\/uploaded\//) {      if ($src =~ /^\/uploaded\//) {
Line 1184  sub render_resource { Line 1179  sub render_resource {
         $nonLinkedText .= ' (' . $resource->countParts() . ' parts)';          $nonLinkedText .= ' (' . $resource->countParts() . ' parts)';
     }      }
   
     $result .= "  $curMarkerBegin<a href='$link'>$title$partLabel</a>$curMarkerEnd $nonLinkedText";      $result .= "  $curMarkerBegin<a href='$link'>$title$partLabel</a>$curMarkerEnd $nonLinkedText</td>";
   
     return $result;      return $result;
 }  }
   
 sub render_communication_status {  sub render_communication_status {
     my ($resource, $part, $params) = @_;      my ($resource, $part, $params) = @_;
     return "<td align='center'>comm_status</td>";      my $discussionHTML = ""; my $feedbackHTML = ""; my $errorHTML = "";
   
       my $link = $params->{"resourceLink"};
       my $linkopen = "<a href='$link'>";
       my $linkclose = "</a>";
   
       if ($resource->hasDiscussion()) {
           $discussionHTML = $linkopen .
               '<img border="0" src="/adm/lonMisc/chat.gif" />' .
               $linkclose;
       }
       
       if ($resource->getFeedback()) {
           my $feedback = $resource->getFeedback();
           foreach (split(/\,/, $feedback)) {
               if ($_) {
                   $feedbackHTML .= '&nbsp;<a href="/adm/email?display='
                       . &Apache::lonnet::escape($_) . '">'
                       . '<img src="/adm/lonMisc/feedback.gif" '
                       . 'border="0" /></a>';
               }
           }
       }
       
       if ($resource->getErrors()) {
           my $errors = $resource->getErrors();
           foreach (split(/,/, $errors)) {
               if ($_) {
                   $errorHTML .= '&nbsp;<a href="/adm/email?display='
                       . &Apache::lonnet::escape($_) . '">'
                       . '<img src="/adm/lonMisc/bomb.gif" '
                       . 'border="0" /></a>';
               }
           }
       }
   
       return "<td width=\"75\" align=\"left\" valign=\"center\">$discussionHTML$feedbackHTML$errorHTML&nbsp;</td>";
   
 }  }
 sub render_quick_status {  sub render_quick_status {
     my ($resource, $part, $params) = @_;      my ($resource, $part, $params) = @_;
Line 1380  sub render { Line 1412  sub render {
             my $backgroundColor = $backgroundColors[$rownum % scalar(@backgroundColors)];              my $backgroundColor = $backgroundColors[$rownum % scalar(@backgroundColors)];
                           
             $result .= "  <tr bgcolor='$backgroundColor'>\n";              $result .= "  <tr bgcolor='$backgroundColor'>\n";
   
               # Set up some data about the parts that the cols might want
               my $filter = $it->{FILTER};
               my $stack = $it->getStack();
               my $src = getLinkForResource($stack);
               
               my $srcHasQuestion = $src =~ /\?/;
               $args->{"resourceLink"} = $src.
                   ($srcHasQuestion?'&':'?') .
                   'symb=' . &Apache::lonnet::escape($curRes->symb()).
                   '"';
                           
             # Now, display each column.              # Now, display each column.
             foreach my $col (@$cols) {              foreach my $col (@$cols) {
                 $result .= "    <td>";  
   
                 # If this is the first column and it's time to print                  # If this is the first column and it's time to print
                 # the anchor, do so                  # the anchor, do so
Line 1401  sub render { Line 1443  sub render {
                     $result .= &{$preparedColumns[$col]}($curRes, $part, $args);                      $result .= &{$preparedColumns[$col]}($curRes, $part, $args);
                 }                  }
   
                 $result .= "</td>\n";  
             }              }
   
             $result .= "  </tr>\n";              $result .= "  </tr>\n";
Line 1411  sub render { Line 1452  sub render {
         $curRes = $it->next();          $curRes = $it->next();
     }      }
           
       # Print out the part that jumps to #curloc if it exists
       if ($args->{"displayedJumpMarker"}) {
           $result .= "<script>location += "#curloc";</script>\n";
       }
   
     $result .= "</table>";      $result .= "</table>";
   
     return $result;      return $result;

Removed from v.1.133  
changed lines
  Added in v.1.134


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