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

Remove user override check boxes when editing set details for a user. #2348

Conversation

drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Mar 3, 2024

This builds on #2345, and makes the same sort of changes for this page.

The dates check on the problem set detail was synchronized with the check for the user detail page. Most importantly, a test version's open, close, and answer dates can not be nullified. In fact, no set's open, close, and answer dates can be entirely nullified. In other words, a global set must have the open, close, and answer dates set.

Note that the set values column was left at the end on this page (instead of before the user override values as it now is on the user detail page). There are issues with moving that first on this page. There are cases where there are no set values, but there are user values at all (for example, for the problem seed, problem status, and problem attempts). So moving set values first would leave an ugly gap between the label and the user value.

The 10 year limit on future set dates was removed as was done for the user detail page.

There were some check boxes (not override checks) that had the check box input inside the label instead of the input and label being siblings. That is not correct for Bootstrap's expectations for the form-check class. In particular, the check box and the label "if status is less than 1" (for the "Randomize Seeds" button) were not aligned correctly due to this. So those issues were fixed.

@drgrice1 drgrice1 force-pushed the problem-set-detail-remove-override-checks branch 3 times, most recently from 352fe0a to fade199 Compare March 5, 2024 21:18
Copy link
Contributor

@Alex-Jordan Alex-Jordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, and I can change dates as expected.

There is one thing though that your js skills may be able to improve on. (And if so, maybe separate from this PR.) Suppose a user does not have any date overrides and you go to this page. And then you input an override for, let's say, the close date. And the new override close date is later than the global answer date. This does not cause the answer date field to automatically populate with something.

Note that if you come to this page and there are already overrides for the close date and answer date, then editing the close date to a later time than the answer override date will cause the answer override date to update. What I'm describing in the last paragraph is only when you reach this page and there are no override dates. But that is a common situation, and it is common for an instructor to set a close date override, and forget to also update the answer date.

Of course this is not just about close dates and answer dates, but also open dates and reduced scoring dates. This is a behavior that is in 2.18 and probably earlier, not anything about the changes made in this PR.

@drgrice1
Copy link
Member Author

drgrice1 commented Mar 5, 2024

I know of the behavior that you speak of, and I have wanted to do something about it. I will try and get to it sometime in the near future.

The dates check on the problem set detail was synchronized with the
check for the user detail page.  Most importantly, a test version's
open, close, and answer dates can not be nullified. In fact, no set's
open, close, and answer dates can be entirely nullified.  In other
words, a global set must have the open, close, and answer dates set.

Note that the set values column was left at the end on this page
(instead of before the user override values as it now is on the user
detail page).  There are issues with moving that first on this page.
There are cases where there are no set values, but there are user values
at all (for example, for the problem seed, problem status, and problem
attempts). So moving set values first would leave an ugly gap between
the label and the user value.

The 10 year limit on future set dates was removed as was done for the
user detail page.

There were some check boxes (not override checks) that had the check box
input inside the label instead of the input and label being siblings.
That is not correct for Bootstrap's expectations for the `form-check`
class.  In particular, the check box and the label "if status is less
than 1" (for the "Randomize Seeds" button) were not aligned correctly
due to this.  So those issues were fixed.
@drgrice1 drgrice1 force-pushed the problem-set-detail-remove-override-checks branch from fade199 to 8c4809b Compare March 5, 2024 22:22
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Mar 6, 2024
This builds on openwebwork#2348, and was requested by @Alex-Jordan in that pull
request (see openwebwork#2348 (review)).

This makes it so that if a date is not filled in, then it will be filled
by javascript with a date as needed to ensure it satisfies the usual
date requirements on open, reduced scoring, close, and answer dates.

The class value is taken into account for this when editing a set for
users.

This applies on both the problem set detail page and the user detail
page. This javascript is also used on the sets manager page when editing
set dates where this change does not apply, but it is designed to still
work without conflict there.
@pstaabp pstaabp merged commit 9dab72e into openwebwork:develop Mar 6, 2024
2 checks passed
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Mar 6, 2024
This builds on openwebwork#2348, and was requested by @Alex-Jordan in that pull
request (see openwebwork#2348 (review)).

This makes it so that if a date is not filled in, then it will be filled
by javascript with a date as needed to ensure it satisfies the usual
date requirements on open, reduced scoring, close, and answer dates.

The class value is taken into account for this when editing a set for
users.

This applies on both the problem set detail page and the user detail
page. This javascript is also used on the sets manager page when editing
set dates where this change does not apply, but it is designed to still
work without conflict there.
@drgrice1 drgrice1 deleted the problem-set-detail-remove-override-checks branch March 6, 2024 13:34
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Mar 6, 2024
This builds on openwebwork#2348, and was requested by @Alex-Jordan in that pull
request (see openwebwork#2348 (review)).

This makes it so that if a date is not filled in, then it will be filled
by javascript with a date as needed to ensure it satisfies the usual
date requirements on open, reduced scoring, close, and answer dates.

The class value is taken into account for this when editing a set for
users.

This applies on both the problem set detail page and the user detail
page. This javascript is also used on the sets manager page when editing
set dates where this change does not apply, but it is designed to still
work without conflict there.
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Mar 6, 2024
This builds on openwebwork#2348, and was requested by @Alex-Jordan in that pull
request (see openwebwork#2348 (review)).

This makes it so that if a date is not filled in, then it will be filled
by javascript with a date as needed to ensure it satisfies the usual
date requirements on open, reduced scoring, close, and answer dates.

The class value is taken into account for this when editing a set for
users.

This applies on both the problem set detail page and the user detail
page. This javascript is also used on the sets manager page when editing
set dates where this change does not apply, but it is designed to still
work without conflict there.
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Mar 7, 2024
This builds on openwebwork#2348, and was requested by @Alex-Jordan in that pull
request (see openwebwork#2348 (review)).

This makes it so that if a date is not filled in, then it will be filled
by javascript with a date as needed to ensure it satisfies the usual
date requirements on open, reduced scoring, close, and answer dates.

The class value is taken into account for this when editing a set for
users.

This applies on both the problem set detail page and the user detail
page. This javascript is also used on the sets manager page when editing
set dates where this change does not apply, but it is designed to still
work without conflict there.
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Mar 14, 2024
This builds on openwebwork#2348, and was requested by @Alex-Jordan in that pull
request (see openwebwork#2348 (review)).

This makes it so that if a date is not filled in, then it will be filled
by javascript with a date as needed to ensure it satisfies the usual
date requirements on open, reduced scoring, close, and answer dates.

The class value is taken into account for this when editing a set for
users.

This applies on both the problem set detail page and the user detail
page. This javascript is also used on the sets manager page when editing
set dates where this change does not apply, but it is designed to still
work without conflict there.
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Mar 16, 2024
This builds on openwebwork#2348, and was requested by @Alex-Jordan in that pull
request (see openwebwork#2348 (review)).

This makes it so that if a date is not filled in, then it will be filled
by javascript with a date as needed to ensure it satisfies the usual
date requirements on open, reduced scoring, close, and answer dates.

The class value is taken into account for this when editing a set for
users.

This applies on both the problem set detail page and the user detail
page. This javascript is also used on the sets manager page when editing
set dates where this change does not apply, but it is designed to still
work without conflict there.
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Mar 18, 2024
This builds on openwebwork#2348, and was requested by @Alex-Jordan in that pull
request (see openwebwork#2348 (review)).

This makes it so that if a date is not filled in, then it will be filled
by javascript with a date as needed to ensure it satisfies the usual
date requirements on open, reduced scoring, close, and answer dates.

The class value is taken into account for this when editing a set for
users.

This applies on both the problem set detail page and the user detail
page. This javascript is also used on the sets manager page when editing
set dates where this change does not apply, but it is designed to still
work without conflict there.
drgrice1 added a commit to drgrice1/webwork2 that referenced this pull request Mar 18, 2024
This builds on openwebwork#2348, and was requested by @Alex-Jordan in that pull
request (see openwebwork#2348 (review)).

This makes it so that if a date is not filled in, then it will be filled
by javascript with a date as needed to ensure it satisfies the usual
date requirements on open, reduced scoring, close, and answer dates.

The class value is taken into account for this when editing a set for
users.

This applies on both the problem set detail page and the user detail
page. This javascript is also used on the sets manager page when editing
set dates where this change does not apply, but it is designed to still
work without conflict there.
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

Successfully merging this pull request may close these issues.

3 participants