[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 17 Feb 2005 08:58:16 -0000
albertel Thu Feb 17 03:58:16 2005 EDT
Modified files:
/loncom/homework grades.pm
Log:
- accept more bad things in upload grades
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.246 loncom/homework/grades.pm:1.247
--- loncom/homework/grades.pm:1.246 Sat Feb 12 10:18:41 2005
+++ loncom/homework/grades.pm Thu Feb 17 03:58:16 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.246 2005/02/12 15:18:41 albertel Exp $
+# $Id: grades.pm,v 1.247 2005/02/17 08:58:16 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2971,11 +2971,18 @@
$username=~s/\s//g;
if (!$username) {
my $id=$entries{$fields{'ID'}};
+ $id=~s/\s//g;
my %ids=&Apache::lonnet::idget($domain,$id);
$username=$ids{$id};
}
if (!exists($$classlist{"$username:$domain"})) {
- push(@skipped,"$username:$domain");
+ my $id=$entries{$fields{'ID'}};
+ $id=~s/\s//g;
+ if ($id) {
+ push(@skipped,"$id:$domain");
+ } else {
+ push(@skipped,"$username:$domain");
+ }
next;
}
my $usec=$classlist->{"$username:$domain"}[5];
@@ -2993,6 +3000,7 @@
my $part=$1;
my $wgt =&Apache::lonnet::EXT('resource.'.$part.'.weight',
$symb,$domain,$username);
+ $entries{$fields{$dest}}=~s/\s//g;
my $pcr=$entries{$fields{$dest}} / $wgt;
my $award='correct_by_override';
$grades{"resource.$part.awarded"}=$pcr;