I was under the impression it was working perfectly until I also installed the Questionnaire module on the site. There is now this error when adding the cloned activity:
[22-Mar-2024 09:08:23 Africa/Johannesburg] Database transaction aborted automatically in /var/www/html/learndev/course/modedit.php
[22-Mar-2024 09:08:23 Africa/Johannesburg] Default exception handler: Exception - Class "questionnaire" not found Debug:
Error code: generalexceptionmessage
* line 1282 of /mod/questionnaire/lib.php: Error thrown
* line 208 of /course/modlib.php: call to mod_questionnaire_coursemodule_edit_post_actions()
* line 397 of /course/modlib.php: call to plugin_extend_coursemodule_edit_post_actions()
* line 190 of /course/modlib.php: call to edit_module_post_actions()
* line 170 of /course/modedit.php: call to add_moduleinfo()
When I uninstall the
Questionnaire module the hacked module appears to be working again with no php errors.
I don't understand why it is pointing to /mod/questionnaire/lib.php
when Questionnaire is installed but has no issue when it is not
installed. I have checked the code in the line mentioned and it does
point to the new module name. When I comment our the function in the
original Questionnaire code both activities can be added with no
error.
The function is this:
*
Called after the activity and module have been created. Use this to
copy any images if the questionnaire was created from another
* questionnaire survey.
Why are two separate modules still pointing to the same code? What have I missed? I don't think I need that functionality in the hacked clone, but the Questionnaire module should not need to be modified for the custom plugin to work... If anyone can point me in the right direction to sort this out I would really appreciate it.
Thank you

