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

instructors can nullify test version dates #2340

Closed
Alex-Jordan opened this issue Feb 26, 2024 · 1 comment
Closed

instructors can nullify test version dates #2340

Alex-Jordan opened this issue Feb 26, 2024 · 1 comment

Comments

@Alex-Jordan
Copy link
Contributor

An instructor did not understand how test and test versions work. What they wanted to do was (for a particular student) extend all close dates until the end of the term. They navigated to some page in WeBWorK where they could see all the sets assigned to this student (which included test version sets) and they changed dates. In the case of test versions, (not understanding those dates should have been left alone) they saw that the "set values" were already what they wanted, because the parent test had its close date set to the end of the term. So they cleared the "user overrides" fields (which in the case of test versions are not really overrides; those are just that student's actual open, close, answer date for that version).

WeBWorK should not have permitted the instructor to save these fields with nothing in them. In fact as far as I can tell from a screenshot from the instructor, WeBWorK did give an error message and said the invalid (null) dates would not be saved. And yet, these dates are all null now when I visit the course. So if the student wanted to, they can return to "version 1" tests and continue working all the way up to the end of the term, even though it's a 90-minute timed test. (Actually in this case they can't do that because the tests are set to only one graded submission, and that is used up. But that is beside the point.)

The instructor was just a bit frustrated and went through clearing dates without understanding how test versions work. But there is something to look into here, because the instructor should have not been allowed to nullify all these test version dates. The instructor has not clarified to me yet what process they used to clear the dates, but again, I can see that they are all null now.

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

This addresses issue openwebwork#2340.

Currently if an instructor unchecks a checkbox for a user's versioned
set on the user detail page (the page you can reach by clicking on the
"Assigned Sets" column for a user in the Accounts Manager), then when
dates are checked (in the `checkDates` method of `UserDetail.pm`), the
dates from the global set record are used. If those are valid dates
(they usually will be in this case), then those valid dates are returned
with no error.  Thus the database will be updated.  However, the logic
used to determine how the database is updated does not match the logic
used to check the sets, and since the override checkbox is not checked,
the date in the user's versioned set record is set to NULL.  So for
versioned sets this makes it so that if the checkbox is not checked or
the override date is not set, then the global set date is NOT used for a
fallback.  Instead 0 is used for a fallback.  Since that is not a valid
date, this forces an error, and the database is not updated.

This is actually a more general issue with the logic used when the dates
are checked and the logic used when the database is updated not being
the same.  So that is fixed.

Additionally when the dates in the database are updated, there are cases
where the user interface does not correctly reflect the changes made.
One such case is for a regular set if the checkbox for a date is checked
but the override date left empty.  Then the global set date is used
(meaning the user set value for that date is set to NULL in the
database), however the checkbox remains checked.  So the corresponding
parameters are updated so that the changes are reflected when the page
rerenders after saving.

Note that in the case that the dates are not updated in the database due
to an error in the given dates, the user interface does not update to
reflect the current database state.  I don't think the user interface
should be updated in this case, as the instructor might want an
opportunity to correct the error and not have their changes wiped out.

I also noticed that the "User overrides" header was being displayed over
the "Open", "Closes", "Answer" labels in the case that a set is not
assigned to a user (and so there are no override fields).  So that is
not shown in that case anymore.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Feb 27, 2024
…versions.

This addresses issue openwebwork#2340.

Currently if an instructor unchecks a checkbox for a user's versioned
set on the user detail page (the page you can reach by clicking on the
"Assigned Sets" column for a user in the Accounts Manager), then when
dates are checked (in the `checkDates` method of `UserDetail.pm`), the
dates from the global set record are used. If those are valid dates
(they usually will be in this case), then those valid dates are returned
with no error.  Thus the database will be updated.  However, the logic
used to determine how the database is updated does not match the logic
used to check the sets, and since the override checkbox is not checked,
the date in the user's versioned set record is set to NULL.  So for
versioned sets this makes it so that if the checkbox is not checked or
the override date is not set, then the global set date is NOT used for a
fallback.  Instead 0 is used for a fallback.  Since that is not a valid
date, this forces an error, and the database is not updated.

This is actually a more general issue with the logic used when the dates
are checked and the logic used when the database is updated not being
the same.  So that is fixed.

Additionally when the dates in the database are updated, there are cases
where the user interface does not correctly reflect the changes made.
One such case is for a regular set if the checkbox for a date is checked
but the override date left empty.  Then the global set date is used
(meaning the user set value for that date is set to NULL in the
database), however the checkbox remains checked.  So the corresponding
parameters are updated so that the changes are reflected when the page
rerenders after saving.

Note that in the case that the dates are not updated in the database due
to an error in the given dates, the user interface does not update to
reflect the current database state.  I don't think the user interface
should be updated in this case, as the instructor might want an
opportunity to correct the error and not have their changes wiped out.

I also noticed that the "User overrides" header was being displayed over
the "Open", "Closes", "Answer" labels in the case that a set is not
assigned to a user (and so there are no override fields).  So that is
not shown in that case anymore.

I also removed the 10 year limit on dates.  I am not sure why we impose
this limit.  There is no reason to do so.  In fact, it is quite useful
in many situations to have a due date that is more than 10 years in the
future.  By the way, I was curious if these dates were affected by the
year 2038 problem.  So after removing this restriction I set a due date
to be in 2050.  This seems to work with no issue. So it seems that 64bit
integers are being used in this case which are not affected by the year
2038 problem.  So we have 292 million years before this will be an issue
again.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Feb 27, 2024
…versions.

This addresses issue openwebwork#2340.

Currently if an instructor unchecks a checkbox for a user's versioned
set on the user detail page (the page you can reach by clicking on the
"Assigned Sets" column for a user in the Accounts Manager), then when
dates are checked (in the `checkDates` method of `UserDetail.pm`), the
dates from the global set record are used. If those are valid dates
(they usually will be in this case), then those valid dates are returned
with no error.  Thus the database will be updated.  However, the logic
used to determine how the database is updated does not match the logic
used to check the sets, and since the override checkbox is not checked,
the date in the user's versioned set record is set to NULL.  So for
versioned sets this makes it so that if the checkbox is not checked or
the override date is not set, then the global set date is NOT used for a
fallback.  Instead 0 is used for a fallback.  Since that is not a valid
date, this forces an error, and the database is not updated.

This is actually a more general issue with the logic used when the dates
are checked and the logic used when the database is updated not being
the same.  So that is fixed.

Additionally when the dates in the database are updated, there are cases
where the user interface does not correctly reflect the changes made.
One such case is for a regular set if the checkbox for a date is checked
but the override date left empty.  Then the global set date is used
(meaning the user set value for that date is set to NULL in the
database), however the checkbox remains checked.  So the corresponding
parameters are updated so that the changes are reflected when the page
rerenders after saving.

Note that in the case that the dates are not updated in the database due
to an error in the given dates, the user interface does not update to
reflect the current database state.  I don't think the user interface
should be updated in this case, as the instructor might want an
opportunity to correct the error and not have their changes wiped out.

I also noticed that the "User overrides" header was being displayed over
the "Open", "Closes", "Answer" labels in the case that a set is not
assigned to a user (and so there are no override fields).  So that is
not shown in that case anymore.

I also removed the 10 year limit on dates.  I am not sure why we impose
this limit.  There is no reason to do so.  In fact, it is quite useful
in many situations to have a due date that is more than 10 years in the
future.  By the way, I was curious if these dates were affected by the
year 2038 problem.  So after removing this restriction I set a due date
to be in 2050.  This seems to work with no issue. So it seems that 64bit
integers are being used in this case which are not affected by the year
2038 problem.  So we have 292 million years before this will be an issue
again.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Feb 27, 2024
…versions.

This addresses issue openwebwork#2340.

Currently if an instructor unchecks a checkbox for a user's versioned
set on the user detail page (the page you can reach by clicking on the
"Assigned Sets" column for a user in the Accounts Manager), then when
dates are checked (in the `checkDates` method of `UserDetail.pm`), the
dates from the global set record are used. If those are valid dates
(they usually will be in this case), then those valid dates are returned
with no error.  Thus the database will be updated.  However, the logic
used to determine how the database is updated does not match the logic
used to check the sets, and since the override checkbox is not checked,
the date in the user's versioned set record is set to NULL.  So for
versioned sets this makes it so that if the checkbox is not checked or
the override date is not set, then the global set date is NOT used for a
fallback.  Instead 0 is used for a fallback.  Since that is not a valid
date, this forces an error, and the database is not updated.

This is actually a more general issue with the logic used when the dates
are checked and the logic used when the database is updated not being
the same.  So that is fixed.

Additionally when the dates in the database are updated, there are cases
where the user interface does not correctly reflect the changes made.
One such case is for a regular set if the checkbox for a date is checked
but the override date left empty.  Then the global set date is used
(meaning the user set value for that date is set to NULL in the
database), however the checkbox remains checked.  So the corresponding
parameters are updated so that the changes are reflected when the page
rerenders after saving.

Note that in the case that the dates are not updated in the database due
to an error in the given dates, the user interface does not update to
reflect the current database state.  I don't think the user interface
should be updated in this case, as the instructor might want an
opportunity to correct the error and not have their changes wiped out.

I also noticed that the "User overrides" header was being displayed over
the "Open", "Closes", "Answer" labels in the case that a set is not
assigned to a user (and so there are no override fields).  So that is
not shown in that case anymore.

I also removed the 10 year limit on dates.  I am not sure why we impose
this limit.  There is no reason to do so.  In fact, it is quite useful
in many situations to have a due date that is more than 10 years in the
future.  By the way, I was curious if these dates were affected by the
year 2038 problem.  So after removing this restriction I set a due date
to be in 2050.  This seems to work with no issue. So it seems that 64bit
integers are being used in this case which are not affected by the year
2038 problem.  So we have 292 million years before this will be an issue
again.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Feb 29, 2024
…versions.

This addresses issue openwebwork#2340.

Currently if an instructor unchecks a checkbox for a user's versioned
set on the user detail page (the page you can reach by clicking on the
"Assigned Sets" column for a user in the Accounts Manager), then when
dates are checked (in the `checkDates` method of `UserDetail.pm`), the
dates from the global set record are used. If those are valid dates
(they usually will be in this case), then those valid dates are returned
with no error.  Thus the database will be updated.  However, the logic
used to determine how the database is updated does not match the logic
used to check the sets, and since the override checkbox is not checked,
the date in the user's versioned set record is set to NULL.  So for
versioned sets this makes it so that if the checkbox is not checked or
the override date is not set, then the global set date is NOT used for a
fallback.  Instead 0 is used for a fallback.  Since that is not a valid
date, this forces an error, and the database is not updated.

This is actually a more general issue with the logic used when the dates
are checked and the logic used when the database is updated not being
the same.  So that is fixed.

Additionally when the dates in the database are updated, there are cases
where the user interface does not correctly reflect the changes made.
One such case is for a regular set if the checkbox for a date is checked
but the override date left empty.  Then the global set date is used
(meaning the user set value for that date is set to NULL in the
database), however the checkbox remains checked.  So the corresponding
parameters are updated so that the changes are reflected when the page
rerenders after saving.

Note that in the case that the dates are not updated in the database due
to an error in the given dates, the user interface does not update to
reflect the current database state.  I don't think the user interface
should be updated in this case, as the instructor might want an
opportunity to correct the error and not have their changes wiped out.

I also noticed that the "User overrides" header was being displayed over
the "Open", "Closes", "Answer" labels in the case that a set is not
assigned to a user (and so there are no override fields).  So that is
not shown in that case anymore.

I also removed the 10 year limit on dates.  I am not sure why we impose
this limit.  There is no reason to do so.  In fact, it is quite useful
in many situations to have a due date that is more than 10 years in the
future.  By the way, I was curious if these dates were affected by the
year 2038 problem.  So after removing this restriction I set a due date
to be in 2050.  This seems to work with no issue. So it seems that 64bit
integers are being used in this case which are not affected by the year
2038 problem.  So we have 292 million years before this will be an issue
again.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Feb 29, 2024
…versions.

This addresses issue openwebwork#2340.

Currently if an instructor unchecks a checkbox for a user's versioned
set on the user detail page (the page you can reach by clicking on the
"Assigned Sets" column for a user in the Accounts Manager), then when
dates are checked (in the `checkDates` method of `UserDetail.pm`), the
dates from the global set record are used. If those are valid dates
(they usually will be in this case), then those valid dates are returned
with no error.  Thus the database will be updated.  However, the logic
used to determine how the database is updated does not match the logic
used to check the sets, and since the override checkbox is not checked,
the date in the user's versioned set record is set to NULL.  So for
versioned sets this makes it so that if the checkbox is not checked or
the override date is not set, then the global set date is NOT used for a
fallback.  Instead 0 is used for a fallback.  Since that is not a valid
date, this forces an error, and the database is not updated.

This is actually a more general issue with the logic used when the dates
are checked and the logic used when the database is updated not being
the same.  So that is fixed.

Additionally when the dates in the database are updated, there are cases
where the user interface does not correctly reflect the changes made.
One such case is for a regular set if the checkbox for a date is checked
but the override date left empty.  Then the global set date is used
(meaning the user set value for that date is set to NULL in the
database), however the checkbox remains checked.  So the corresponding
parameters are updated so that the changes are reflected when the page
rerenders after saving.

Note that in the case that the dates are not updated in the database due
to an error in the given dates, the user interface does not update to
reflect the current database state.  I don't think the user interface
should be updated in this case, as the instructor might want an
opportunity to correct the error and not have their changes wiped out.

I also noticed that the "User overrides" header was being displayed over
the "Open", "Closes", "Answer" labels in the case that a set is not
assigned to a user (and so there are no override fields).  So that is
not shown in that case anymore.

I also removed the 10 year limit on dates.  I am not sure why we impose
this limit.  There is no reason to do so.  In fact, it is quite useful
in many situations to have a due date that is more than 10 years in the
future.  By the way, I was curious if these dates were affected by the
year 2038 problem.  So after removing this restriction I set a due date
to be in 2050.  This seems to work with no issue. So it seems that 64bit
integers are being used in this case which are not affected by the year
2038 problem.  So we have 292 million years before this will be an issue
again.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Feb 29, 2024
…versions.

This addresses issue openwebwork#2340.

Currently if an instructor unchecks a checkbox for a user's versioned
set on the user detail page (the page you can reach by clicking on the
"Assigned Sets" column for a user in the Accounts Manager), then when
dates are checked (in the `checkDates` method of `UserDetail.pm`), the
dates from the global set record are used. If those are valid dates
(they usually will be in this case), then those valid dates are returned
with no error.  Thus the database will be updated.  However, the logic
used to determine how the database is updated does not match the logic
used to check the sets, and since the override checkbox is not checked,
the date in the user's versioned set record is set to NULL.  So for
versioned sets this makes it so that if the checkbox is not checked or
the override date is not set, then the global set date is NOT used for a
fallback.  Instead 0 is used for a fallback.  Since that is not a valid
date, this forces an error, and the database is not updated.

This is actually a more general issue with the logic used when the dates
are checked and the logic used when the database is updated not being
the same.  So that is fixed.

Additionally when the dates in the database are updated, there are cases
where the user interface does not correctly reflect the changes made.
One such case is for a regular set if the checkbox for a date is checked
but the override date left empty.  Then the global set date is used
(meaning the user set value for that date is set to NULL in the
database), however the checkbox remains checked.  So the corresponding
parameters are updated so that the changes are reflected when the page
rerenders after saving.

Note that in the case that the dates are not updated in the database due
to an error in the given dates, the user interface does not update to
reflect the current database state.  I don't think the user interface
should be updated in this case, as the instructor might want an
opportunity to correct the error and not have their changes wiped out.

I also noticed that the "User overrides" header was being displayed over
the "Open", "Closes", "Answer" labels in the case that a set is not
assigned to a user (and so there are no override fields).  So that is
not shown in that case anymore.

I also removed the 10 year limit on dates.  I am not sure why we impose
this limit.  There is no reason to do so.  In fact, it is quite useful
in many situations to have a due date that is more than 10 years in the
future.  By the way, I was curious if these dates were affected by the
year 2038 problem.  So after removing this restriction I set a due date
to be in 2050.  This seems to work with no issue. So it seems that 64bit
integers are being used in this case which are not affected by the year
2038 problem.  So we have 292 million years before this will be an issue
again.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Mar 1, 2024
…versions.

This addresses issue openwebwork#2340.

Currently if an instructor unchecks a checkbox for a user's versioned
set on the user detail page (the page you can reach by clicking on the
"Assigned Sets" column for a user in the Accounts Manager), then when
dates are checked (in the `checkDates` method of `UserDetail.pm`), the
dates from the global set record are used. If those are valid dates
(they usually will be in this case), then those valid dates are returned
with no error.  Thus the database will be updated.  However, the logic
used to determine how the database is updated does not match the logic
used to check the sets, and since the override checkbox is not checked,
the date in the user's versioned set record is set to NULL.  So for
versioned sets this makes it so that if the checkbox is not checked or
the override date is not set, then the global set date is NOT used for a
fallback.  Instead 0 is used for a fallback.  Since that is not a valid
date, this forces an error, and the database is not updated.

This is actually a more general issue with the logic used when the dates
are checked and the logic used when the database is updated not being
the same.  So that is fixed.

Additionally when the dates in the database are updated, there are cases
where the user interface does not correctly reflect the changes made.
One such case is for a regular set if the checkbox for a date is checked
but the override date left empty.  Then the global set date is used
(meaning the user set value for that date is set to NULL in the
database), however the checkbox remains checked.  So the corresponding
parameters are updated so that the changes are reflected when the page
rerenders after saving.

Note that in the case that the dates are not updated in the database due
to an error in the given dates, the user interface does not update to
reflect the current database state.  I don't think the user interface
should be updated in this case, as the instructor might want an
opportunity to correct the error and not have their changes wiped out.

I also noticed that the "User overrides" header was being displayed over
the "Open", "Closes", "Answer" labels in the case that a set is not
assigned to a user (and so there are no override fields).  So that is
not shown in that case anymore.

I also removed the 10 year limit on dates.  I am not sure why we impose
this limit.  There is no reason to do so.  In fact, it is quite useful
in many situations to have a due date that is more than 10 years in the
future.  By the way, I was curious if these dates were affected by the
year 2038 problem.  So after removing this restriction I set a due date
to be in 2050.  This seems to work with no issue. So it seems that 64bit
integers are being used in this case which are not affected by the year
2038 problem.  So we have 292 million years before this will be an issue
again.
drgrice1 added a commit to drgrice1/webwork2 that referenced this issue Mar 2, 2024
…versions.

This addresses issue openwebwork#2340.

Currently if an instructor unchecks a checkbox for a user's versioned
set on the user detail page (the page you can reach by clicking on the
"Assigned Sets" column for a user in the Accounts Manager), then when
dates are checked (in the `checkDates` method of `UserDetail.pm`), the
dates from the global set record are used. If those are valid dates
(they usually will be in this case), then those valid dates are returned
with no error.  Thus the database will be updated.  However, the logic
used to determine how the database is updated does not match the logic
used to check the sets, and since the override checkbox is not checked,
the date in the user's versioned set record is set to NULL.  So for
versioned sets this makes it so that if the checkbox is not checked or
the override date is not set, then the global set date is NOT used for a
fallback.  Instead 0 is used for a fallback.  Since that is not a valid
date, this forces an error, and the database is not updated.

This is actually a more general issue with the logic used when the dates
are checked and the logic used when the database is updated not being
the same.  So that is fixed.

Additionally when the dates in the database are updated, there are cases
where the user interface does not correctly reflect the changes made.
One such case is for a regular set if the checkbox for a date is checked
but the override date left empty.  Then the global set date is used
(meaning the user set value for that date is set to NULL in the
database), however the checkbox remains checked.  So the corresponding
parameters are updated so that the changes are reflected when the page
rerenders after saving.

Note that in the case that the dates are not updated in the database due
to an error in the given dates, the user interface does not update to
reflect the current database state.  I don't think the user interface
should be updated in this case, as the instructor might want an
opportunity to correct the error and not have their changes wiped out.

I also noticed that the "User overrides" header was being displayed over
the "Open", "Closes", "Answer" labels in the case that a set is not
assigned to a user (and so there are no override fields).  So that is
not shown in that case anymore.

I also removed the 10 year limit on dates.  I am not sure why we impose
this limit.  There is no reason to do so.  In fact, it is quite useful
in many situations to have a due date that is more than 10 years in the
future.  By the way, I was curious if these dates were affected by the
year 2038 problem.  So after removing this restriction I set a due date
to be in 2050.  This seems to work with no issue. So it seems that 64bit
integers are being used in this case which are not affected by the year
2038 problem.  So we have 292 million years before this will be an issue
again.
@pstaabp
Copy link
Member

pstaabp commented Mar 11, 2024

Fixed in #2345

@pstaabp pstaabp closed this as completed Mar 11, 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

2 participants