[LON-CAPA-cvs] cvs: loncom /homework grades.pm
raeburn
raeburn at source.lon-capa.org
Fri Aug 29 18:15:31 EDT 2025
raeburn Fri Aug 29 22:15:31 2025 EDT
Modified files:
/loncom/homework grades.pm
Log:
- Fix typo in comment and remove some trailing whitespace.
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.822 loncom/homework/grades.pm:1.823
--- loncom/homework/grades.pm:1.822 Fri Aug 29 21:52:10 2025
+++ loncom/homework/grades.pm Fri Aug 29 22:15:31 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.822 2025/08/29 21:52:10 raeburn Exp $
+# $Id: grades.pm,v 1.823 2025/08/29 22:15:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -886,17 +886,17 @@
return $jscript;
}
-# Given the score (as a number [0-1], the weight, and a posible
+# Given the score (as a number [0-1], the weight, and a possible
# reduction for submission between duedate and overduedate)
# what is the final point value? This function will round to
# the nearest tenth, third, or quarter if one of those is
# within the tolerance of .00001.
sub compute_points {
my ($score, $weight, $latefrac) = @_;
-
+
my $tolerance = .00001;
my $points;
- if (($latefrac ne '') &&
+ if (($latefrac ne '') &&
($latefrac < 1) && ($latefrac >= 0)) {
$points = $score * $weight * $latefrac;
} else {
@@ -916,7 +916,7 @@
$points = $check_for_nearness->(10);
$points = $check_for_nearness->(3);
$points = $check_for_nearness->(4);
-
+
return $points;
}
More information about the LON-CAPA-cvs
mailing list