[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 03 Oct 2005 21:31:02 -0000
albertel Mon Oct 3 17:31:02 2005 EDT
Modified files:
/loncom/homework bridgetask.pm
Log:
- update to passing status info
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.64 loncom/homework/bridgetask.pm:1.65
--- loncom/homework/bridgetask.pm:1.64 Sat Oct 1 00:52:21 2005
+++ loncom/homework/bridgetask.pm Mon Oct 3 17:30:58 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.64 2005/10/01 04:52:21 albertel Exp $
+# $Id: bridgetask.pm,v 1.65 2005/10/03 21:30:58 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1403,6 +1403,7 @@
$dim_info.='<h3>Question : you did not pass this '.$mandatory.' question</h3>';
}
my $man_count=0;
+ my $man_passed=0;
my $opt_count=0;
my $opt_passed=0;
foreach my $id (@{$dimension{$instance.'.criterias'}}) {
@@ -1414,12 +1415,16 @@
}
} else {
$man_count++;
+ if ($Apache::lonhomework::history{"resource.$version.$dim.$instance.$id.status"} eq 'pass') {
+ $man_passed++;
+ }
}
}
+ if ($man_passed eq $man_count) { $man_passed='all'; }
my $opt_req=&Apache::lonxml::get_param('OptionalRequired',
$parstack,$safeeval);
if ($opt_req !~ /\S/) { $opt_req='0'; }
- $dim_info.="\n<p>".&mt('You passed all of the mandatory components and [_1] of the [_2] optional components, of which you were required to pass [_3].',$opt_passed,$opt_count,$opt_req)."</p>\n</div>";
+ $dim_info.="\n<p>".&mt('You passed [_1] of the [_2] mandatory components and [_3] of the [_4] optional components, of which you were required to pass [_5].',$man_passed,$man_count,$opt_passed,$opt_count,$opt_req)."</p>\n</div>";
my $internal_location=&internal_location($dim);
$result=~s/\Q$internal_location\E/$dim_info/;