Hi! According to the Subplugins documentation, subplugins work only for activity modules, HTML editors, local plugins, and admin tools. Indeed, in
lib/classes/component.php I found the code that determines that only these plugin types are allowed to have subplugins:
/** @var array list plugin types that support subplugins, do not add more here unless absolutely necessary */ protected static $supportsubplugins = array('mod', 'editor', 'tool', 'local');My question is: would it be possible to add support for subplugins for question types as well? Or alternatively, is there another solution for making question types extensible?
Just to give some context on why I am interested in this: I am working on a question type called GraphChecker. This question type borrows heavily from the CodeRunner question type, and allows a question to be answered in the form of an (un)directed graph, finite state machine, Petri net, or other discrete structure. The answer is then graded by a set of checks chosen by the question author. Each available check is implemented by a bit of Python code, which is executed and graded just like CodeRunner runs student-submitted code. Right now, the available checks are hardcoded in the plugin, but since users may want to implement their own set of checks, it would be very useful if checks (Python code and metadata) could instead be provided by separate subplugins.
Thanks in advance for any help!