This replaces the "Show question text in the question list?" filter, which was
never really a filter, with a new widget displayed alongside other question bank
controls like "Create a new question" and "Reset columns".
It also refactors the logic of displaying the question text field or not, so that
it is all handled within the qbank_viewquestiontext plugin rather than relying on
code in the view.
This modifies the question_data fragment used by the filter code to make its
parameters closer to the URL parameters of the question/edit.php page. This
Allows us to progressively enhance the add, remove and reset actions on the
question bank page, using this same fragment to reload the question table after
each change. This re-uses the same actions.js module used for enhancing these
actions on the qbank_columnsortorder admin screen.
This changes the root element used by the fragment when
applying filters, so that the whole of display_question_list()
is reloaded.
This ensures that the returnurl will be updated correctly on the
question actions and bulk actions without manipulating then
further in Javascript.
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.
Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.
Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.
The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.
Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.
This implementation will introduce a qbank plugin "tagquestion"
which will implement the tag question actions in the question
bank view by replacing the core class. Having this plugin
will give users the flexibility of enabling or
disabling this action.