[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Thu, 25 Oct 2007 00:47:29 -0000
albertel Wed Oct 24 20:47:29 2007 EDT
Modified files:
/loncom/homework grades.pm
Log:
- BUG#5486, when uploading, students assigned 0 points are marked as incorrect
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.462 loncom/homework/grades.pm:1.463
--- loncom/homework/grades.pm:1.462 Wed Oct 24 05:51:47 2007
+++ loncom/homework/grades.pm Wed Oct 24 20:47:24 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.462 2007/10/24 09:51:47 foxr Exp $
+# $Id: grades.pm,v 1.463 2007/10/25 00:47:24 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3912,7 +3912,8 @@
if ($wgt) {
$entries{$fields{$dest}}=~s/\s//g;
my $pcr=$entries{$fields{$dest}} / $wgt;
- my $award='correct_by_override';
+ my $award=($pcr == 0) ? 'incorrect_by_override'
+ : 'correct_by_override';
$grades{"resource.$part.awarded"}=$pcr;
$grades{"resource.$part.solved"}=$award;
$points{$part}=1;
@@ -7194,10 +7195,6 @@
my $probTitle = &Apache::lonnet::gettitle($symb);
my ($table,undef,$hdgrade) = &showResourceInfo($symb,$probTitle);
- #
- # Define menu data
- $env{'form.probTitle'} = &Apache::lonnet::gettitle($symb);
- my ($table) = &showResourceInfo($symb,$env{'form.probTitle'});
$request->print($table);
my %fields = ('symb'=>&Apache::lonenc::check_encrypt($symb),
'handgrade'=>$hdgrade,