Diff for /loncom/interface/lonnavmaps.pm between versions 1.12 and 1.13

version 1.12, 2001/01/30 22:26:33 version 1.13, 2001/02/08 17:01:34
Line 9 Line 9
 # 08/30,08/31,09/06,09/14,09/15,09/16,09/19,09/20,09/21,09/23,  # 08/30,08/31,09/06,09/14,09/15,09/16,09/19,09/20,09/21,09/23,
 # 10/02,10/10,10/14,10/16,10/18,10/19,10/31,11/6,11/14,11/16 Gerd Kortemeyer)  # 10/02,10/10,10/14,10/16,10/18,10/19,10/31,11/6,11/14,11/16 Gerd Kortemeyer)
 #  #
 # 3/1/1,6/1,17/1,29/1,30/1 Gerd Kortemeyer  # 3/1/1,6/1,17/1,29/1,30/1,2/8 Gerd Kortemeyer
   
 package Apache::lonnavmaps;  package Apache::lonnavmaps;
   
Line 437  sub handler { Line 437  sub handler {
   
 # ------------------------------------------------------------------ Build page  # ------------------------------------------------------------------ Build page
   
         my $currenturl=$ENV{'form.postdata'};
                         $currenturl=~s/^http\:\/\///;
                         $currenturl=~s/^[^\/]+//;
   
 # ---------------------------------------------------------------- Send headers  # ---------------------------------------------------------------- Send headers
   
                           $r->content_type('text/html');                            $r->content_type('text/html');
Line 444  sub handler { Line 448  sub handler {
                           $r->print(                            $r->print(
                    '<html><head><title>Navigate LON-CAPA Maps</title></head>');                     '<html><head><title>Navigate LON-CAPA Maps</title></head>');
   
   $r->print('<body bgcolor="#FFFFFF">'.    $r->print('<body bgcolor="#FFFFFF"');
                                     '<script>window.focus();</script>'.                            if ($currenturl=~/^\/res/) {
                                $r->print(' onLoad="window.location.hash='.
          "'curloc'".'"');
     }
                             $r->print('><script>window.focus();</script>'.
                            '<img align=right src=/adm/lonIcons/lonlogos.gif>'.                             '<img align=right src=/adm/lonIcons/lonlogos.gif>'.
                                     '<h1>Navigate Course Map</h1>');                                      '<h1>Navigate Course Map</h1>');
                           $r->rflush();        $r->rflush();
                         if ($currenturl=~/^\/res/) {
          $r->print('<a href="#curloc">Current Location</a><p>');
                         }
   # ----------------------------------------------------- The little content list
                         for ($i=0;$i<=$#rows;$i++) {
    if ($rows[$i]) {
                             my @colcont=split(/\&/,$rows[$i]);
                             my $avespan=$lcm/($#colcont+1);
                             for ($j=0;$j<=$#colcont;$j++) {
                                 my $rid=$colcont[$j];
                                 if ($rid=~/^h(.+)/) {
     $rid=$1;
                                     $r->print(
        '&nbsp;&nbsp;&nbsp;<a href="#'.$rid.'">'.$hash{'title_'.$rid}.'</a><br>');
                                 }
                             }
           }
                         }
 # ----------------------------------------------------------------- Start table  # ----------------------------------------------------------------- Start table
                       $r->print('<table cols="'.$lcm.'" border="0">');                        $r->print('<table cols="'.$lcm.'" border="0">');
                       for ($i=0;$i<=$#rows;$i++) {                        for ($i=0;$i<=$#rows;$i++) {
Line 464  sub handler { Line 490  sub handler {
                               my $hwke='</font>';                                my $hwke='</font>';
                               if ($rid=~/^h(.+)/) {                                if ($rid=~/^h(.+)/) {
   $rid=$1;    $rid=$1;
                                   $add='<th bgcolor="#AAFF55">';                                    $add=
                                      '<th bgcolor="#AAFF55"><a name="'.$rid.'">';
                                   $adde='</th>';                                    $adde='</th>';
                               }                                }
                             if ($rid=~/^p(\d)(\d)\"([\w\: \(\)\/\,]*)\"(.+)/) {                              if ($rid=~/^p(\d)(\d)\"([\w\: \(\)\/\,]*)\"(.+)/) {
Line 501  sub handler { Line 528  sub handler {
                                      $hwke='</b> ('.$ctext.')</font>';                                       $hwke='</b> ('.$ctext.')</font>';
                                   }                                    }
                               }                                }
         if ($hash{'src_'.$rid} eq $currenturl) {
                                     $add=$add.'<a name="curloc"></a>'.
         '<font color=red><b>-&gt; </b></font>';
                                     $adde=
                                   '<font color=red><b> &lt;-</b></font>'.$adde;
                                 }
                               $r->print($add.'<a href="'.$hash{'src_'.$rid}.                                $r->print($add.'<a href="'.$hash{'src_'.$rid}.
                                 '">'.$hwk.                                  '">'.$hwk.
                                 $hash{'title_'.$rid}.$hwke.'</a>'.$adde);                                  $hash{'title_'.$rid}.$hwke.'</a>'.$adde);
Line 509  sub handler { Line 542  sub handler {
         }          }
                       }                        }
                       $r->print("\n</table>");                        $r->print("\n</table>");
   
                       $r->print('</body></html>');                        $r->print('</body></html>');
 # -------------------------------------------------------------------- End page  # -------------------------------------------------------------------- End page
                   }                                      }                  

Removed from v.1.12  
changed lines
  Added in v.1.13


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