Closed maharper closed 3 years ago
For function definitions that are very local, perhaps for only one problem or a small collection of problems local to a course, the .pl
file can go in the same directory as the problem.
For function definitions to be used course-wide, but not shared further, macro files should go in the macros subdirectory of the course templates directory.
For function definition files that I am using in problems in my contrib directory, I see two possible locations:
CPL-Contrib/MH-Contrib/macros/
CPL-Contrib/macros/
Both locations have pros and cons.
champlain-problem-library/macros/
.[TMPL]/champlainLibrary/macros
to localOverrides.conf
will make them available in every course where the CPL problems are available.CPL-Contrib/<author>-Contrib/macros/
so that it is clear that they are subject to the author's whim in the same way that contrib level problems are.localOverrides.conf
for each <author>-Contrib/macros/
directory.
I think we should decide a location for local (CPL level local) macro files. I propose:
champlain-problem-library/macros/
.When a problem requests a macro file like
PGML.pl
, orCPL-diagnostic.pl
, orMH-contrib.pl
, orjust-for-this-problem.pl
, WW looks for the macro file in directories, searching the directories in order until it finds a matching.pl
file. The directory list is specified indefaults.config
and can be overridden or added to inlocalOverrides.conf
(system-wide impact) or incourse.conf
(only affects that specific course).The default search order is (currently):
.
(the same directory as the problem file)[TMPL]/macros
(the course macros directory)[PG]/macros/
(if this directory is not on the list WW will break)[TMPL]/Library/macros/<institution name>
I would strongly recommend that we not override the default list as that would create problems when we upgrade WW. We can add to the list without creating those problems and I think we should add
[TMPL]/champlainLibrary/macros
to the bottom of the list inlocalOverrides.conf
.