From: Michael E. G. <ga...@ma...> - 2005-07-23 17:09:28
|
On Jul 23, 2005, at 12:56 PM, John Jones wrote: > > To fit what Nandor wanted, he may want more depth in the searching=20 > for the set definition files.=A0 For example, maybe he would want to=20= > have courses created with a symlink to a directory called Sets, which=20= > has subdirectories MAT_110, MAT_111, etc., each of which has his=20 > university's standard sets for those courses. > >> I want to be careful not to search too deeply, since if the=20 >> libraries get large this will significantly slow down the creation of=20= >> the Library browser page. >> I don't think this is a concern.=A0 If this is activated by a 4th = main=20 >> button, then the searching only takes place if you click on that=20 >> button.=A0 If you do, it is no worse than clicking on "Local = Problems",=20 >> which does a full depth search for .pg files. > >>> In fact, it might be faster since one could easily use the standard=20= >>> Perl File::Find module for the search.=A0 We don't do that on the = .pg=20 >>> file searching because it is more complicated by looking if problems=20= >>> should be treated as part of a parent directory or not.=A0 An=20 >>> advantage of File::Find is that you can easily have it detect=20 >>> circular symlinks.=A0 I have accidentally had some, and it really=20 >>> 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=20 >> global.conf). >> >> If someone wants to create "libraries" for MAT_110, MAT_111 and so=20= >> forth >> they can add an entry either to global.conf or to course.conf. I=20 >> don't think that is too big a burden for those interested in doing=20 >> fancy >> customization of local sites. >>> I think having all the .def files seen seems to the behavior of=20 >>> least surprise.=A0 So, if there is some customization - searching = for=20 >>> all of them should probably be the default. > OK. I've probably been worrying too much about the speed issue. Just=20= listing all the .def files seems the way to go. If we're forced to it won't be difficult to restrict things later. Take care, Mike > John > |