Diff for /loncom/interface/lonnavmaps.pm between versions 1.32 and 1.39

version 1.32, 2002/03/16 08:56:53 version 1.39, 2002/07/25 16:55:53
Line 338  sub followlinks () { Line 338  sub followlinks () {
 sub tracetable {  sub tracetable {
     my ($sofar,$rid,$beenhere,$showtypes,$indent,$linkid)=@_;      my ($sofar,$rid,$beenhere,$showtypes,$indent,$linkid)=@_;
     my $newshowtypes=$showtypes;      my $newshowtypes=$showtypes;
     my $newlinkid=$linkid;  
     my $further=$sofar;      my $further=$sofar;
     #$Apache::lonxml::debug=1;      #$Apache::lonxml::debug=1;
     &Apache::lonxml::debug("$rid ; $linkid ; $sofar ; $beenhere ; ".$hash{'src_'.$rid});      &Apache::lonxml::debug("$rid ; $linkid ; $sofar ; $beenhere ; ".$hash{'src_'.$rid});
Line 355  sub tracetable { Line 354  sub tracetable {
  eq 'page') {   eq 'page') {
     $tprefix='j';      $tprefix='j';
     if ($indent) { $tprefix='i'.$indent.','.$tprefix; }      if ($indent) { $tprefix='i'.$indent.','.$tprefix; }
       if ($linkid) { $tprefix='l'.$linkid.','.$tprefix; }
     $newshowtypes='problems';      $newshowtypes='problems';
     $indent++;      $indent++;
     $newlinkid=$rid;      #if in a .page continue to link the encompising .page
       if (!$linkid) { $linkid=$rid; }
  }   }
  if (defined($rows[$sofar])) {   if (defined($rows[$sofar])) {
     $rows[$sofar].='&'.$tprefix.$rid;      $rows[$sofar].='&'.$tprefix.$rid;
Line 368  sub tracetable { Line 369  sub tracetable {
     (defined($hash{'map_finish_'.$hash{'src_'.$rid}}))) {      (defined($hash{'map_finish_'.$hash{'src_'.$rid}}))) {
     my $frid=$hash{'map_finish_'.$hash{'src_'.$rid}};      my $frid=$hash{'map_finish_'.$hash{'src_'.$rid}};
     $sofar=&tracetable($sofar,$hash{'map_start_'.$hash{'src_'.$rid}},      $sofar=&tracetable($sofar,$hash{'map_start_'.$hash{'src_'.$rid}},
        '&'.$frid.'&',$newshowtypes,$indent,$newlinkid);         '&'.$frid.'&',$newshowtypes,$indent,$linkid);
     &addresource($hash{'src_'.$frid},\$sofar,$frid,$newshowtypes,      &addresource($hash{'src_'.$frid},\$sofar,$frid,$newshowtypes,
  $indent,$newlinkid);   $indent,$linkid);
     if ($tprefix =~ /j$/) { $indent--; }      if ($tprefix =~ /j$/) { $indent--; $linkid=''; }
  }   }
     } else {      } else {
  &addresource($hash{'src_'.$rid},\$sofar,$rid,$showtypes,   &addresource($hash{'src_'.$rid},\$sofar,$rid,$showtypes,
Line 611  sub handler { Line 612  sub handler {
  my $indent;my $indentstr;   my $indent;my $indentstr;
  my $linkid;   my $linkid;
  my $rid=$colcont[$j];   my $rid=$colcont[$j];
                           $rid=~/(\d+)\.(\d+)$/;
    my $src=
      &Apache::lonnet::declutter($hash{'src_'.$1.'.'.$2});
    my $symb=
     &Apache::lonnet::declutter($hash{'map_id_'.$1}).'___'.$2.'___'.$src;
  my $add='<td>';   my $add='<td>';
  my $adde='</td>';   my $adde='</td>';
  my $hwk='<font color="#223322">';   my $hwk='<font color="#223322">';
Line 621  sub handler { Line 627  sub handler {
     $rid=$1;      $rid=$1;
     $add='<th bgcolor="#AAFF55"><a name="'.$rid.'">';      $add='<th bgcolor="#AAFF55"><a name="'.$rid.'">';
     $adde='</th>';      $adde='</th>';
                               if (($ENV{'user.adv'}) && 
    ($parmhash{$symb.'.0.parameter_randompick'})) {
                                  $adde=' (randomly select '.
      $parmhash{$symb.'.0.parameter_randompick'}.
                                      ')</th>';
                               }
  }   }
  if ($rid=~/^j(.+)/) { $rid=$1; }   if ($rid=~/^j(.+)/) { $rid=$1; }
  if ($rid=~/^p(\d)(\d)\"([\w\: \(\)\/\,]*)\"(.+)/) {   if ($rid=~/^p(\d)(\d)\"([\w\: \(\)\/\,]*)\"(.+)/) {
Line 660  sub handler { Line 672  sub handler {
  $hwke='</b> ('.$ctext.')</font>';   $hwke='</b> ('.$ctext.')</font>';
     }      }
  }   }
  if ($hash{'src_'.$rid} eq $currenturl) {   if ($rid && $hash{'src_'.$rid} eq $currenturl) {
     $add=$add.'<a name="curloc"></a>'.      $add=$add.'<a name="curloc"></a>'.
  '<font color=red size=+2><b>&gt; </b></font>';   '<font color=red size=+2><b>&gt; </b></font>';
     $adde=      $adde=
  '<font color=red size=+2><b> &lt;</b></font>'.$adde;   '<font color=red size=+2><b> &lt;</b></font>'.$adde;
  }   }
  my $src=  
     &Apache::lonnet::declutter($hash{'src_'.$rid});  
  $rid=~/^(\d+)\.(\d+)$/;  
  my $symb=  
     &Apache::lonnet::declutter($hash{'map_id_'.$1}).'___'.$2.'___'.$src;  
  if ($discussiontimes{$symb}>$lastcheck) {   if ($discussiontimes{$symb}>$lastcheck) {
     $adde=      $adde=
  '<img border=0 src="/adm/lonMisc/chat.gif">'.   '<img border=0 src="/adm/lonMisc/chat.gif">'.
Line 703  sub handler { Line 710  sub handler {
     for(my $i=-1;$i<$indent;$i++) { $indentstr.=$is; }      for(my $i=-1;$i<$indent;$i++) { $indentstr.=$is; }
  }   }
  if (!$linkid) { $linkid=$rid; }   if (!$linkid) { $linkid=$rid; }
  $r->print($add.$indentstr.                          if ($hash{'randomout_'.$rid}) {
   '<a href="'.$hash{'src_'.$linkid}.'">'.$hwk.                              $adde=' <i>(hidden)</i>'.$adde;
   $hash{'title_'.$rid}.$hwke.'</a>'.$adde);                          }
    $r->print($add.$indentstr);
    if ($rid) {
       $r->print('<a href="'.$hash{'src_'.$linkid}.
                                         (($hash{'src_'.$linkid}=~/\?/)?'&':'?').
                                         'symb='.&Apache::lonnet::escape($symb)
                                          .'">'.
         $hwk.$hash{'title_'.$rid}.$hwke.'</a>');
    }
    $r->print($adde);
     }      }
     $r->print('</tr>');      $r->print('</tr>');
  }   }

Removed from v.1.32  
changed lines
  Added in v.1.39


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