Skip to content

Skip course clean up when unarchiving a legacy mysqldump archive, and add a "Clean Course" page. - #3269

Open
drgrice1 wants to merge 1 commit into
openwebwork:developfrom
drgrice1:unarchive-course-cleanup
Open

drgrice1 wants to merge 1 commit into
openwebwork:developfrom
drgrice1:unarchive-course-cleanup

Conversation

@drgrice1

@drgrice1 drgrice1 commented Nov 5, 2026

Copy link
Copy Markdown
Member

Courses restored from the old mysqldump archive format have database tables that have not been upgraded (e.g., missing the version_id columns), so the "Clean course after unarchiving" option threw an exception when deleting student users. Now unarchiveCourse reports how the database was restored, and the clean up is only performed for the JSON database dump format. If the archive is a mysqldump archive or has no database dump, the clean up is skipped and a message is shown stating that it could not be performed.

A new "Clean Course" admin page performs the same clean up on a selected course. This allows a course restored from a mysqldump archive to be cleaned after it has been upgraded. The page refuses to clean a course whose database has not been upgraded.

… add a "Clean Course" page.

Courses restored from the old mysqldump archive format have database
tables that have not been upgraded (e.g., missing the `version_id`
columns), so the "Clean course after unarchiving" option threw an
exception when deleting student users. Now `unarchiveCourse` reports
how the database was restored, and the clean up is only performed for
the JSON database dump format. If the archive is a mysqldump archive or
has no database dump, the clean up is skipped and a message is shown
stating that it could not be performed.

A new "Clean Course" admin page performs the same clean up on a
selected course. This allows a course restored from a mysqldump archive
to be cleaned after it has been upgraded. The page refuses to clean a
course whose database has not been upgraded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@drgrice1
drgrice1 force-pushed the unarchive-course-cleanup branch from 7ed1953 to a8b395a Compare November 9, 2026 17:41
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.

1 participant