Cloze question editor
Maintained by
Stephan Robotta
Make it easy for users to create cloze question types via the TinyMCE editor.
Comments
Product ratings and reviews are coming to Moodle Marketplace. Until then, existing comments remain available to read, but new posts have been disabled.
There were a view changes between 2025050700 and 2025100901. Most notably:
* Remove capability tiny/cloze:viewplugin
* Refacoring
Could you please check, whether you see a js error at the console (which I assume because the TinyMCE doesn't show up at all) and also if there are PHP errors in the webserver log (that could initially cause a problem with the javascript). Another reason could be some incombatibilty with another tiny plugin installed on your site.
I am using the current version on both, the plugin and Moodle without any issues.
I've installed it in Moodle 5.1 and when updating to 2025100901 the whole tiny editor desapears. If I put back 2025050700 it works perfectly fine.
Thank you very much in advance.
Best regards.
Verónica.
That error has been already fixed in the Github repository (still not published here): https://github.com/srobotta/moodle-tiny_cloze/issues/25#issuecomment-2506545438
We've encountered an error message when users try to answer a long text question from Moodle's Questionnaire module. The stack trace informs that this is due to an unresolved call to tiny_cloze's configuration:
line 101 of /lib/editor/tiny/plugins/cloze/classes/plugininfo.php: Error thrown
line 80 of /lib/editor/tiny/classes/plugin.php: call to tiny_cloze\plugininfo::get_plugin_configuration_for_context()
line 72 of /lib/editor/tiny/classes/manager.php: call to editor_tiny\plugin::get_plugin_info()
line 58 of /lib/editor/tiny/classes/editor.php: call to editor_tiny\manager->get_plugin_configuration()
line 149 of /lib/editor/tiny/classes/editor.php: call to editor_tiny\editor::set_default_configuration()
line 94 of /mod/questionnaire/classes/question/essay.php: call to editor_tiny\editor->use_editor()
line 876 of /mod/questionnaire/classes/question/question.php: call to mod_questionnaire\question\essay->question_survey_display()
line 229 of /mod/questionnaire/classes/output/renderer.php: call to mod_questionnaire\question\question->question_output()
line 1336 of /mod/questionnaire/questionnaire.class.php: call to mod_questionnaire\output\renderer->question_output()
line 1248 of /mod/questionnaire/questionnaire.class.php: call to questionnaire->survey_render()
line 280 of /mod/questionnaire/questionnaire.class.php: call to questionnaire->print_survey()
line 82 of /mod/questionnaire/complete.php: call to questionnaire->view()
Changing to another text editor or turning off tiny_cloze fixes it. Any idea why Moodle's Questionnaire is calling for tiny_cloze when answering long text questions? Is this something you can fix?
Best regards, Marius
There is the release 1.10 out now that fixes the loading issue in Moodle 4.1.
Best regards, Stephan
I haven't yet planed a new release. I hope I will do one soon with the fix for 4.1.
Best regards, Stephan
Please make sure that you are edting a cloze question and are on the question text. Only at that place the button should show up. Also make sure that you are using the "new" TinyMCE and not the TinyMCE legacy editor.
Best regards, Stephan
while I never had the idea why the tests didn't detect that error, I was able to reproduce it. In my opinion there is something wrong with the class loader in 4.1 that it doesn't load the question_bank class in the user admin page.
I have disabled that test for 4.1 that will also not allow to use the newly supported multianserrgx plugin (see release notes) with 4.1. There are no practical consequences for you because multianserrgx is not yet in the official Moodle plugin directory and can only be installed via the code from github.
All changes are commited in the main branch.
Best regards, Stephan