openwebwork/webwork2 — pull request #477 by Alex-Jordan (2014-09-04 22:25:17+00:00)
Title: Alternate set defs locations

...definition importing process to look.

Makes it so that in a config file, you can declare
```
$courseDirs{setdefinitions} = [
$courseDirs{templates},
# "$courseDirs{templates}/",
];
```

The other possible locations need to be in paths that pass through the `templates` folder, as this is assumed by the Content Generator. `Instructor.pm` is modified to handle the array reference instead of the simple string path for the `templates` folder. Since paths to set definition files now might begin with some folders leading up to `set...def`, I removed the `^` anchor from the regular expression in `ProblemSetList.pm` and `ProblemSetList2.pm`. I don't think this will cause an issue, but someone else should think that through.

I put a `setDefintions` subfolder into a course's `templates` folder and added "$courseDirs{templates}/setDefintions" to `$courseDirs{setdefinitions}`. I also added a longer path that goes through a symbolic link in the `templates` folder to another place on the server. I was then able to import set definition files from all three locations (`templates`, `templates/setDefintions`, and the symbolic link location).