This conversion was a part of the post-2.4 assignments branch so those migrating from a version already running this can disregard this step.
SAK-11821 - AssignmentService allows creation of duplicate submission objects, need to separate submitter_id out to form unique constrait, and improve tool performance by using new db columns Closed : The assignment service previously permitted the creation of duplicate submission objects (i.e. two or more submissions for the same student and assignment). While the UI should prevent this from happening, at various stages in the evolution of the Assignments code, bugs, race conditions or other failures have led to duplicate objects being created. This conversion seeks to reconcile those duplicates and add database constraints to prevent this is the future.
In summary, the conversion script is necessary to
- Remove existing duplicate submission records, if any
- Prevent future submission duplicates by applying unique constraint on the ASSIGNMENT_SUBMISSION table
- Improve performance of the Assignment tool
The conversion script does the following to the existing ASSIGNMENT_SUBMISSION table in Sakai database:
- read in all tuples as AssignmentSubmission object, parse out data such as submitter_id, submit_time, submitted, and graded, and stores those attributes as separate columns in the ASSIGNMENT_SUBMISSION table;
- Runs though the table, combine and remove submission duplicates (tuples with same "context" and "submitter_id" combination);
- apply the unique constraint of "context" + "submitter_id" to ASSIGNMENT_SUBMISSION table.
There is a README file with detailed instructions on this process at https://source.sakaiproject.org/svn/assignment/tags/sakai_2-7-0.