php 7x is now EOL but this plugin does not work in php8 - response reports throw errors.
Has anyone got a fix/patch to get this working in php8
We need more details!
On my localhost running PHP Version 8.1.13, Moodle 4.1, Questionnaire 3.11.1 (Build - 2022062300) I see no problem at all.
Please specify your Moodle version, Questionnaire version, PHP 8 exact version. Add screenshots, etc.
Sorry here are more details. These errors do not happen with php7.4.
PHP 8.0.27
Zend Engine v4.0.27, Copyright (c) Zend Technologies
with Zend OPcache v8.0.27, Copyright (c), by Zend Technologies
mod_questionnaire 4.0.0 (Build - 2022030300)
Moodle 4.0.1+ Build: 20220527
Error happens when viewing the report:
/mod/questionnaire/report.php?instance=5&group=0
Error message:
Exception - Attempt to modify property "data" on null
More information about this error
×Debug info:
Error code: generalexceptionmessage
×Stack trace:
line 3994 of /mod/questionnaire/questionnaire.class.php: Error thrown
line 614 of /mod/questionnaire/report.php: call to questionnaire->response_analysis()
Hi!
You write "mod_questionnaire 4.0.0 (Build - 2022030300)"
How is that possible? Latest Questionnaire available version from the Moodle plugins directoryis 3.11.1 (Build - 2022062300) (2021062301)?
I have posted this bug on the github page so lets hope it gets fixed next release.
Are you using php8?
php 8.0.27
try with feedback sections enabled but with no feedback sections. Then click view all responses.
@Colin,
1.- People trying to help you here have lost a lot of time because you failed to give all the necessary information straight away, but only piece after piece.
2.- It would really have helped us help you if - as requested - you had posted your questionnaire instance on this forum.
3.- Finally you write "...try with feedback sections enabled but with no feedback sections. Then click view all responses." Why would you do that? You can't blame a piece of software for not anticipating your careless use of it.🙃 This is tantamount to blaming your car makers if you inadvertently pressed the accelerator pedal instead of the brake pedal and had an accident.
I have tried what you suggested, i.e. the weird idea of "enabling feedback sections with empty feedback sections" and I confirm that PHP 8 does throw out warnings (not errors). The reason being that PHP 8 is less tolerant than PHP 7 of approximate syntax. These are minor annoyances but do not prevent the program from working. I expect the current Questionnaire maintainer, Mike, will take some time to check Questinnaire against PHP 8 in due course.