Add extension time factor setting.#2965
Open
somiaj wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
Open
Add extension time factor setting.#2965somiaj wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
somiaj wants to merge 1 commit intoopenwebwork:WeBWorK-2.21from
Conversation
65fc09c to
adbe683
Compare
drgrice1
reviewed
May 5, 2026
Add `$achievementExtensionFactor` setting that is used to configure the length of extensions. This works as a multiplicative factor, by multiplying the base time (either 24 or 48 hours) by the factor. The extension time is always rounded to the nearest hour, and cannot be less than a single hour (two hours for the super extensions). This affects all items that have an extension time. * ExtendDueDate * ExtendDueDateGW * ExtendReducedDate * ReducedCred * RessurectGW * RessurectHW * SuperExtendDueDate * SuperExtendReducedDate
adbe683 to
70f35e1
Compare
drgrice1
reviewed
May 5, 2026
drgrice1
approved these changes
May 6, 2026
Member
drgrice1
left a comment
There was a problem hiding this comment.
This looks good to me.
It is nice that the new time setting allows the SuperExtendDueDate.pm and SuperExtendReducedDate.pm packages to extend the ExtendDueDate.pm and ExtendReducedDate.pm package, respectively. Nice code refactor!
|
|
||
| Returns an array consisting of the extension time in seconds and a translated | ||
| string stating the length of the extension. The translated string will state | ||
| the number of days and hours if greater than or equal to 3 days, otherwise |
Member
There was a problem hiding this comment.
I think this should be
Suggested change
| the number of days and hours if greater than or equal to 3 days, otherwise | |
| the number of days and hours if greater than or equal to 2 days, otherwise |
based on the code.
Contributor
Author
There was a problem hiding this comment.
I did consider that, but went with "greater than equal to 3 days", because "2 days and 12 hours" will actually print as "60 hours".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
$achievementExtensionFactorsetting that is used to configure the length of extensions. This works as a multiplicative factor, by multiplying the base time (either 24 or 48 hours) by the factor. The extension time is always rounded to the nearest hour, and cannot be less than a single hour (two hours for the super extensions).This affects all items that have an extension time.