mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
6001ee3dfd
This also resolves MDL-78829. Some question bank plugins use a separate class for each plugin they define. However, qbank_customfields (and potentially others in the future) uses a single class to define multiple fields. Using the class name as an ID for the column doesn't give us a way of reliable instantiating an object for the column. Previously, qbank_customfields appended the field name as though it was a namespaced class, but this had to be manually constructed and deconstructed by detecting this particular column class. This change introduces a standard way of constructing a unique ID for each question bank column, in the form pluginname\columnclass-columnname. This ensures that the ID will be unique for each column, and the ID can be used to instatiate the column's object.