Move the version_id into its own field. - #3179
Open
drgrice1 wants to merge 1 commit into
Open
Conversation
The `version_id` field has been added to the `set_user`, `problem_user`,
and `past_answers` tables. If a user set that has type "default" or
"jitar" then it has version 0. If a user set has type "gateway" or
"proctored_gateway" then it has version 0 if it is the user's template
set. Otherwise it is a versioned set. The same is true for user
problems associated with those sets.
When a course database is upgraded the old `<setID>,v<versionID>` in the
`set_id` field is separated into the `set_id` without the version, and
the `version_id` in its own field. This is done anytime it is detected
that the previous database table did not have the `version_id` and it
is one of the tables that field has been added to.
This makes database interaction for versioned sets much cleaner and
straight forward. Since a `version_id` is an actual database table
column, you can use it directly in where and order clauses without
hackery. All of the "groking" for a set version is eliminated.
Note that it is now the case that when a user with the
`proctor_quiz_login` permission attempts to enter a proctored test
(either their own or to view another user's test when acting as that
user), the user will not need to enter the proctor credentials (and will
skip the proctor login page entirely). Also, a user with the
`proctor_quiz_grade` permission will not see the proctor login page when
grading a test (again for either their own test or when allowed to grade
a test when acting as another user).
Note that the `$authen{proctor_module}` option has been removed from the
`defaults.config` file. There is only one proctor authentication module
`WeBWorK::Authen::Proctor`, and it is now hardcoded. No need for the
option.
Other than the change to the proctor login noted above, everything else
should work the same as before.
Member
Author
|
Note that in testing this you should create an archive of the course you test with and revert back to that archive after switching back to the develop branch. Once the course is upgraded, there is not downgrade! Note also that the admin course will work without upgrading (since it never uses versioned sets or problems). |
Member
Author
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.
The
version_idfield has been added to theset_user,problem_user, andpast_answerstables. If a user set has type "default" or "jitar" then it has version 0. If a user set has type "gateway" or "proctored_gateway" then it has version 0 if it is the user's template set. Otherwise it is a versioned set. The same is true for user problems associated with those sets.When a course database is upgraded the old
<setID>,v<versionID>in theset_idfield is separated into theset_idwithout the version, and theversion_idin its own field. This is done anytime it is detected that the previous database table did not have theversion_idand it is one of the tables that field has been added to.This makes database interaction for versioned sets much cleaner and straight forward. Since a
version_idis an actual database table column, you can use it directly in where and order clauses without hackery. All of the "groking" for a set version is eliminated.Note that it is now the case that when a user with the
proctor_quiz_loginpermission attempts to enter a proctored test (either their own or to view another user's test when acting as that user), the user will not need to enter the proctor credentials (and will skip the proctor login page entirely). Also, a user with theproctor_quiz_gradepermission will not see the proctor login page when grading a test (again for either their own test or when allowed to grade a test when acting as another user).Note that the
$authen{proctor_module}option has been removed from thedefaults.configfile. There is only one proctor authentication moduleWeBWorK::Authen::Proctor, and it is now hardcoded. No need for the option.Other than the change to the proctor login noted above, everything else should work the same as before.