Creating an Essay question in a Question Bank can cause an unintended setting issue that appears to be a bug.
First, to reproduce/break it:
- Enter any course, visit the Question Bank, Create a new Essay question.
- Provide filler verbiage for question name/text, change 'allow attachments' to "1", change 'Require attachments' to "1". Save the question.
- Create another new Essay question - Moodle has now remembered your past settings (Settings should reflect 'allow attachments = 1' and 'require attachments = 1').
- Change 'Allow attachments' to "No" and press save.
- The save will fail, 'require attachments' will state in red "you cannot require more attachments than you allow." This will then disappear unprompted.
- While only seeing 'Allow attachments' = "No", you will be unable to save, and stuck editing.
- Change 'Allow attachments' to "1", change 'Require attachments" to "Attachments are optional". Save the question - it will work.
- Edit that same essay question, now change 'Allow attachments' from "1" to "No". Save the question - it will now work where it had failed in step #5 above.
In short, the Essay settings will not allow you to shift from 'Allow attachments "1" to "No" unless the subsetting, 'Require attachments', is set to "Attachments are optional", despite that subsetting disappearing when 'Allow attachments' is set to 'No'.
The exact Moodle version reflected in our site is 3.11.4+ (Build: 20211116)
Please let me know if I can clarify any of these Instructions/steps to aid in resolving the bug.