--- loncom/homework/bridgetask.pm 2006/11/07 20:07:10 1.195 +++ loncom/homework/bridgetask.pm 2006/11/07 21:31:22 1.196 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.195 2006/11/07 20:07:10 albertel Exp $ +# $Id: bridgetask.pm,v 1.196 2006/11/07 21:31:22 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2097,8 +2097,10 @@ sub start_Dimension { &Apache::lonxml::get_param('Mandatory',$parstack,$safeeval); push(@{$dimension{$previous_dim}{'criterias'}},$dim); $dimension{$dim}{'nested'}=$previous_dim; + $dimension{$dim}{'depth'} = 1 + $dimension{$previous_dim}{'depth'}; &Apache::lonxml::debug("adding $dim as criteria to $previous_dim"); } else { + $dimension{$top}{'depth'}=0; $dimension{$top}{'criteria.'.$dim.'.type'}='dimension'; $dimension{$top}{'criteria.'.$dim.'.mandatory'}= &Apache::lonxml::get_param('Mandatory',$parstack,$safeeval); @@ -2227,11 +2229,14 @@ sub end_Dimension { $mandatory='Optional'; } my $dim_info="
\n"; + my $question = ('sub' x $dimension{$dim}{'depth'}).'question'; + my $ucquestion = $question; + $ucquestion =~ s/^(.)/uc($1)/e; if ($dim_status eq 'pass') { - $dim_info.='

Question : you passed this '.$mandatory.' question

'; + $dim_info.='

'.$ucquestion.' : you passed this '.$mandatory.' '.$question.'

'; } if ($dim_status eq 'fail') { - $dim_info.='

Question : you did not pass this '.$mandatory.' question

'; + $dim_info.='

'.$ucquestion.' : you did not pass this '.$mandatory.' '.$question.'

'; } my $man_count=0; my $man_passed=0;