PHP Error when attempting to add an activity or resource

PHP Error when attempting to add an activity or resource

by Seth Merle -
Number of replies: 5

I am running moodle 3.2 on a CentOS 7 box and I just upgraded from PHP 5.6 to 7.1 and when I attempt to add a activity or resource I get the following error.

Fatal error: Cannot 'break' 3 levels in /var/www/html/grade/import/kioskpearsonjson/lib.php on line 74

When I originally upgraded I didn't install PHP JSON and got an error. Now after installing it everything else seems to be working but this. 

Any help or insight would be appreciated

Average of ratings: -
In reply to Seth Merle

Re: PHP Error when attempting to add an activity or resource

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
'kioskpearsonjson' ??

What's that then? It's not core Moodle. Looks like the problem is in an optional plugin.
In reply to Howard Miller

Re: Re: PHP Error when attempting to add an activity or resource

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Answering my own question....

Presumably, this... https://github.com/lsuits/gradeimport_kioskpearsonjson

It doesn't bode well that the last update was 5 years ago and PHP 7 is newer than that. And you appear to have the (even older) initial commit rather than the "latest" version.
In reply to Howard Miller

Re: Re: Re: PHP Error when attempting to add an activity or resource

by Seth Merle -
So that old plugin isn't used anymore so I just went ahead and removed it and now I seem to be getting that error if I try to go to any part of moodle. Could I just remove /var/www/html/grade/import/kioskpearsonjson/lib.php since its no longer used?
In reply to Seth Merle

Re: Re: Re: Re: PHP Error when attempting to add an activity or resource

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
How did you remove it? Did you go through Site administration -> Plugins -> Plugins overview and then click 'Uninstall' against the correct plugin? Then delete the directory completely (as instructed in the removal process)? 

You can't still be getting an error for /var/www/html/grade/import/kioskpearsonjson/lib.php if you deleted it (implying you didn't).
In reply to Howard Miller

Re: Re: Re: Re: Re: PHP Error when attempting to add an activity or resource

by Seth Merle -
Okay removing the directory fixed the issue and I am no longer getting that error when I ad an activity or resource. Thanks a lot for your help!