Tani multi library v01 - improved beta version#876
Conversation
lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm library browser. Needed to change how the config settings are made in localOverrides.conf so settings for multiple libraries can be made, and to read in the settings using the new layout. Changes were also mode to htdocs/js/apps/SetMaker/setmaker.js to support the choice of a library or "All Libraries".
…aries. OPL-update has a setting to prevent clearing most tables which is to be used when libraries other than the first one are processed. A new OPL download should be reloaded "regularly" and then the additional libraries should be processed.
over all libraries.
Use a single shared DB table to each type with a library code field. OPL-update creates the tables. Data is added when searches are made for which the count tables do not have a record yet.
the FakeRequest data used by WebworkXMLRPC object. This is needed in the code which handles multiple libraries, as the lib/WeBWorK/Utils/ListingDB.pm needs to be able to temporarily set such parameters.
inside the lib_update() routine, as the multi-library code expects that they will be blank when not needed. This is necessary for the subcommands: getAllLibraries getAllDBsubjects getAllDBchapters getSectionListings which need access to the counts database data of the appropriate type and type is determined by the lowest level set.
settings when changing libraries. This approach allows doing the same search on another library just by changing the library chosen.
subjects, chapters, and sections ONLY if they contain problems. However, for the "All Libraries" setting it will return all options from the entire taxonomy.
|
This code will apparently need some revision before it can be merged into a tree with UTF-8 support, or the merge conflicts will need to be carefully handled. Once #934 is merged into develop, I will try (as soon as I can) to prepare create a new PR which gets this code to cleanly merge onto the revised develop branch. From what I recall, it basically works, and searching against several libraries which were processed by the revised The code is not complete. There are several things which are marked with FIXME in the code, and in particular there are places where things are still hardwired to use default values (ex. a sub-path starting with In particular more work is needed on:
Testing of this code by additional people would help. |
| use DBI; | ||
|
|
||
| # Command line arguments | ||
| # for some reason the first command line argument is disappearing before it gets here |
| our @EXPORT_OK = qw(build_library_directory_tree build_library_subject_tree build_library_textbook_tree); | ||
|
|
||
| # what library are we handling, now is first argument of the function | ||
| my $myLib = shift; |
There was a problem hiding this comment.
I suspect, that this line is not needed.
|
Closed due to inactivity. Can be reopened if activity resumes. |

This is an improved beta version of multi-library support for the library search tools (
SetMaker.pm) replacing #874.conf/localOverrides.conf.distnoDropoption (to prevent deletion of the database tables shared by all the libraries).course/templatesdirectory will have symlinks to the libraries.Example setup using the test libraries (including OPL update on 3 libraries):
Known issue:
All Librariesand it should show a correct count of problems.All Subjects(the count should update properly).View Problems