openwebwork / webwork2

Course management front end for WeBWorK
http://webwork.maa.org/wiki/Main_Page
Other
141 stars 164 forks source link

Move settings from site.conf into webwork2.mojolicious.yml #2314

Open pstaabp opened 5 months ago

pstaabp commented 5 months ago

This replaces the conf/site.conf file by adding many configuration variables to conf/webwork2.mojolicious.yml.

The idea is that many of the server configurations shouldn't be overridden by course configuration in site.conf or simple.conf. How this happens is that the new order of configurations reads is:

  1. webwork2.mojolicious.yml is loaded and some basic configuration is done.
  2. defaults.config
  3. localOverrides.conf
  4. simple.conf
  5. course.conf
  6. Configuration variables that shouldn't be overriden are then copied from webwork2.mojolicious.yml to CourseEnvironment.

Note that the URL and directory structure is now included in webwork2.mojolicious.yml so that has been removed from defaults.config.

Since yaml files cannot contain code, the loading of webwork2.mojolicious.yml is not done in the safe compartment.

Also, the code in conf/database.conf.dist has been moved to lib/WeBWorK/DB/Utils.pm -- This can be moved elsewhere if there is a better place for it. This was removed because it doesn't appear that there are the options that we used to allow in earlier versions.

Another strange thing that I noticed that when the session times out, I couldn't log back in. The addition of including the password on line 362 of lib/WeBWorK/Authen.pm fixed this, but I can't figure out how this work has changed that, but also, why the password was missing from that block.

Some other ideas I've thought about:

pstaabp commented 5 months ago

Let's chat about this for our next meeting.

Alex-Jordan commented 4 months ago

Note conflicts here now from a recent merge.

pstaabp commented 4 months ago

I'm going to close this in favor of #2338