[LON-CAPA-cvs] cvs: loncom /homework grades.pm
raeburn
raeburn at source.lon-capa.org
Sun Oct 9 19:23:04 EDT 2011
raeburn Sun Oct 9 23:23:04 2011 EDT
Modified files:
/loncom/homework grades.pm
Log:
- Warnings for "point value larger than weight" accumulated in @warnings instead
of @skipped, since these scores are saved and not skipped.
- Explicitly include "use" for Apache::bridgetask.
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.656 loncom/homework/grades.pm:1.657
--- loncom/homework/grades.pm:1.656 Sun Oct 9 16:23:34 2011
+++ loncom/homework/grades.pm Sun Oct 9 23:23:03 2011
@@ -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::lonenc;
use Apache::lonstathelpers;
use Apache::lonquickgrades;
+use Apache::bridgetask();
use String::Similarity;
use LONCAPA;
@@ -4089,6 +4090,7 @@
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 @@
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 @@
}
}
$request->print('<br />'.&Apache::lonhtmlcommon::confirm_success(&mt("Saved scores for [quant,_1,student]",$countdone),$countdone==0));
+ if (@warnings) {
+ $request->print('<br />'.&Apache::lonhtmlcommon::confirm_success(&mt('Warnings generated for the following saved scores:'),1).'<br />');
+ $request->print(join(', ', at warnings));
+ }
if (@skipped) {
$request->print('<br />'.&Apache::lonhtmlcommon::confirm_success(&mt('No scores stored for the following username(s):'),1).'<br />');
$request->print(join(', ', at skipped));
More information about the LON-CAPA-cvs
mailing list