Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Due date must be after reduced scoring date even if reduced credit is not enabled for a set #2581

Closed
dlglin opened this issue Sep 26, 2024 · 3 comments

Comments

@dlglin
Copy link
Member

dlglin commented Sep 26, 2024

To reproduce:

Enable reduced scoring for a course. Create a set with reducing scoring disabled, and set the reduced scoring date to October 1. Now try to set the due date to September 30. When you click "done" on the date picker the due date reverts to October 1 since the javascript forces the due date to be no earlier than the reduced scoring date.

I almost got burned by this. If you're not paying attention it's easy to miss that the date you just set got changed to something else.

This might be fixable with some more complicated logic in the js (if reduced scoring is set to no, then don't check that the due date is after the reduced scoring date, but then if reduced scoring is subsequently changed to yes, then check the dates).

@somiaj
Copy link
Contributor

somiaj commented Sep 26, 2024

This is behavior I have gotten use to as well, so I agree with your suggestion with one modification. I think the JS should honor the user's input independent of reduced scoring being enabled.

This should also apply to any date. I think the JS should always adjust the other dates to match the user's input instead of reverting dates that are outside of the range set by other dates. I have often wanted to set the answer date and have it adjust both the close date and reduced scoring date, but instead I have to set the reduced scoring date, then copy/paste to the other dates.

@drgrice1
Copy link
Member

Ideally, the reduced scoring date would only be visible if reduced scoring is enabled both for the course and the set. If reduced scoring is enabled for the course, then JavaScript should toggle visibility of the reduced scoring date to match the "Reduced Scoring Enabled" setting. Of course if reduced scoring is disabled for the set, the JavaScript would also not consider its value when changing other dates.

@somiaj: As to adjusting the other dates to match the user's input, it does do that in some cases. If you change the reduced scoring date to a date that is later than the close or answer date, then those dates are adjusted. However, the adjustments that you suggest really don't make sense (at least not as you stated them). Think about it carefully and you will see that that would cause problems.

drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Sep 27, 2024
…intuitive.

Previously when any of the dates were changed, the open, reduced
scoring, close, and answer dates were ensured to be in the correct order
by always changing the input later in the last to a later date if
needed.

This instead acts on the input that was modified.  That input value is
not changed from what the user just changed it to.  Any earlier inputs
in the list are set to the new date in the changed input if they are
later than that date, and any later inputs in the list are set to the
new date in the changed input if they are earlier than that date.

This is to address issue openwebwork#2581.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Sep 27, 2024
…intuitive.

Previously when any of the dates were changed, the open, reduced
scoring, close, and answer dates were ensured to be in the correct order
by always changing the input later in the last to a later date if
needed.

This instead acts on the input that was modified.  That input value is
not changed from what the user just changed it to.  Any earlier inputs
in the list are set to the new date in the changed input if they are
later than that date, and any later inputs in the list are set to the
new date in the changed input if they are earlier than that date.

This is to address issue openwebwork#2581.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Oct 3, 2024
…intuitive.

Previously when any of the dates were changed, the open, reduced
scoring, close, and answer dates were ensured to be in the correct order
by always changing the input later in the last to a later date if
needed.

This instead acts on the input that was modified.  That input value is
not changed from what the user just changed it to.  Any earlier inputs
in the list are set to the new date in the changed input if they are
later than that date, and any later inputs in the list are set to the
new date in the changed input if they are earlier than that date.

This is to address issue openwebwork#2581.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Oct 18, 2024
…intuitive.

Previously when any of the dates were changed, the open, reduced
scoring, close, and answer dates were ensured to be in the correct order
by always changing the input later in the last to a later date if
needed.

This instead acts on the input that was modified.  That input value is
not changed from what the user just changed it to.  Any earlier inputs
in the list are set to the new date in the changed input if they are
later than that date, and any later inputs in the list are set to the
new date in the changed input if they are earlier than that date.

This is to address issue openwebwork#2581.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Oct 29, 2024
…intuitive.

Previously when any of the dates were changed, the open, reduced
scoring, close, and answer dates were ensured to be in the correct order
by always changing the input later in the last to a later date if
needed.

This instead acts on the input that was modified.  That input value is
not changed from what the user just changed it to.  Any earlier inputs
in the list are set to the new date in the changed input if they are
later than that date, and any later inputs in the list are set to the
new date in the changed input if they are earlier than that date.

This is to address issue openwebwork#2581.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Nov 11, 2024
…intuitive.

Previously when any of the dates were changed, the open, reduced
scoring, close, and answer dates were ensured to be in the correct order
by always changing the input later in the last to a later date if
needed.

This instead acts on the input that was modified.  That input value is
not changed from what the user just changed it to.  Any earlier inputs
in the list are set to the new date in the changed input if they are
later than that date, and any later inputs in the list are set to the
new date in the changed input if they are earlier than that date.

This is to address issue openwebwork#2581.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Nov 12, 2024
…intuitive.

Previously when any of the dates were changed, the open, reduced
scoring, close, and answer dates were ensured to be in the correct order
by always changing the input later in the last to a later date if
needed.

This instead acts on the input that was modified.  That input value is
not changed from what the user just changed it to.  Any earlier inputs
in the list are set to the new date in the changed input if they are
later than that date, and any later inputs in the list are set to the
new date in the changed input if they are earlier than that date.

This is to address issue openwebwork#2581.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Nov 12, 2024
…intuitive.

Previously when any of the dates were changed, the open, reduced
scoring, close, and answer dates were ensured to be in the correct order
by always changing the input later in the last to a later date if
needed.

This instead acts on the input that was modified.  That input value is
not changed from what the user just changed it to.  Any earlier inputs
in the list are set to the new date in the changed input if they are
later than that date, and any later inputs in the list are set to the
new date in the changed input if they are earlier than that date.

This is to address issue openwebwork#2581.
@somiaj
Copy link
Contributor

somiaj commented Nov 17, 2024

Fixed in #2583.

@somiaj somiaj closed this as completed Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants