Skip to content

Conversation

@drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Feb 3, 2023

The where clause was incorrect when obtaining all merged problem versions for a fixed version of a gateway quiz. It was selecting merged problems where the version was allowed to be anything when it should have been selecting only the specified version.

The result of this error is that if you edit a set version for a user (by going to the classlist editor, clicking on the sets for a user, and clicking on a particular test version on that page), then the data that is displayed for that set version is actually a mix of data from multiple versions. Fortunately the data is saved to the correct version, but this leads to very unexpected results in viewing.

To see this in action on the develop branch (or webwork2 2.17) create a gateway quiz with at least two problems and take two versions of the quiz. Then go edit version 2 and change the source_file for problem 2 on that version (choose a source_file name that doesn't exist to make this really evident). Then go edit version 1 of the quiz. You will see the source_file that you just picked displayed for problem 2. If you look in the database you will see that none of the data for version 1 has changed, and the data for version 2 has changed as was intended.

This gets worse with more quiz versions.

This was my mistake when I made all of the database changes in the last release.

This may be a rather dangerous bug, and I would say should be considered for a hotfix.

The where clause was incorrect when obtaining all merged problem
versions for a fixed version of a gateway quiz.  It was selecting merged
problems where the version was allowed to be anything when it should
have been selecting only the specified version.

The result of this error is that if you edit a set version for a user
(by going to the classlist editor, clicking on the sets for a user, and
clicking on a particular test version on that page), then the
data that is displayed for that set version is actually a mix of data
from multiple versions.  Fortunately the data is saved to the correct
version, but this leads to very unexpected results in viewing.

To see this in action on the develop branch (or webwork2 2.17) create a
gateway quiz with at least two problems and take two versions of the
quiz.  Then go edit version 2 and change the source_file for problem 2
on that version (choose a source_file name that doesn't exist to make
this really evident).  Then go edit version 1 of the quiz.  You will see
the source_file that you just picked displayed for problem 2.  If you
look in the database you will see that none of the data for version 1
has changed, and the data for version 2 has changed as was intended.

This gets worse with more quiz versions.

This was my mistake when I made all of the database changes in the last
release.

This may be a rather dangerous bug, and I would say should be considered
for a hotfix.
@pstaabp pstaabp merged commit ac2f329 into openwebwork:main Feb 9, 2023
@drgrice1 drgrice1 deleted the bugfix/psd-incorrect-merged-problem-version-hotfix branch February 9, 2023 19:57
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.

2 participants