srobotta / moodle-tiny_cloze

GNU General Public License v3.0
3 stars 6 forks source link

Exception - Class "question_bank" not found with mod_questionnaire (Essay question) #25

Open KepaUrzelai opened 1 day ago

KepaUrzelai commented 1 day ago

Hello,

With the tiny_cloze plugin enabled, answering questions in a questionnaire (/mod/questionnaire/complete.php) gives an exception when an Essay type of question with HTML editor response is added:

Exception - Class "question_bank" not found Debug: Error code: generalexceptionmessage

  • 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()

Disabling the tiny_cloze plugin, the Questionnaire module with an Essay is fully usable.

Moodle: 4.4.4+ (Build: 20241122)
editor_tiny: Build 2024042200
tiny_cloze: 1.10 (Build: 2024103100)
mod_questionnaire: 4.4.0 (Build: 2024082900)

Any help would be appreciated, Thanks a lot.

izendegi commented 6 hours ago

I've checked that the issue happens here, maybe because question_bank::get_qtype cannot be called from mod_questionnaire