openwebwork / webwork2

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

Contrib .def files shown even if contrib link is removed. #2361

Open somiaj opened 3 months ago

somiaj commented 3 months ago

If the Contrib link is removed from the templates directory, the set .def files from Contrib are still shown in the import set menu, but selecting one of the sets causes webwork to error out with:

Can't open file "/opt/webwork/courses/<course_id>/templates/Contrib/CAPA/set40.def": No such file or directory at /opt/webwork/webwork2/lib/WeBWorK/File/SetDef.pm line 297. 

It may not be proper to remove this link, but since I don't use Contrib problems I was removing it to hopefully limit the number of .def files shown, and ran across this.

drgrice1 commented 3 months ago

You should not remve the Contrib link. If you don't want the Contrib set definition files to appear, just set $options{useContribDefFiles} = 0 in localOverrides.conf.

drgrice1 commented 3 months ago

Note there is also an option to not show OPL set definition files. It is $options{useOPLdefFiles}.

I am planning to make it so that the links are no longer in the modelCourse, and links are created as needed in the course templates directory (or better instead of links at all find a better way of providing access to the files provided by the links).