From: Arnie P. v. a. <we...@ma...> - 2009-10-17 16:06:56
|
Log Message: ----------- Implement a Reduced Scoring Period. The Reduced Scoring Period is a period before the due date during which all additional work done by the student counts at a reduced rate. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: ProblemSet.pm Revision Data ------------- Index: ProblemSet.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm,v retrieving revision 1.92 retrieving revision 1.93 diff -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -u -r1.92 -r1.93 --- lib/WeBWorK/ContentGenerator/ProblemSet.pm +++ lib/WeBWorK/ContentGenerator/ProblemSet.pm @@ -308,6 +308,19 @@ my $hardcopyURL = $self->systemLink($hardcopyPage); print CGI::p(CGI::a({href=>$hardcopyURL}, "Download a hardcopy of this homework set.")); + + + my $reducedScoringPeriod = $ce->{pg}->{ansEvalDefaults}->{reducedScoringPeriod}; + if ($reducedScoringPeriod > 0) { + my $dueDate = $self->formatDateTime($set->due_date()); + my $reducedScoringPeriodSec = $reducedScoringPeriod*60; # $reducedScoringPeriod is in minutes + my $reducedScoringValue = $ce->{pg}->{ansEvalDefaults}->{reducedScoringValue}; + my $reducedScoringPerCent = int(100*$reducedScoringValue+.5); + my $beginReducedScoringPeriod = $self->formatDateTime($set->due_date() - $reducedScoringPeriodSec); + print CGI::div({class=>"ResultsAlert"},"This assignment has a Reduced Scoring Period that begins + $beginReducedScoringPeriod and ends on the due date, $dueDate. During this period all additional + work done counts $reducedScoringPerCent\% of the original."); + } # DBFIXME use iterator my @problemNumbers = $db->listUserProblems($effectiveUser, $setName); |