From: John J. <jj...@as...> - 2005-07-23 16:54:45
|
Michael E. Gage wrote: > Files at the top of directories like rochesterLibrary, > unionLibrary, etc. might need special treatment. If your name to > the Rochester Library is called rochesterLibrary, then all of the > paths accessing those files will start with rochesterLibrary. If > another person names the link Rochester, then none of those set > definition files will work. So, by special treatment, I mean some > sort of munging of the paths to account for this. > > What we might do is this: if the file is rochesterLibrary/setFoo.def > the entries would be relative to the directory the set definition file > is in: > hence an entry of set0/prob1.pg would be come > rochesterLibrary/set0/prob1.pg. would that work? I'll have to think about it. I can think of problems, but I haven't thought enough be know if I think they are serious. > > To fit what Nandor wanted, he may want more depth in the searching > for the set definition files. For example, maybe he would want to > have courses created with a symlink to a directory called Sets, > which has subdirectories MAT_110, MAT_111, etc., each of which has > his university's standard sets for those courses. > > I want to be careful not to search too deeply, since if the libraries > get large this will significantly slow down the creation of the > Library browser page. I don't think this is a concern. If this is activated by a 4th main button, then the searching only takes place if you click on that button. If you do, it is no worse than clicking on "Local Problems", which does a full depth search for .pg files. In fact, it might be faster since one could easily use the standard Perl File::Find module for the search. We don't do that on the .pg file searching because it is more complicated by looking if problems should be treated as part of a parent directory or not. An advantage of File::Find is that you can easily have it detect circular symlinks. I have accidentally had some, and it really slows down the loading of the library browser page. > I suggest that set definition files can only be used in > > the course templates directory and in > any directory referred to in the $courseFiles{problibs} hash (in > global.conf). > > If someone wants to create "libraries" for MAT_110, MAT_111 and so forth > they can add an entry either to global.conf or to course.conf. I don't > think that is too big a burden for those interested in doing fancy > customization of local sites. I think having all the .def files seen seems to the behavior of least surprise. So, if there is some customization - searching for all of them should probably be the default. John |