--- loncom/interface/lonparmset.pm 2000/11/27 12:14:32 1.13 +++ loncom/interface/lonparmset.pm 2000/11/27 15:12:42 1.14 @@ -53,13 +53,13 @@ sub parmval { my $seclevel= $ENV{'request.course.id'}.'.['. - $ENV{'request.course.sec'}.'].'.$what; + $csec.'].'.$what; my $seclevelr= $ENV{'request.course.id'}.'.['. - $ENV{'request.course.sec'}.'].'.$symbparm; + $csec.'].'.$symbparm; my $seclevelm= $ENV{'request.course.id'}.'.['. - $ENV{'request.course.sec'}.'].'.$mapparm; + $csec.'].'.$mapparm; my $courselevel= $ENV{'request.course.id'}.'.'.$what; @@ -228,6 +228,67 @@ sub handler { (tie(%parmhash,'GDBM_File', $ENV{'request.course.fn'}.'_parms.db',&GDBM_READER,0640))) { +# --------------------------------------------------------- Get all assessments + map { + if ($_=~/^src\_(\d+)\.(\d+)$/) { + my $mapid=$1; + my $resid=$2; + my $id=$mapid.'.'.$resid; + if ($bighash{$_}=~/\.(problem|exam|quiz|assess|survey|form)$/) { + $ids[$#ids+1]=$id; + $typep{$id}=$1; + $mapp{$id}= + &Apache::lonnet::declutter($bighash{'map_id_'.$mapid}); + $symbp{$id}=$mapp{$id}. + '___'.$resid.'___'. + &Apache::lonnet::declutter($bighash{$_}); + } + } + } keys %bighash; +# ---------------------------------------------------------- Anything to store? + if ($ENV{'form.pres_marker'}) { + my ($sresid,$spnam,$snum)=split(/\&/,$ENV{'form.pres_marker'}); + + my $symbparm=$symbp{$sresid}.'.'.$spnam; + my $mapparm=$mapp{$sresid}.'___(all).'.$spnam; + + my $seclevel= + $ENV{'request.course.id'}.'.['. + $csec.'].'.$spnam; + my $seclevelr= + $ENV{'request.course.id'}.'.['. + $csec.'].'.$symbparm; + my $seclevelm= + $ENV{'request.course.id'}.'.['. + $csec.'].'.$mapparm; + + my $courselevel= + $ENV{'request.course.id'}.'.'.$spnam; + my $courselevelr= + $ENV{'request.course.id'}.'.'.$symbparm; + 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==7) || ($snum==1)) { $storeunder=$courselevelr; } + if ($snum==6) { $storeunder=$seclevel; } + if ($snum==5) { $storeunder=$seclevelm; } + if ($snum==4) { $storeunder=$seclevelr; } + + + $message.="