Post update error. I need help.

Post update error. I need help.

by Emphatic . -
Number of replies: 7

Hello. After updating Moodle from version 3.10 to version 3.11.6+, when I want to enter existing registered courses, I get an error like the one below. I need urgent help on this matter. Thanks.


Error screenshot: https://prnt.sc/G5sPUjjkmE0G

Average of ratings: -
In reply to Emphatic .

Re: Post update error. I need help.

by Ken Task -
Picture of Particularly helpful Moodlers

/lib/completionlib.php 1123

That line is in this section of code:

// Fill the other completion data for this user in this module instance.
$data += $this->get_other_cm_completion_data($cminfo, $userid);
$data['other_cm_completion_data_fetched'] = true;


Might add to config.php:

$CFG->enablecompletion=0;

That turns completion off ... or is supposed to.   See if you can then get into course in edit mode.

Then check out Advanced Features ...

admin/settings.php?section=optionalsubsystems

to see what else is enabled or disabled that might be related.

Sorry ... don't have a more specific answer.   Is there no 'more info about this error' link if you have debugging turned on?

'SoS', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Post update error. I need help.

by Emphatic . -
Thank you very much for your help Ken. $CFG->enable completion=0; I did this and my problem was fixed. What exactly did I do when I added this code?
In reply to Emphatic .

Re: Post update error. I need help.

by Ken Task -
Picture of Particularly helpful Moodlers
Uhhh ... not really 'fixed'! We've applied a bandaide to a 'boo-boo' so you can get into system and investigate completions situation. What you did, supposedly, was turned off completions site wide - in a way.

There are many settings to completions ... check them out.

It's really fixed when one comments out (// in front) that added line in config.php and you get no issues!

'SoS', Ken
In reply to Ken Task

Re: Post update error. I need help.

by Emphatic . -
Hello Ken. Unfortunately the problem is not resolved. When I turned off activity completion, the activity completion settings in other lessons did not work and I had to remove the code I added again from the config.php file. So the error still persists. I also checked the settings at the address below, they are all as I want and there is no problem.
admin/settings.php?section=optionalsubsystems
In reply to Emphatic .

Re: Post update error. I need help.

by Ken Task -
Picture of Particularly helpful Moodlers

Rats!

Error said this ... "Fill the other completion data for this user"

So there are two things there ... completion data and a user but it doesn't say which/what user.

When you upgraded, did you also work on users in Moodle?   If so, what did you do?  Did you remove student accounts?

Can you get into a course and look at users in that course?

Ok, suggest turning on debugging to developer level to see if we can get more info about this.   If you can't access site admin area to turn on debugging, you might have to add debugging lines from config-dist.php file to your config.php file.

'SoS', Ken

In reply to Ken Task

Re: Post update error. I need help.

by Emphatic . -
I turned on debug mode and it encountered errors as in the picture. https://prnt.sc/bsj_X25Jt88X
In reply to Emphatic .

Re: Post update error. I need help.

by Ken Task -
Picture of Particularly helpful Moodlers

Have a request for quicker responses here in forums ... copy and pate the text of the debug rather than creating a screen shot and linking to postbin.   It's one more click for those of us trying to help and one cannot use copy and paste to point out specific lines for you to pursue your investigation on solving. smile

I see 'moove' theme ... an addon theme ... set the default theme to 'boost' via config.php file as a quick test to see if that is the issue:

$CFG->theme='boost';

No need to restart or re-launch anything just do something/anything where the error appeared before and see if it goes away.

If it does ... it's a theme issue.

Did you update the moove theme to be compat  with your 3.11.highest now?

There is a 3.11 version of moove theme available:

https://moodle.org/plugins/theme_moove/versions

Once you've upgraded the moove theme, comment out the theme line added by typing // in front of that line ... do that just in case you find more issues related to theme!

Also, is your cron job running ok?

How about cron job task related to completion?

\core\task\completion_daily_task

\core\task\completion_regular_task

'SoS', Ken