version 1.18, 2000/11/28 15:39:52
|
version 1.20, 2000/12/12 21:33:50
|
Line 9
|
Line 9
|
# |
# |
# 10/11,10/12,10/16 Gerd Kortemeyer) |
# 10/11,10/12,10/16 Gerd Kortemeyer) |
# |
# |
# 11/20,11/21,11/22,11/23,11/24,11/25,11/27,11/28 Gerd Kortemeyer |
# 11/20,11/21,11/22,11/23,11/24,11/25,11/27,11/28, |
|
# 12/08,12/12 Gerd Kortemeyer |
|
|
package Apache::lonparmset; |
package Apache::lonparmset; |
|
|
Line 250 sub handler {
|
Line 251 sub handler {
|
$allkeys{$allkey}=$display; |
$allkeys{$allkey}=$display; |
if ($allkey eq $fcat) { |
if ($allkey eq $fcat) { |
$defp{$id}= |
$defp{$id}= |
&Apache::lonnet::metadata($srcf,$key.'.default'); |
&Apache::lonnet::metadata($srcf,$key); |
} |
} |
if ($keyp{$id}) { |
if ($keyp{$id}) { |
$keyp{$id}.=','.$key; |
$keyp{$id}.=','.$key; |
Line 460 ENDTABLEHEADFOUR
|
Line 461 ENDTABLEHEADFOUR
|
$r->print('<th>general</th><th>for Enclosing Map</th><th>for Resource</th>'); |
$r->print('<th>general</th><th>for Enclosing Map</th><th>for Resource</th>'); |
} |
} |
$r->print('</tr><tr>'); |
$r->print('</tr><tr>'); |
|
my $defbgone=''; |
|
my $defbgtwo=''; |
map { |
map { |
# ------------------------------------------------------ Entry for one resource |
# ------------------------------------------------------ Entry for one resource |
|
if ($defbgone eq '"E0E099"') { |
|
$defbgone='"E0E0DD"'; |
|
} else { |
|
$defbgone='"E0E099"'; |
|
} |
|
if ($defbgtwo eq '"FFFF99"') { |
|
$defbgtwo='"FFFFDD"'; |
|
} else { |
|
$defbgtwo='"FFFF99"'; |
|
} |
@outpar=(); |
@outpar=(); |
my $rid=$_; |
my $rid=$_; |
my $thistitle=''; |
my $thistitle=''; |
Line 478 ENDTABLEHEADFOUR
|
Line 491 ENDTABLEHEADFOUR
|
$display{$_}=&Apache::lonnet::metadata($uri,$_.'.display'); |
$display{$_}=&Apache::lonnet::metadata($uri,$_.'.display'); |
unless ($display{$_}) { $display{$_}=''; } |
unless ($display{$_}) { $display{$_}=''; } |
$display{$_}.=' ('.$name{$_}.')'; |
$display{$_}.=' ('.$name{$_}.')'; |
$default{$_}=&Apache::lonnet::metadata($uri,$_.'.default'); |
$default{$_}=&Apache::lonnet::metadata($uri,$_); |
$type{$_}=&Apache::lonnet::metadata($uri,$_.'.type'); |
$type{$_}=&Apache::lonnet::metadata($uri,$_.'.type'); |
$thistitle=&Apache::lonnet::metadata($uri,$_.'.title'); |
$thistitle=&Apache::lonnet::metadata($uri,$_.'.title'); |
} split(/\,/,$keyp{$rid}); |
} split(/\,/,$keyp{$rid}); |
|
|
my $totalparms=scalar keys %name; |
my $totalparms=scalar keys %name; |
$r->print('<td rowspan='.$totalparms.'><tt><font size=-1>'. |
$r->print('<td bgcolor='.$defbgone. |
|
' rowspan='.$totalparms.'><tt><font size=-1>'. |
join(' / ',split(/\//,$uri)). |
join(' / ',split(/\//,$uri)). |
'</font></tt><p><b>'. |
'</font></tt><p><b>'. |
$bighash{'title_'.$rid}); |
$bighash{'title_'.$rid}); |
Line 492 ENDTABLEHEADFOUR
|
Line 506 ENDTABLEHEADFOUR
|
$r->print(' ('.$thistitle.')'); |
$r->print(' ('.$thistitle.')'); |
} |
} |
$r->print('</b></td>'); |
$r->print('</b></td>'); |
$r->print('<td rowspan='.$totalparms.'>'.$typep{$rid}.'</td>'); |
$r->print('<td bgcolor='.$defbgtwo. |
$r->print('<td rowspan='.$totalparms.'><tt><font size=-1>'. |
' rowspan='.$totalparms.'>'.$typep{$rid}.'</td>'); |
|
$r->print('<td bgcolor='.$defbgone. |
|
' rowspan='.$totalparms.'><tt><font size=-1>'. |
join(' / ',split(/\//,$mapp{$rid})).'</font></tt></td>'); |
join(' / ',split(/\//,$mapp{$rid})).'</font></tt></td>'); |
map { |
map { |
|
|
my $result=&parmval($part{$_}.'.'.$name{$_},$rid,$default{$_}); |
my $result=&parmval($part{$_}.'.'.$name{$_},$rid,$default{$_}); |
|
|
$r->print("<td>$part{$_}</td><td>$display{$_}</td>"); |
$r->print("<td bgcolor=".$defbgtwo. |
|
">$part{$_}</td><td bgcolor=".$defbgone. |
|
">$display{$_}</td>"); |
my $thismarker=$_; |
my $thismarker=$_; |
$thismarker=~s/^parameter\_//; |
$thismarker=~s/^parameter\_//; |
my $mprefix=$rid.'&'.$thismarker.'&'; |
my $mprefix=$rid.'&'.$thismarker.'&'; |
|
|
$r->print('<td'.(($result==11)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==11)?'"#AAFFAA"':'#FFDDDD').'>'. |
&valout($outpar[11],$type{$_}).'</td>'); |
&valout($outpar[11],$type{$_}).'</td>'); |
$r->print('<td'.(($result==10)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==10)?'"#AAFFAA"':'#FFDDDD').'>'. |
&valout($outpar[10],$type{$_}).'</td>'); |
&valout($outpar[10],$type{$_}).'</td>'); |
|
|
$r->print('<td'.(($result==9)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==9)?'"#AAFFAA"':$defbgone).'>'. |
&plink($type{$_},$display{$_},$outpar[9],$mprefix.'9', |
&plink($type{$_},$display{$_},$outpar[9],$mprefix.'9', |
'parmform.pres','psub').'</td>'); |
'parmform.pres','psub').'</td>'); |
$r->print('<td'.(($result==8)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==8)?'"#AAFFAA"':$defbgone).'>'. |
&plink($type{$_},$display{$_},$outpar[8],$mprefix.'8', |
&plink($type{$_},$display{$_},$outpar[8],$mprefix.'8', |
'parmform.pres','psub').'</td>'); |
'parmform.pres','psub').'</td>'); |
$r->print('<td'.(($result==7)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==7)?'"#AAFFAA"':$defbgone).'>'. |
&plink($type{$_},$display{$_},$outpar[7],$mprefix.'7', |
&plink($type{$_},$display{$_},$outpar[7],$mprefix.'7', |
'parmform.pres','psub').'</td>'); |
'parmform.pres','psub').'</td>'); |
|
|
if ($csec) { |
if ($csec) { |
$r->print('<td'.(($result==6)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==6)?'"#AAFFAA"':$defbgtwo).'>'. |
&plink($type{$_},$display{$_},$outpar[6],$mprefix.'6', |
&plink($type{$_},$display{$_},$outpar[6],$mprefix.'6', |
'parmform.pres','psub').'</td>'); |
'parmform.pres','psub').'</td>'); |
$r->print('<td'.(($result==5)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==5)?'"#AAFFAA"':$defbgtwo).'>'. |
&plink($type{$_},$display{$_},$outpar[5],$mprefix.'5', |
&plink($type{$_},$display{$_},$outpar[5],$mprefix.'5', |
'parmform.pres','psub').'</td>'); |
'parmform.pres','psub').'</td>'); |
$r->print('<td'.(($result==4)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==4)?'"#AAFFAA"':$defbgtwo).'>'. |
&plink($type{$_},$display{$_},$outpar[4],$mprefix.'4', |
&plink($type{$_},$display{$_},$outpar[4],$mprefix.'4', |
'parmform.pres','psub').'</td>'); |
'parmform.pres','psub').'</td>'); |
} |
} |
|
|
if ($uname) { |
if ($uname) { |
$r->print('<td'.(($result==3)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==3)?'"#AAFFAA"':$defbgone).'>'. |
&plink($type{$_},$display{$_},$outpar[3],$mprefix.'3', |
&plink($type{$_},$display{$_},$outpar[3],$mprefix.'3', |
'parmform.pres','psub').'</td>'); |
'parmform.pres','psub').'</td>'); |
$r->print('<td'.(($result==2)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==2)?'"#AAFFAA"':$defbgone).'>'. |
&plink($type{$_},$display{$_},$outpar[2],$mprefix.'2', |
&plink($type{$_},$display{$_},$outpar[2],$mprefix.'2', |
'parmform.pres','psub').'</td>'); |
'parmform.pres','psub').'</td>'); |
$r->print('<td'.(($result==1)?' bgcolor="#AAFFAA"':'').'>'. |
$r->print('<td bgcolor='. |
|
(($result==1)?'"#AAFFAA"':$defbgone).'>'. |
&plink($type{$_},$display{$_},$outpar[1],$mprefix.'1', |
&plink($type{$_},$display{$_},$outpar[1],$mprefix.'1', |
'parmform.pres','psub').'</td>'); |
'parmform.pres','psub').'</td>'); |
} |
} |
|
|
$r->print('<td>'.&valout($outpar[$result],$type{$_}).'</td>'); |
$r->print( |
|
'<td bgcolor=#CCCCFF>'.&valout($outpar[$result],$type{$_}).'</td>'); |
$r->print("</tr>\n<tr>"); |
$r->print("</tr>\n<tr>"); |
} sort keys %name; |
} sort keys %name; |
# -------------------------------------------------- End entry for one resource |
# -------------------------------------------------- End entry for one resource |