Exception : Call to a member function summarise() on null

Exception : Call to a member function summarise() on null

- Ulrike Albers の投稿
返信数: 8

Hello,

I should have posted an answer in this discussion, but it is closed.

We use Moodle 3.6; in a quiz, there is a problem with the statistics: we get the following error:

Exception : Call to a member function summarise() on null

The same error is displayed when one clicks on recalculate grades. It is possible that the teacher modified some question after a students' attempt (I wonder how, though, as Moodle usually prevents us from doing that). Is there a way to access the statistics?

Thank you in advance!


Ulrike Albers への返信

Re: Exception : Call to a member function summarise() on null

- Tim Hunt の投稿
画像 Core developers 画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers
This looks like MDL-66095 (sorry, not fixed yet) although a temporary work-around was added in MDL-66115, so if you upgrade to the latest 3.6.x release, things should start working.

And, more generally, be very, very careful editing questions after students had attempted them.
Tim Hunt への返信

Re: Exception : Call to a member function summarise() on null

- Ulrike Albers の投稿
Thank you very much for your answer Tim! I'm very sorry I forgot to subscribe to the discussion so I just saw it know. I will let teachers know.
Tim Hunt への返信

Re: Exception : Call to a member function summarise() on null

- heli g の投稿
We are experiencing this issue on 3.5, but cannot identify which files were modified in the MDL-6611 temporary work-around.
Assistance would be greatly appreciated.
heli g への返信

Re: Exception : Call to a member function summarise() on null

- Tim Hunt の投稿
画像 Core developers 画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers
That is the wrong issue number. The right issue number is in my post above.

And, the code change for that fix is https://github.com/moodle/moodle/commit/39260e3eadc71613320d80b99c3d4352b9994e48
Tim Hunt への返信

Re: Exception : Call to a member function summarise() on null

- heli g の投稿
Thank you so much Tim - that fixed it. You really are amazing!
(Apologies for the typo in the post above, I was indeed looking at MDL-66115)
heli g への返信

Re: Exception : Call to a member function summarise() on null

- heli g の投稿
Just in case anyone else is as clueless as me, if you can't find a link to code updates in the tracker: Go to https://github.com/moodle/moodle and enter the issue number in the Search box. The link to the code change is under Commits.
It seems so obvious now, but not so much when I was panicking late last night... Thanks again for your prompt assistance Tim.
heli g への返信

Re: Exception : Call to a member function summarise() on null

- heli g の投稿
The issue was identified because forum posts were not being emailed. It has temporarily been resolved by disabling \core\task\legacy_plugin_cron_task - but what effect will this have on Quizzes or any other mods that may be using legacy cron?
heli g への返信

Re: Exception : Call to a member function summarise() on null

- Tim Hunt の投稿
画像 Core developers 画像 Documentation writers 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers
To be honest, I don't remember exactly what the situation was in Moodle 3.5.

There was a big push to get all the legacy cron converted to use the new scheduled task system (MDL-61164). Some of that was done for 3.5, but some of it was not finished until 3.7 (See the linked issues.)