-
Bug
-
Resolution: Fixed
-
Minor
-
4.3.3
- Go to Custom Fields (https://[[moodleroot]]/question/bank/customfields/customfield.php) and add a new Category.
- Add a new Text Area field (e.g. call both required fields "Text").
- Then go to Custom Sort Order https://[[moodleroot]]/question/bank/columnsortorder/sortcolumns.php?section=columnsortorder (or refresh the page if already open).
- "Test" is automatically added as a row. Move the new row up one.
- Delete (row settings > Remove) the custom field from the Custom Sort Order screen.
- Go back to Question custom fields and delete the entire category.
- Then on going back to Custom Sort Order (or any Question Bank) and refresh, you'll get an error.
- It doesn't feel like the database is cleaning itself very well here.
Question Bank Custom Sort Order is a Moodle 4.3 feature.
Expected: Should still be able to access to the Custom Sort Order screen after deleting the custom field category.
Actual: You get the following error instead....
Coding error detected, it must be fixed by a programmer: Custom field text does not exist.
Debug info:
Error code: codingerror×Dismiss this notification
Stack trace: * line 54 of /question/bank/customfields/classes/custom_field_column.php: coding_exception thrown
- line 373 of /question/bank/columnsortorder/classes/column_manager.php: call to qbank_customfields\custom_field_column::from_column_name()
- line ? of unknownfile: call to qbank_columnsortorder\column_manager->qbank_columnsortorder {closure}()
- line 371 of /question/bank/columnsortorder/classes/column_manager.php: call to array_reduce()
- line 57 of /question/bank/columnsortorder/classes/output/add_column.php: call to qbank_columnsortorder\column_manager->get_hidden_columns()
- line 87 of /question/bank/columnsortorder/classes/output/column_sort_ui.php: call to qbank_columnsortorder\output\add_column->export_for_template()
- line 266 of /lib/outputrenderers.php: call to qbank_columnsortorder\output\column_sort_ui->export_for_template()
- line 42 of /question/bank/columnsortorder/sortcolumns.php: call to renderer_base->render()