From 7d7fd79b892e37160fac069e3e8a020a8167c15c Mon Sep 17 00:00:00 2001 From: Danny Glin Date: Fri, 13 Feb 2026 03:38:05 +0000 Subject: [PATCH 1/4] Fix ressurect achievement items --- lib/WeBWorK/AchievementItems/ResurrectGW.pm | 80 ++++++++++++++++----- 1 file changed, 63 insertions(+), 17 deletions(-) diff --git a/lib/WeBWorK/AchievementItems/ResurrectGW.pm b/lib/WeBWorK/AchievementItems/ResurrectGW.pm index 00b99ca4ce..3372693290 100644 --- a/lib/WeBWorK/AchievementItems/ResurrectGW.pm +++ b/lib/WeBWorK/AchievementItems/ResurrectGW.pm @@ -13,26 +13,60 @@ sub new ($class) { id => 'ResurrectGW', name => x('Necromancers Charm'), description => x( - 'Reopens any test for an additional 24 hours. This allows you to take a test even if the ' - . 'close date has past. This item does not allow you to take additional versions of the test.' + 'Reopens any test for an additional 24 hours. If you are allowed to start new versions of the test, then this allows you to start a new test even if the ' + . 'close date has past. If you were not allowed to start a new version of the test, then this item will not allow you to take additional versions of the test.' + . 'This item will not extend the time limit for any tests that you have already started.' ) }, $class; } sub can_use($self, $set, $records) { return $set->assignment_type =~ /gateway/ - && (after($set->due_date) || ($set->reduced_scoring_date && after($set->reduced_scoring_date))); + && (after($set->due_date) || ($set->enable_reduced_scoring && after($set->reduced_scoring_date))); # TODO: Check if a new version can be created, and only allow using this reward in that case. } sub print_form ($self, $set, $records, $c) { - return $c->tag( - 'p', - $c->maketext( - 'Reopen this test for the next 24 hours. This item does not allow you to take any additional ' - . 'versions of the test.' - ) - ); + if(after($set->due_date)) { + return $c->tag( + 'p', + $c->maketext( + 'Reopen this test for the next 24 hours. If you were allowed to start new versions of the test, then this will allow you to start a new test. ' + . 'If you were not allowed to start a new version of the test, then you should not use this item. ' + . 'This item will not extend the time limit for any tests that you have already started.' + ) + ); + } else { + if(after($set->due_date - ONE_DAY)) { + return $c->tag( + 'p', + $c->maketext( + 'Reopen this test for full credit for the next 24 hours. If you are allowed to start new versions of the test, then this will allow you to start a new test. ' + . 'If you were not allowed to start a new version of the test, then you should not use this item. ' + . 'This item will not extend the time limit for any tests that you have already started.' + ) + ); + } else { + return $c->c ( + $c->tag( + 'p', + $c->maketext( + 'Reopen this test for full credit for the next 24 hours. After 24 hours any tests will revert to counting for ' + . $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100 . '% of their value until [_1].', + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) + ) + ), + $c->tag( + 'p', + $c->maketext( + ' If you are allowed to start new versions of the test, then this will allow you to start a new test. ' + . 'If you were not allowed to start a new version of the test, then you should not use this item. ' + . 'This item will not extend the time limit for any tests that you have already started.' + ) + ) + )->join(''); + } + } } sub use_item ($self, $set, $records, $c) { @@ -44,18 +78,30 @@ sub use_item ($self, $set, $records, $c) { $set->reduced_scoring_date(time + ONE_DAY); $userSet->reduced_scoring_date($set->reduced_scoring_date); } - $set->due_date(time + ONE_DAY); - $userSet->due_date($set->due_date); - if ($set->due_date > $set->answer_date) { - $set->answer_date(time + ONE_DAY); - $userSet->answer_date($set->answer_date); + if (after($set->due_date - ONE_DAY)) { + $set->due_date(time + ONE_DAY); + $userSet->due_date($set->due_date); + if ($set->due_date > $set->answer_date) { + $set->answer_date(time + ONE_DAY); + $userSet->answer_date($set->answer_date); + } } $db->putUserSet($userSet); - return $c->maketext( + if ($set->enable_reduced_scoring && ($set->reduced_scoring_date != $set->due_date)) { + return $c->maketext( + 'This assignment has been reopened and is due on [_1]. After that date any work ' + . 'completed will count for '. $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100 . '% ' + . 'of its value until [_2]', + $c->formatDateTime($set->reduced_scoring_date, $c->ce->{studentDateDisplayFormat}), + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) + ); + } else { + return $c->maketext( 'This assignment has been reopened and will now close on [_1].', $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) - ); + ); + } } 1; From 68f98e2cbcdca56bd83a0f0224d60e46ec8274e2 Mon Sep 17 00:00:00 2001 From: Danny Glin Date: Thu, 26 Mar 2026 20:08:01 +0000 Subject: [PATCH 2/4] Fix resurrect achievement items --- lib/WeBWorK/AchievementItems/ResurrectGW.pm | 31 +++++--- lib/WeBWorK/AchievementItems/ResurrectHW.pm | 84 +++++++++++++++------ 2 files changed, 83 insertions(+), 32 deletions(-) diff --git a/lib/WeBWorK/AchievementItems/ResurrectGW.pm b/lib/WeBWorK/AchievementItems/ResurrectGW.pm index 3372693290..04ab3f9fe1 100644 --- a/lib/WeBWorK/AchievementItems/ResurrectGW.pm +++ b/lib/WeBWorK/AchievementItems/ResurrectGW.pm @@ -13,8 +13,10 @@ sub new ($class) { id => 'ResurrectGW', name => x('Necromancers Charm'), description => x( - 'Reopens any test for an additional 24 hours. If you are allowed to start new versions of the test, then this allows you to start a new test even if the ' - . 'close date has past. If you were not allowed to start a new version of the test, then this item will not allow you to take additional versions of the test.' + 'Reopens any test for an additional 24 hours. If you are allowed to start new versions of the test, ' + . 'then this allows you to start a new test even if the close date has past. ' + . 'If you were not allowed to start a new version of the test, ' + . 'then this item will not allow you to take additional versions of the test. ' . 'This item will not extend the time limit for any tests that you have already started.' ) }, $class; @@ -31,8 +33,10 @@ sub print_form ($self, $set, $records, $c) { return $c->tag( 'p', $c->maketext( - 'Reopen this test for the next 24 hours. If you were allowed to start new versions of the test, then this will allow you to start a new test. ' - . 'If you were not allowed to start a new version of the test, then you should not use this item. ' + 'Reopen this test for the next 24 hours. If you were allowed to start new versions of the test, ' + . 'then this will allow you to start a new test. ' + . 'If you have already started all of the versions of the test that you are allowed to start, ' + . 'then you should not use this item. ' . 'This item will not extend the time limit for any tests that you have already started.' ) ); @@ -41,8 +45,10 @@ sub print_form ($self, $set, $records, $c) { return $c->tag( 'p', $c->maketext( - 'Reopen this test for full credit for the next 24 hours. If you are allowed to start new versions of the test, then this will allow you to start a new test. ' - . 'If you were not allowed to start a new version of the test, then you should not use this item. ' + 'Reopen this test for full credit for the next 24 hours. If you are allowed to start new versions ' + . 'of the test, then this will allow you to start a new test. ' + . 'If you have already started all of the versions of the test that you are allowed to start, ' + . 'then you should not use this item. ' . 'This item will not extend the time limit for any tests that you have already started.' ) ); @@ -51,16 +57,19 @@ sub print_form ($self, $set, $records, $c) { $c->tag( 'p', $c->maketext( - 'Reopen this test for full credit for the next 24 hours. After 24 hours any tests will revert to counting for ' - . $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100 . '% of their value until [_1].', + 'Reopen this test for full credit for the next 24 hours. After 24 hours any tests will revert ' + . 'to counting for [_1]% of their value until [_2].', + $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100, $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) ) ), $c->tag( 'p', $c->maketext( - ' If you are allowed to start new versions of the test, then this will allow you to start a new test. ' - . 'If you were not allowed to start a new version of the test, then you should not use this item. ' + ' If you are allowed to start new versions of the test, ' + . 'then this will allow you to start a new test. ' + . 'If you have already started all of the versions of the test that you are allowed to start, ' + . 'then you should not use this item. ' . 'This item will not extend the time limit for any tests that you have already started.' ) ) @@ -82,7 +91,7 @@ sub use_item ($self, $set, $records, $c) { $set->due_date(time + ONE_DAY); $userSet->due_date($set->due_date); if ($set->due_date > $set->answer_date) { - $set->answer_date(time + ONE_DAY); + $set->answer_date($set->due_date); $userSet->answer_date($set->answer_date); } } diff --git a/lib/WeBWorK/AchievementItems/ResurrectHW.pm b/lib/WeBWorK/AchievementItems/ResurrectHW.pm index da8364822f..bca0dcbbdf 100644 --- a/lib/WeBWorK/AchievementItems/ResurrectHW.pm +++ b/lib/WeBWorK/AchievementItems/ResurrectHW.pm @@ -18,26 +18,55 @@ sub new ($class) { sub can_use($self, $set, $records) { return $set->assignment_type eq 'default' - && (after($set->due_date) || ($set->reduced_scoring_date && after($set->reduced_scoring_date))); + && (after($set->due_date) || ($set->enable_reduced_scoring && after($set->reduced_scoring_date))); } sub print_form ($self, $set, $records, $c) { - return $c->tag('p', - $c->maketext('Reopen this homework assignment for the next 24 hours. All problems will be rerandomized.')); + if(after($set->due_date)) { + return $c->tag( + 'p', + $c->maketext( + 'Reopen this homework assignment for the next 24 hours. All problems will be rerandomized.' + ) + ); + } else { + if(after($set->due_date - ONE_DAY)) { + return $c->tag( + 'p', + $c->maketext( + 'Reopen this homework assignment for full credit for the next 24 hours. ' + ) + ); + } else { + return $c->tag( + 'p', + $c->maketext( + 'Reopen this homework assignment for full credit for the next 24 hours. After 24 hours ' + . 'any progress will revert to counting for [_1]% of the value until [_2].', + $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100, + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) + ) + ); + } + } } sub use_item ($self, $set, $records, $c) { my $db = $c->db; my $userSet = $db->getUserSet($set->user_id, $set->set_id); + my $rerandomizeMessage = ''; - # Change the seed for all of the problems since the set is currently closed. - my %userProblems = - map { $_->problem_id => $_ } $db->getUserProblemsWhere({ user_id => $set->user_id, set_id => $set->set_id }); - for my $problem (@$records) { - my $userProblem = $userProblems{ $problem->problem_id }; - $userProblem->problem_seed($userProblem->problem_seed % 2**31 + 1); - $problem->problem_seed($userProblem->problem_seed); - $db->putUserProblem($userProblem); + # Change the seed for all of the problems if the set is currently closed. + if (after($set->due_date)) { + my %userProblems = + map { $_->problem_id => $_ } $db->getUserProblemsWhere({ user_id => $set->user_id, set_id => $set->set_id }); + for my $problem (@$records) { + my $userProblem = $userProblems{ $problem->problem_id }; + $userProblem->problem_seed($userProblem->problem_seed % 2**31 + 1); + $problem->problem_seed($userProblem->problem_seed); + $db->putUserProblem($userProblem); + } + $rerandomizeMessage = $c->maketext('Problems have been rerandomized.'); } # Add time to the reduced scoring date if it was defined in the first place @@ -45,19 +74,32 @@ sub use_item ($self, $set, $records, $c) { $set->reduced_scoring_date(time + ONE_DAY); $userSet->reduced_scoring_date($set->reduced_scoring_date); } - # Add time to the close date - $set->due_date(time + ONE_DAY); - $userSet->due_date($set->due_date); - # This may require also extending the answer date. - if ($set->due_date > $set->answer_date) { - $set->answer_date($set->due_date); - $userSet->answer_date($set->answer_date); + # Add time to the close date if necessary + if (after($set->due_date - ONE_DAY)) { + $set->due_date(time + ONE_DAY); + $userSet->due_date($set->due_date); + # This may require also extending the answer date. + if ($set->due_date > $set->answer_date) { + $set->answer_date($set->due_date); + $userSet->answer_date($set->answer_date); + } } $db->putUserSet($userSet); - return $c->maketext( - 'This assignment has been reopened and will now close on [_1]. Problems have been rerandomized.', - $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat})); + if ($set->enable_reduced_scoring && ($set->reduced_scoring_date != $set->due_date)) { + return $c->maketext( + 'This assignment has been reopened and is due on [_1]. After that date any work ' + . 'completed will count for [_2]% of its value until [_3]. ', + $c->formatDateTime($set->reduced_scoring_date, $c->ce->{studentDateDisplayFormat}), + $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100, + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) + ) . $rerandomizeMessage; + } else { + return $c->maketext( + 'This assignment has been reopened and will now close on [_1]. ', + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) + ) . $rerandomizeMessage; + } } 1; From 2a4996a7d5ca6b98d36e65f492869b5a229e5179 Mon Sep 17 00:00:00 2001 From: Danny Glin Date: Thu, 26 Mar 2026 20:08:53 +0000 Subject: [PATCH 3/4] fix resurrect achievement items --- lib/WeBWorK/AchievementItems/ResurrectGW.pm | 51 +++++++++++---------- lib/WeBWorK/AchievementItems/ResurrectHW.pm | 48 +++++++++---------- 2 files changed, 48 insertions(+), 51 deletions(-) diff --git a/lib/WeBWorK/AchievementItems/ResurrectGW.pm b/lib/WeBWorK/AchievementItems/ResurrectGW.pm index 04ab3f9fe1..e4cabd8830 100644 --- a/lib/WeBWorK/AchievementItems/ResurrectGW.pm +++ b/lib/WeBWorK/AchievementItems/ResurrectGW.pm @@ -14,7 +14,7 @@ sub new ($class) { name => x('Necromancers Charm'), description => x( 'Reopens any test for an additional 24 hours. If you are allowed to start new versions of the test, ' - . 'then this allows you to start a new test even if the close date has past. ' + . 'then this allows you to start a new test even if the close date has past. ' . 'If you were not allowed to start a new version of the test, ' . 'then this item will not allow you to take additional versions of the test. ' . 'This item will not extend the time limit for any tests that you have already started.' @@ -22,43 +22,43 @@ sub new ($class) { }, $class; } -sub can_use($self, $set, $records) { +sub can_use ($self, $set, $records) { return $set->assignment_type =~ /gateway/ && (after($set->due_date) || ($set->enable_reduced_scoring && after($set->reduced_scoring_date))); # TODO: Check if a new version can be created, and only allow using this reward in that case. } sub print_form ($self, $set, $records, $c) { - if(after($set->due_date)) { + if (after($set->due_date)) { return $c->tag( 'p', $c->maketext( 'Reopen this test for the next 24 hours. If you were allowed to start new versions of the test, ' - . 'then this will allow you to start a new test. ' - . 'If you have already started all of the versions of the test that you are allowed to start, ' - . 'then you should not use this item. ' - . 'This item will not extend the time limit for any tests that you have already started.' + . 'then this will allow you to start a new test. ' + . 'If you have already started all of the versions of the test that you are allowed to start, ' + . 'then you should not use this item. ' + . 'This item will not extend the time limit for any tests that you have already started.' ) ); } else { - if(after($set->due_date - ONE_DAY)) { + if (after($set->due_date - ONE_DAY)) { return $c->tag( 'p', $c->maketext( 'Reopen this test for full credit for the next 24 hours. If you are allowed to start new versions ' - . 'of the test, then this will allow you to start a new test. ' - . 'If you have already started all of the versions of the test that you are allowed to start, ' - . 'then you should not use this item. ' - . 'This item will not extend the time limit for any tests that you have already started.' + . 'of the test, then this will allow you to start a new test. ' + . 'If you have already started all of the versions of the test that you are allowed to start, ' + . 'then you should not use this item. ' + . 'This item will not extend the time limit for any tests that you have already started.' ) ); } else { - return $c->c ( + return $c->c( $c->tag( 'p', $c->maketext( 'Reopen this test for full credit for the next 24 hours. After 24 hours any tests will revert ' - . 'to counting for [_1]% of their value until [_2].', + . 'to counting for [_1]% of their value until [_2].', $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100, $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) ) @@ -67,10 +67,10 @@ sub print_form ($self, $set, $records, $c) { 'p', $c->maketext( ' If you are allowed to start new versions of the test, ' - . 'then this will allow you to start a new test. ' - . 'If you have already started all of the versions of the test that you are allowed to start, ' - . 'then you should not use this item. ' - . 'This item will not extend the time limit for any tests that you have already started.' + . 'then this will allow you to start a new test. ' + . 'If you have already started all of the versions of the test that you are allowed to start, ' + . 'then you should not use this item. ' + . 'This item will not extend the time limit for any tests that you have already started.' ) ) )->join(''); @@ -99,16 +99,17 @@ sub use_item ($self, $set, $records, $c) { if ($set->enable_reduced_scoring && ($set->reduced_scoring_date != $set->due_date)) { return $c->maketext( - 'This assignment has been reopened and is due on [_1]. After that date any work ' - . 'completed will count for '. $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100 . '% ' - . 'of its value until [_2]', - $c->formatDateTime($set->reduced_scoring_date, $c->ce->{studentDateDisplayFormat}), - $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) + 'This assignment has been reopened and is due on [_1]. After that date any work ' + . 'completed will count for ' + . $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100 . '% ' + . 'of its value until [_2]', + $c->formatDateTime($set->reduced_scoring_date, $c->ce->{studentDateDisplayFormat}), + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) ); } else { return $c->maketext( - 'This assignment has been reopened and will now close on [_1].', - $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) + 'This assignment has been reopened and will now close on [_1].', + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) ); } } diff --git a/lib/WeBWorK/AchievementItems/ResurrectHW.pm b/lib/WeBWorK/AchievementItems/ResurrectHW.pm index bca0dcbbdf..6a14c31ae6 100644 --- a/lib/WeBWorK/AchievementItems/ResurrectHW.pm +++ b/lib/WeBWorK/AchievementItems/ResurrectHW.pm @@ -16,50 +16,46 @@ sub new ($class) { }, $class; } -sub can_use($self, $set, $records) { +sub can_use ($self, $set, $records) { return $set->assignment_type eq 'default' && (after($set->due_date) || ($set->enable_reduced_scoring && after($set->reduced_scoring_date))); } sub print_form ($self, $set, $records, $c) { - if(after($set->due_date)) { + if (after($set->due_date)) { return $c->tag( 'p', $c->maketext( - 'Reopen this homework assignment for the next 24 hours. All problems will be rerandomized.' - ) + 'Reopen this homework assignment for the next 24 hours. All problems will be rerandomized.') ); } else { - if(after($set->due_date - ONE_DAY)) { + if (after($set->due_date - ONE_DAY)) { + return $c->tag('p', + $c->maketext('Reopen this homework assignment for full credit for the next 24 hours. ')); + } else { return $c->tag( 'p', $c->maketext( - 'Reopen this homework assignment for full credit for the next 24 hours. ' + 'Reopen this homework assignment for full credit for the next 24 hours. After 24 hours ' + . 'any progress will revert to counting for [_1]% of the value until [_2].', + $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100, + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) ) ); - } else { - return $c->tag( - 'p', - $c->maketext( - 'Reopen this homework assignment for full credit for the next 24 hours. After 24 hours ' - . 'any progress will revert to counting for [_1]% of the value until [_2].', - $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100, - $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) - ) - ); } } } sub use_item ($self, $set, $records, $c) { - my $db = $c->db; - my $userSet = $db->getUserSet($set->user_id, $set->set_id); + my $db = $c->db; + my $userSet = $db->getUserSet($set->user_id, $set->set_id); my $rerandomizeMessage = ''; # Change the seed for all of the problems if the set is currently closed. if (after($set->due_date)) { my %userProblems = - map { $_->problem_id => $_ } $db->getUserProblemsWhere({ user_id => $set->user_id, set_id => $set->set_id }); + map { $_->problem_id => $_ } + $db->getUserProblemsWhere({ user_id => $set->user_id, set_id => $set->set_id }); for my $problem (@$records) { my $userProblem = $userProblems{ $problem->problem_id }; $userProblem->problem_seed($userProblem->problem_seed % 2**31 + 1); @@ -88,16 +84,16 @@ sub use_item ($self, $set, $records, $c) { if ($set->enable_reduced_scoring && ($set->reduced_scoring_date != $set->due_date)) { return $c->maketext( - 'This assignment has been reopened and is due on [_1]. After that date any work ' - . 'completed will count for [_2]% of its value until [_3]. ', - $c->formatDateTime($set->reduced_scoring_date, $c->ce->{studentDateDisplayFormat}), - $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100, - $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) + 'This assignment has been reopened and is due on [_1]. After that date any work ' + . 'completed will count for [_2]% of its value until [_3]. ', + $c->formatDateTime($set->reduced_scoring_date, $c->ce->{studentDateDisplayFormat}), + $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100, + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) ) . $rerandomizeMessage; } else { return $c->maketext( - 'This assignment has been reopened and will now close on [_1]. ', - $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) + 'This assignment has been reopened and will now close on [_1]. ', + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) ) . $rerandomizeMessage; } } From 1ccb5385abd5b93c862a201ae07da7392f316e9a Mon Sep 17 00:00:00 2001 From: Danny Glin Date: Thu, 26 Mar 2026 21:23:19 +0000 Subject: [PATCH 4/4] Fix maketext call --- lib/WeBWorK/AchievementItems/ResurrectGW.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/WeBWorK/AchievementItems/ResurrectGW.pm b/lib/WeBWorK/AchievementItems/ResurrectGW.pm index e4cabd8830..9f0b81b037 100644 --- a/lib/WeBWorK/AchievementItems/ResurrectGW.pm +++ b/lib/WeBWorK/AchievementItems/ResurrectGW.pm @@ -100,11 +100,10 @@ sub use_item ($self, $set, $records, $c) { if ($set->enable_reduced_scoring && ($set->reduced_scoring_date != $set->due_date)) { return $c->maketext( 'This assignment has been reopened and is due on [_1]. After that date any work ' - . 'completed will count for ' - . $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100 . '% ' - . 'of its value until [_2]', + . 'completed will count for [_2]% of its value until [_3].', $c->formatDateTime($set->reduced_scoring_date, $c->ce->{studentDateDisplayFormat}), - $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) + $c->ce->{pg}{ansEvalDefaults}{reducedScoringValue} * 100, + $c->formatDateTime($set->due_date, $c->ce->{studentDateDisplayFormat}) ); } else { return $c->maketext(