Skip to content

Merge test versions with their template set. - #3308

Closed
somiaj wants to merge 1 commit into
openwebwork:developfrom
somiaj:fix-version-merge
Closed

somiaj wants to merge 1 commit into
openwebwork:developfrom
somiaj:fix-version-merge

Conversation

@somiaj

@somiaj somiaj commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

When creating a merged set record, merge test versions with their template set, which is version 0.

When testing things I noticed that I could not longer access test versions as a student due to the lis_source_did missing and kept getting the error the set must be accessed by the LTI first when trying to access the test version, but accessing the ProblemSet template worked just fine. This seems to be because the test version was never merged with its template set, with a version_id=0, so the template set had lis_source_did set but the test version did not.

This makes it so when merging a test version, the set version is also merged with the template set but forcing the version_id=0 in the where clause. In testing this fixes the issue.

I must admit I don't fully understand the code that Claude created. It is a small change and seems reasonable, but I don't know if there are any subtle issues with Claude's approach.

When creating a merged set record, merge test versions with their
template set, which is version 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@drgrice1

Copy link
Copy Markdown
Member

Sorry @somiaj, but this is not the right way to go with this. The special code for the versioned tables should not go in the WeBWorK::DB::Schema::NewSQL::Merge package. I opened pull request #3309 with a better approach that does not taint the base package.

@somiaj

somiaj commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #3309.

@somiaj somiaj closed this Nov 22, 2026
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