This implementation will introduce a qbank plugin
"deletequestion" which will implement the delete question
action in the question bank view by replacing the core
class. Having this plugin will give users the
flexibility of enabling or disabling this action.
This commit implements the qbank api so that any plugin
can implement its own question bank. This api currently
works parallely with the moodle core classes and the
added qbank in the core, means the moment a plugin
is installed, that object is replaced with the object
from the plugin instead of core, which means the api
has flexibility till the plugins are integrated and the
plugins can be integrated in any order.
All the old classes are still there and not deprecated
as there is a different tracker for the changes to the
quiz and another tracker for class deprecation and
class renaming. Core question units tests are pointing
to the new api structure but the classes are pointing
to the location related to the plugin availability.
Co-Authored-By: Luca Bösch <luca.boesch@bfh.ch>
Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
one more array fix
This commit implements the qbank plugin type which
includes the boilerplate for the qbank plugin, the
qbank plugin management admin page and required core
code addition.
Movement of classes to classes/local/bank and additional
todo addition to all the existing ones to align with
future tracker for class renaming. This commit does not
contain any class renaming of the old or deprecated
classes. MDL-72004 will be used to rename, remove or
deprecate old classes after integrating all the qbank
plugins.
With significant-digits presentation mode, NAN would be formatted as
'NAN' followed by zeroes, which looks silly, and +INF would cause an
execution timeout as Moodle tries to divide +∞ by 10 until it becomes
less than 1, which can happen in a divide-by-zero situation.
Note that the user can't answer NAN or INF to any question, but at this
at least now looks consistent and also doesn't break Moodle in the case
of +INF.
Issue 1: While essay question's uploading progress, we need to disable submit
buttons to prevent submit form event.
Issue 2: Enable buttons after pressing cancel button on the popup
confirming overwrite file existed.
All these three strings were introduced in MDL-20296. The screenshots
there show some examples of where and how they were used. They stopped
being used shortly after in MDL-20636.
Given that they are specific strings with narrow semantic; they are
provided by a plugin and not by the core component; they have not been
used for 10 years; and no other plugin in the Plugins directory use
them, I feel we can safely bypass the deprecation phase and simply drop
them.
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.
Since the class has only just been added to Moodle, now is a good
time to move it.
I've gone over a few of the mofified files (those
which were showing warnings and errors to CiBoT. Some of them
have been fixed completely, while others only have fixed
for the lines belonging to this issue (lib/tests/moodlelib_test.php)
for example.