-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php8 - feedback sections not working #456
Comments
That is a quite unhelpful Bug report. Please share some more details, for goodness sake… |
Sorry here are more details. These errors do not happen with php7.4. PHP 8.0.27 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: |
And what does one do before viewing the report /mod/questionnaire/report.php?instance=5&group=0? |
edit: I did some testing and this error only happens when you enable "Feedback Sections" in the feedback tab - all of the questionnaire instances had this turned on. If you use global feedback or no feedback it works. Also commenting out works. $feedbackmessages = $this->response_analysis($rid, $resps, $compare, $isgroupmember, $allresponses, $currentgroupid); |
Are there student's attempts? |
this happens with or without attempts if feedback sections are enabled and when using php8 only. |
Strange. |
Also feedback sections enabled but none added. This error only happens with php 8 not in 7.4 |
Hi, I'm also experiencing the same error. I'm running Moodle 3.11.12 and PHP 8.0.27. Error goes away when I revert back to PHP 7. |
Ah. Looks like the "data" property of the $table object is created by using it. Perhaps this doesn't work with PHP8? |
Hi Mike, I get the error when I click on View All Responses I'm receiving the same error that Colin is. Please let me know if you need any additional info. Debug info: Stack trace: |
But I need steps...
|
1.What questions have you added? Essay Box 2.What settings are you using? Type: Respond many 3.What version of questionnaire and Moodle are you using? Moodle: 3.11.12 4.Are they any responses? Yes, there are responses. If I revert back to PHP 7.4.33 I can see them. 5.It was mentioned that you had set the Feedback options to Feedback sections. What is the display scores setting? What charts are selected? Feedback options: Feedback sections 6.Have you added any feedback sections? What are there settings? No Feedback sections have been added. Please let me know if you need anything else and thank you for looking into this. |
Last question... Did you change it to have Feedback options after there were responses? Or was it all initially set up and then the responses were added? |
It was initially setup that way. |
I cannot replicate the problem even following your steps. Okay... That's it. There is one important step missing. You must have clicked the "Save settings and Edit Feedback Sections", and then never saved any sections. When I do that, I can replicate this bug. |
For reference, this error will occur if feedback was set, a feedback section was begun to be added, but then a section was never saved. It also doesn't seem to allow the questionnaire to be changed back to "No feedback messages". |
Try the code in #464. This checks to see if feedback sections are actually being used before trying to display them. |
I modified the code as listed in 464. The same error shows and I don't see anything about feedback sections and if I click feedback sections I don't see anything except for adding a new one. Also if I change to global feedback the error goes away. The Yes/No question in the questionnaire that I'm experimenting with seems to be the issue if it is required. If I change it to not required the error goes away. As you stated I'm not able to revert back to "No Feedback messages". Thanks for working on this |
Please try the code in #464 again. I have added code to ensure that $table is always set. |
Updated code worked. Thank you for providing a patch. |
Hi.... there are multiple issues with response reports and php8.
Please support php8.
The text was updated successfully, but these errors were encountered: