version 1.12, 2001/01/30 22:26:33
|
version 1.14, 2001/02/08 21:47:44
|
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/) && |
|
($currenturl!~/^\/res\/adm/)) { |
|
$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/) && |
|
($currenturl!~/^\/res\/adm/)) { |
|
$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( |
|
' <a href="#'.$rid.'">'.$hash{'title_'.$rid}.'</a><br>'); |
|
} |
|
} |
|
} |
|
} |
# ----------------------------------------------------------------- Start table |
# ----------------------------------------------------------------- Start table |
$r->print('<table cols="'.$lcm.'" border="0">'); |
$r->print('<hr><table cols="'.$lcm.'" border="0">'); |
for ($i=0;$i<=$#rows;$i++) { |
for ($i=0;$i<=$#rows;$i++) { |
if ($rows[$i]) { |
if ($rows[$i]) { |
$r->print("\n<tr>"); |
$r->print("\n<tr>"); |
Line 464 sub handler {
|
Line 492 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 530 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>-> </b></font>'; |
|
$adde= |
|
'<font color=red><b> <-</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 544 sub handler {
|
} |
} |
} |
} |
$r->print("\n</table>"); |
$r->print("\n</table>"); |
|
|
$r->print('</body></html>'); |
$r->print('</body></html>'); |
# -------------------------------------------------------------------- End page |
# -------------------------------------------------------------------- End page |
} |
} |