Previously, question categories which contained only questions with no
usages were deleted during migration to mod_qbank.
Also, contexts that contained no questions once unsused questions were
deleted were still migrated to a mod_qbank instance, which was empty.
The intention is that hidden questions with no usages should be deleted,
then any categories which are now empty should be deleted rather than
migrated. If there are no categories that contain questions left in a
context, creation of a mod_qbank to migrate those categories is not
necessary.
The unit tests did not cover the cases of categories containing only
non-hidden questions without usages, of categories containing only
unused questions with multiple hidden versions, or of empty categories
with children that were not empty.
This change now specifically checks whether a category or is children
are empty before deleting the category, rather than checking question
usage, since stale questions (hidden questions with no usage) are
already deleted before this point. It also expands the unit tests to
cover the above cases.
This allows each class to define the type of data that they return,
regardless of the type of column to which they are applied. This is the
pre-cursor to work on graphing and filtering of aggregated data.
E.g. a text field that is aggregated with "count" is returning numeric
data rather than text.
This changes prevent the admin to define an incorrect proxybypass value.
Dropped out formats in MDL-74289 are now fixed automatically.
e.g.: "192.168." becomes "192.168.0.0/16" and ".domain.tld" becomes "*.domain.tld".
This change introduces updates to the existing aggregation API, to
allow types to define whether to group by fields of a column to which
the aggregation is applied.
The new date aggregation utilises this, to allow for creation of time
series reports, e.g. report data grouped by dates.
Co-authored-by: Daniel Neis Araujo <danielneis@gmail.com>
Implements a status check which confirms that the Solr search engine
is available. Optionally, the check can also show a warning if the
index grows beyond a certain size.
As part of this change, a new API was added in search_solr\engine
to allow using http_client (Guzzle) instead of raw Curl; this makes
it easier to create mock tests in PHPunit for the new functionality.