This module provides access to the database of classify in the system. This includes the filenames, along with the table of search terms.
Usage: getProblemTags($path)
Get tags using full path and tagging module.
Usage: setProblemTags($path, $subj, $chap, $sect)
Set tags using full path and tagging module.
Usage: keywordTidy($s)
Regularize punctuation and case for a keyword.
Usage: keywordCleaner($s)
Split a string on commas, and apply keywordTidy to the entries.
Usage: getDBextras($c, $path)
Get flags for whether a pg file uses Math Objects, and if it is static.
The parameter $c
must be a WeBWorK::Controller object.
$path
is the path to the file.
Output is an array reference: [MO, static]
Usage: getDBTextbooks($c, $thing)
The parameter $c
must be a WeBWorK::Controller object.
The parameter $thing
must be one of "textbook", "textchapter", or "textsection".
This returns a reference to an array of arrays. If $thing
is "textboot", then each entry of the return array is an array containing the database id of the textbook, the textbook title, the textbook author, and textbook edition. If $thing
is "textchapter", then each entry of the return array is an array containing the database id of the texbook chapter, the chapter number, and the chapter name. If $thing
is "textsection", then each entry of the return array is an array containing the database id of the texbook section, the section number, and the section name.
Usage: getAllDBsubjects($c)
Returns an array of arrays, each of which contains a database subject name and its database id.
The parameter $c
must be a WeBWorK::Controller object.
Usage: getAllDBchapters($c)
Returns an array of arrays, each of which contains a database chapter name and its database id.
The parameter $c
must be a WeBWorK::Controller object.
Usage: getAllDBsections($c)
Returns an array of arrays, each of which contains a database section name and its database id.
The parameter $c
must be a WeBWorK::Controller object.
Usage: getDBListings($c)
The parameter $c
must be a WeBWorK::Controller object.
Returns an array of hash references with the keys "filepath" which is the relative file path in the OPL, "morelt" which is true if there are more problems like this one, "pgid" which is the internal datbase index of the problem, "static" which is true if the problem is declared static (which it should be if it has no random parameters), and "MO" if the problem is declared to use MathObjects.
The search may be constrained by the parameters "library_subject", "library_chapter", "library_section", "level", "library_keywords", "includeOPL", "includeContrib", "library_textbook", "library_textchapter", and "library_textsection" which are retrieved with the $c->param
method.
Usage: countDBListings($c)
The parameter $c
must be a WeBWorK::Controller object.
Returns the number of OPL problems that satisfy the given constraints. The constraints are the same as those for getDBListings
.
Usage: getMLTleader($c, $mltid)
The parameter $c
must be a WeBWorK::Controller object. The parameter $multid
should be the more like this index of an OPL problem.
Returns the "leader" for the more like this group.