Skip to content

PGProblemEditor: Add option to copy auxiliary files.#2922

Open
somiaj wants to merge 1 commit intoopenwebwork:developfrom
somiaj:copy-aux-files-option
Open

PGProblemEditor: Add option to copy auxiliary files.#2922
somiaj wants to merge 1 commit intoopenwebwork:developfrom
somiaj:copy-aux-files-option

Conversation

@somiaj
Copy link
Contributor

@somiaj somiaj commented Mar 3, 2026

When saving a problem in a new location in the PGProblemEditor, add an option to copy auxiliary files or not. Since it is not possible to determine what files are needed, all auxiliary files were copied in all cases. This allows the user to uncheck the "Copy auxiliary files" option to not copy any auxiliary files.

The default option is to copy auxiliary files which has not changed. This only allows the user to disable that if they are sure no auxiliary files are needed.

This also adds a check so the message about auxiliary files being copied only shows if at least one file was copied.

@drgrice1 I am unable to figure out how to keep this new option to stay unchecked once a user unchecks it. I used the same setup the "Create backup" option uses with a hidden field, but when I uncheck this new option, and save the file, the page checks it by default again. So I'm unsure what is going on in that case.

When saving a problem in a new location in the PGProblemEditor,
add an option to copy auxiliary files or not. Since it is not
possible to determine what files are needed, all auxiliary files
were copied in all cases. This allows the user to uncheck the
"Copy auxiliary files" option to not copy any auxiliary files.

The default option is to copy auxiliary files which has not
changed. This only allows the user to disable that if they are
sure no auxiliary files are needed.

This also adds a check so the message about auxiliary files
being copied only shows if at least one file was copied.
@somiaj somiaj force-pushed the copy-aux-files-option branch from d53ab59 to 5753522 Compare March 3, 2026 17:42
@somiaj
Copy link
Contributor Author

somiaj commented Mar 3, 2026

Note, due to the fact Save As is a redirect, form parameters are lost in the redirect. This is a more complicated issue, so this PR is not going to address the issue about the checkbox staying unclicked, as Save As actually losses info about most the form anyways. The code is setup so if ever the redirects better deal with this, it will work.

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