Skip to content

add-on conf files#3000

Open
Alex-Jordan wants to merge 1 commit into
openwebwork:WeBWorK-2.21from
Alex-Jordan:conf
Open

add-on conf files#3000
Alex-Jordan wants to merge 1 commit into
openwebwork:WeBWorK-2.21from
Alex-Jordan:conf

Conversation

@Alex-Jordan
Copy link
Copy Markdown
Contributor

This allows for there to be a folder webwork2/conf/addon/ (or some other name, overridden in localOverrides.conf) where you can store .conf files. This has to do with #2999.

When adding a new course from the admin course, you can select one or more of these config files to be included at the end of the new course's course.conf file. If the new course is copying a course.conf file from some other course, nothing happens with .conf files from the addon folder.

If there is no addon folder, or if it has no .conf files in it, there is no change in the Add Course page. Otherwise, the checkbox for copying an old course's course.conf file is gone, and there is one select. The select has three optgroups:

  1. The first has only one option, to just make the default course.conf file. This is also what will happen if the form is submitted with no selection made.
  2. The second has only one option: copy the course.conf file from the indicated older course.
  3. The third has all of the .conf files from the addon folder.

The select allows multiple selections. This needs one more thing where I need javascript help from @drgrice1. If the option from the first or second optgroup is selected, all other options need to be de-selected. Googling, I see how to do this with javascript. But I'm not sure where to build that javascript properly for its use here. That is, I'm not sure what I should do instead of writing inline script.

@Alex-Jordan
Copy link
Copy Markdown
Contributor Author

Alex-Jordan commented Jun 4, 2026

Here is what this looks like when there is an addon folder with .conf files in it. In this case, test.conf and test2.conf'

Screenshot 2026-06-03 at 10 43 23 PM

I should have mentioned more about selecting multiple .conf files to append. You might do this if you have one for a certain LTI setup, and another for an instructor's style preferences. Just for example, and you want to load both but keep them separate.

There is no control at this level for what order they get loaded. They will land in course.conf in a fixed order from how they were submitted by the form. If it matters that the order be changed, someone would have to manually edit the course.conf file.

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