[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sat, 05 Feb 2005 06:21:58 -0000
albertel Sat Feb 5 01:21:58 2005 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
- step one for BUG#1444, moved the pink columns in lonparmset.pm
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.181 loncom/interface/lonparmset.pm:1.182
--- loncom/interface/lonparmset.pm:1.181 Wed Feb 2 14:23:59 2005
+++ loncom/interface/lonparmset.pm Sat Feb 5 01:21:57 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.181 2005/02/02 19:23:59 albertel Exp $
+# $Id: lonparmset.pm,v 1.182 2005/02/05 06:21:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -96,10 +96,10 @@
Returns: A list, the first item is the index into the remaining list of items of parm valuse that is the active one, the list consists of parm values at the 11 possible levels
-11- resource default
-10- map default
-9 - General Course
-8 - Map or Folder level in course
+11 - General Course
+10 - Map or Folder level in course
+9- resource default
+8- map default
7 - resource level in course
6 - General for section
5 - Map or Folder level for section
@@ -129,32 +129,35 @@
my $courselevelr=$ENV{'request.course.id'}.'.'.$symbparm;
my $courselevelm=$ENV{'request.course.id'}.'.'.$mapparm;
-# -------------------------------------------------------- first, check default
- if (defined($def)) { $outpar[11]=$def; $result=11; }
-# ----------------------------------------------------- second, check map parms
-
- my $thisparm=$parmhash{$symbparm};
- if (defined($thisparm)) { $outpar[10]=$thisparm; $result=10; }
-
-# --------------------------------------------------------- third, check course
+# --------------------------------------------------------- first, check course
if (defined($courseopt{$courselevel})) {
- $outpar[9]=$courseopt{$courselevel};
- $result=9;
+ $outpar[11]=$courseopt{$courselevel};
+ $result=11;
}
if (defined($courseopt{$courselevelm})) {
- $outpar[8]=$courseopt{$courselevelm};
- $result=8;
+ $outpar[10]=$courseopt{$courselevelm};
+ $result=10;
}
+# ------------------------------------------------------- second, check default
+
+ if (defined($def)) { $outpar[9]=$def; $result=9; }
+
+# ------------------------------------------------------ third, check map parms
+
+ my $thisparm=$parmhash{$symbparm};
+ if (defined($thisparm)) { $outpar[8]=$thisparm; $result=8; }
+
if (defined($courseopt{$courselevelr})) {
$outpar[7]=$courseopt{$courselevelr};
$result=7;
}
+# ------------------------------------------------------ fourth, back to course
if (defined($csec)) {
if (defined($courseopt{$seclevel})) {
$outpar[6]=$courseopt{$seclevel};
@@ -171,7 +174,7 @@
}
}
-# ---------------------------------------------------------- fourth, check user
+# ---------------------------------------------------------- fifth, check user
if (defined($uname)) {
if (defined($useropt{$courselevel})) {
@@ -419,15 +422,14 @@
$$name{$which}.'.type',
$rid,$$defaulttype{$which});
# cascade down manually
- my $cascadetype=$defaulttype;
- for (my $i=$#typeoutpar;$i>0;$i--) {
+ my $cascadetype=$$defaulttype{$which};
+ for (my $i=11;$i>0;$i--) {
if ($typeoutpar[$i]) {
$cascadetype=$typeoutpar[$i];
} else {
$typeoutpar[$i]=$cascadetype;
}
}
-
my $parm=$$display{$which};
if ($parmlev eq 'full' || $parmlev eq 'brief') {
@@ -450,7 +452,7 @@
} elsif ($csec) {
&print_td($r,6,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
} else {
- &print_td($r,9,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+ &print_td($r,11,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
}
} elsif ($parmlev eq 'map') {
@@ -459,11 +461,11 @@
} elsif ($csec) {
&print_td($r,5,$defbgtwo,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
} else {
- &print_td($r,8,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+ &print_td($r,10,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
}
} else {
- &print_td($r,11,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+ &print_td($r,11,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
if ($parmlev eq 'brief') {
@@ -477,9 +479,9 @@
}
} else {
- &print_td($r,10,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
- &print_td($r,9,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
- &print_td($r,8,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+ &print_td($r,10,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+ &print_td($r,9,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
+ &print_td($r,8,'#FFDDDD',$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
&print_td($r,7,$defbgone,$result,\@outpar,$mprefix,$_,\@typeoutpar,$display);
if ($csec) {
@@ -520,7 +522,7 @@
my ($r,$which,$defbg,$result,$outpar,$mprefix,$value,$typeoutpar,$display)=@_;
$r->print('<td bgcolor='.(($result==$which)?'"#AAFFAA"':$defbg).
' align="center">');
- if ($which<10) {
+ if ($which<8 || $which > 9) {
$r->print(&plink($$typeoutpar[$which],
$$display{$value},$$outpar[$which],
$mprefix."$which",'parmform.pres','psub'));
@@ -828,8 +830,8 @@
my $courselevelm=$ENV{'request.course.id'}.'.'.$mapparm;
my $storeunder='';
- if (($snum==9) || ($snum==3)) { $storeunder=$courselevel; }
- if (($snum==8) || ($snum==2)) { $storeunder=$courselevelm; }
+ if (($snum==11) || ($snum==3)) { $storeunder=$courselevel; }
+ if (($snum==10) || ($snum==2)) { $storeunder=$courselevelm; }
if (($snum==7) || ($snum==1)) { $storeunder=$courselevelr; }
if ($snum==6) { $storeunder=$seclevel; }
if ($snum==5) { $storeunder=$seclevelm; }
@@ -1144,8 +1146,9 @@
$r->print(<<ENDTABLETWO);
<th rowspan=3>$lt{'pie'}</th>
<th rowspan=3>$lt{'csv'}<br>($csuname $lt{'at'} $csudom)</th>
-</tr><tr><td colspan=5></td><th colspan=2>$lt{'rl'}</th>
-<th colspan=3>$lt{'ic'}</th>
+</tr><tr><td colspan=5></td><th colspan=2>$lt{'ic'}</th><th colspan=2>$lt{'rl'}</th>
+<th colspan=1>$lt{'ic'}</th>
+
ENDTABLETWO
if ($csec) {
$r->print("<th colspan=3>".
@@ -1154,8 +1157,8 @@
$r->print(<<ENDTABLEHEADFOUR);
</tr><tr><th>$lt{'aut'}</th><th>$lt{'type'}</th>
<th>$lt{'emof'}</th><th>$lt{'part'}</th><th>$lt{'pn'}</th>
-<th>$lt{'def'}</th><th>$lt{'femof'}</th>
-<th>$lt{'gen'}</th><th>$lt{'foremf'}</th><th>$lt{'fr'}</th>
+<th>$lt{'gen'}</th><th>$lt{'femof'}</th>
+<th>$lt{'def'}</th><th>$lt{'foremf'}</th><th>$lt{'fr'}</th>
ENDTABLEHEADFOUR
if ($csec) {