--- loncom/homework/bridgetask.pm 2007/01/11 19:01:38 1.218
+++ loncom/homework/bridgetask.pm 2007/01/23 05:02:16 1.222
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.218 2007/01/11 19:01:38 albertel Exp $
+# $Id: bridgetask.pm,v 1.222 2007/01/23 05:02:16 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2245,7 +2245,6 @@ sub end_Dimension {
my $result=&Apache::lonxml::endredirection();
my $dim=&get_id($parstack,$safeeval);
if (&skip_dimension_parsing($dim)) {
- &disable_dimension_parsing($dim);
pop(@Apache::bridgetask::dimension);
return;
}
@@ -2290,10 +2289,10 @@ sub end_Dimension {
('sub' x $dimension{$dim}{'depth'}).'question';
$ucquestion =~ s/^(.)/uc($1)/e;
if ($dim_status eq 'pass') {
- $dim_info.='
'.$ucquestion.' : you passed the above '.$mandatory.' '.$question.'
';
+ $dim_info.=''.$ucquestion.' : you passed this '.$mandatory.' '.$question.'
';
}
if ($dim_status eq 'fail') {
- $dim_info.=''.$ucquestion.' : you did not pass the above '.$mandatory.' '.$question.'
';
+ $dim_info.=''.$ucquestion.' : you did not pass this '.$mandatory.' '.$question.'
';
}
my %counts = &get_counts($dim,$instance,$parstack,
$safeeval);
@@ -2486,7 +2485,15 @@ sub question_status_message {
$status .= '.';
if ($counts->{'opt'}) {
$status .= ' You were required to pass '.$counts->{'opt_req'}.
- ' optional component'.($counts->{'opt_req'} == 1?'':'s');
+ ' optional ';
+ if ($counts->{'opt_dim'} + $counts->{'man_dim'} < 1) {
+ $status .=
+ ($counts->{'opt_req'} == 1?'criterion':'criteria');
+ } else {
+ $status .=
+ 'component'.($counts->{'opt_req'} == 1?'':'s');
+ }
+ $status .= '.';
}
return $status;
}