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
| use WeBWorK::Utils::DateTime qw(between); | ||
|
|
||
| sub new ($class) { | ||
| sub new ($class, $c) { |
Member
There was a problem hiding this comment.
I don't think that $c needs to be passed in anymore, since you reverted the maketext call.
Contributor
Author
There was a problem hiding this comment.
The controller was added for the extension achievements to have access to the course environment for this new setting to compute extension time. I only started translating because I had the controller and didn't think about efficiency concerns.
Though this does mean a similar computation gets used a few times, it was most straight forward to add that computation to the new method, but I guess I could compute the times and time text once then pass it to the new methods.
Member
There was a problem hiding this comment.
I forgot you needed it to get the new setting. That is fine.
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.