--- loncom/homework/grades.pm 2011/10/09 16:23:34 1.656
+++ loncom/homework/grades.pm 2011/10/09 23:23:03 1.657
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.656 2011/10/09 16:23:34 raeburn Exp $
+# $Id: grades.pm,v 1.657 2011/10/09 23:23:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -45,6 +45,7 @@ use Apache::lonlocal;
use Apache::lonenc;
use Apache::lonstathelpers;
use Apache::lonquickgrades;
+use Apache::bridgetask();
use String::Similarity;
use LONCAPA;
@@ -4089,6 +4090,7 @@ sub csvuploadassign {
my ($classlist) = &getclasslist('all',0);
my @notallowed;
my @skipped;
+ my @warnings;
my $countdone=0;
foreach my $grade (@gradedata) {
my %entries=&Apache::loncommon::record_sep($grade);
@@ -4138,7 +4140,7 @@ sub csvuploadassign {
my $award=($pcr == 0) ? 'incorrect_by_override'
: 'correct_by_override';
if ($pcr>1) {
- push(@skipped,&mt("[_1]: point value larger than weight","$username:$domain"));
+ push(@warnings,&mt("[_1]: point value larger than weight","$username:$domain"));
}
$grades{"resource.$part.awarded"}=$pcr;
$grades{"resource.$part.solved"}=$award;
@@ -4184,6 +4186,10 @@ sub csvuploadassign {
}
}
$request->print('
'.&Apache::lonhtmlcommon::confirm_success(&mt("Saved scores for [quant,_1,student]",$countdone),$countdone==0));
+ if (@warnings) {
+ $request->print('
'.&Apache::lonhtmlcommon::confirm_success(&mt('Warnings generated for the following saved scores:'),1).'
');
+ $request->print(join(', ',@warnings));
+ }
if (@skipped) {
$request->print('
'.&Apache::lonhtmlcommon::confirm_success(&mt('No scores stored for the following username(s):'),1).'
');
$request->print(join(', ',@skipped));