version 1.3, 2001/01/06 19:59:29
|
version 1.7, 2001/01/16 22:19:18
|
Line 45 sub tracetable {
|
Line 45 sub tracetable {
|
$beenhere.=$rid.'&'; |
$beenhere.=$rid.'&'; |
|
|
if (defined($hash{'is_map_'.$rid})) { |
if (defined($hash{'is_map_'.$rid})) { |
|
$sofar++; |
|
my $tprefix=''; |
|
if ($hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$rid}}} |
|
eq 'sequence') { |
|
$tprefix='h'; |
|
} |
|
if (defined($rows[$sofar])) { |
|
$rows[$sofar].='&'.$tprefix.$rid; |
|
} else { |
|
$rows[$sofar]=$tprefix.$rid; |
|
} |
if ((defined($hash{'map_start_'.$hash{'src_'.$rid}})) && |
if ((defined($hash{'map_start_'.$hash{'src_'.$rid}})) && |
(defined($hash{'map_finish_'.$hash{'src_'.$rid}}))) { |
(defined($hash{'map_finish_'.$hash{'src_'.$rid}})) && |
|
($tprefix eq 'h')) { |
my $frid=$hash{'map_finish_'.$hash{'src_'.$rid}}; |
my $frid=$hash{'map_finish_'.$hash{'src_'.$rid}}; |
$sofar= |
$sofar= |
&tracetable($sofar,$hash{'map_start_'.$hash{'src_'.$rid}}, |
&tracetable($sofar,$hash{'map_start_'.$hash{'src_'.$rid}}, |
Line 55 sub tracetable {
|
Line 67 sub tracetable {
|
if ($hash{'src_'.$frid}) { |
if ($hash{'src_'.$frid}) { |
my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$frid}); |
my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$frid}); |
if (($brepriv eq '2') || ($brepriv eq 'F')) { |
if (($brepriv eq '2') || ($brepriv eq 'F')) { |
|
my $pprefix=''; |
|
if ($hash{'src_'.$frid}=~/\.problem$/) { |
|
$pprefix='p1'; |
|
} |
if (defined($rows[$sofar])) { |
if (defined($rows[$sofar])) { |
$rows[$sofar].='&'.$frid; |
$rows[$sofar].='&'.$pprefix.$frid; |
} else { |
} else { |
$rows[$sofar]=$frid; |
$rows[$sofar]=$pprefix.$frid; |
} |
} |
} |
} |
} |
} |
Line 68 sub tracetable {
|
Line 84 sub tracetable {
|
if ($hash{'src_'.$rid}) { |
if ($hash{'src_'.$rid}) { |
my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$rid}); |
my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$rid}); |
if (($brepriv eq '2') || ($brepriv eq 'F')) { |
if (($brepriv eq '2') || ($brepriv eq 'F')) { |
|
my $pprefix=''; |
|
if ($hash{'src_'.$rid}=~/\.problem$/) { |
|
$pprefix='p1'; |
|
} |
if (defined($rows[$sofar])) { |
if (defined($rows[$sofar])) { |
$rows[$sofar].='&'.$rid; |
$rows[$sofar].='&'.$pprefix.$rid; |
} else { |
} else { |
$rows[$sofar]=$rid; |
$rows[$sofar]=$pprefix.$rid; |
} |
} |
} |
} |
} |
} |
Line 149 sub handler {
|
Line 169 sub handler {
|
# ------------------------------------------------------------------ Page parms |
# ------------------------------------------------------------------ Page parms |
|
|
my $j; |
my $j; |
|
my $i; |
my $lcm=1; |
my $lcm=1; |
my $contents=0; |
my $contents=0; |
|
|
Line 162 sub handler {
|
Line 183 sub handler {
|
} |
} |
} |
} |
|
|
|
|
unless ($contents) { |
unless ($contents) { |
$r->content_type('text/html'); |
$r->content_type('text/html'); |
$r->send_http_header; |
$r->send_http_header; |
Line 177 sub handler {
|
Line 199 sub handler {
|
'<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">'. |
|
'<img align=right src=/adm/lonIcons/lonlogos.gif>'. |
'<h1>Navigate Course Map</h1>'); |
'<h1>Navigate Course Map</h1>'); |
$r->rflush(); |
$r->rflush(); |
# ----------------------------------------------------------------- Start table |
# ----------------------------------------------------------------- Start table |
Line 188 sub handler {
|
Line 211 sub handler {
|
my $avespan=$lcm/($#colcont+1); |
my $avespan=$lcm/($#colcont+1); |
for ($j=0;$j<=$#colcont;$j++) { |
for ($j=0;$j<=$#colcont;$j++) { |
my $rid=$colcont[$j]; |
my $rid=$colcont[$j]; |
$r->print('<td><a href="'. |
my $add='<td> '; |
$hash{'src_'.$rid}.'">'. |
my $adde='</td>'; |
$hash{'title_'.$rid}.'</a>'); |
my $hwk='<font color="#223322">'; |
$r->print('</td>'); |
my $hwke='</font>'; |
|
if ($rid=~/^h(.+)/) { |
|
$rid=$1; |
|
$add='<th bgcolor="#AAFF55">'; |
|
$adde='</th>'; |
|
} |
|
if ($rid=~/^p(\d)(.+)/) { |
|
my $code=$1; |
|
$rid=$2; |
|
$hwk='<font color="#999911">'; |
|
if ($code eq '2') { |
|
$hwk='<font color="#999911"><b>'; |
|
$hwke='</b></font>'; |
|
} |
|
if ($code eq '3') { |
|
$hwk='<font color="#229922">'; |
|
} elsif ($code eq '4') { |
|
$hwk='<font color="#992222">'; |
|
} |
|
} |
|
$r->print($add.'<a href="'.$hash{'src_'.$rid}. |
|
'">'.$hwk. |
|
$hash{'title_'.$rid}.$hwke.'</a>'.$adde); |
} |
} |
$r->print('</tr>'); |
$r->print('</tr>'); |
} |
} |