catalyst / moodle-auth_outage

Planned, graduated user and admin friendly moodle outages
https://moodle.org/plugins/auth_outage
17 stars 33 forks source link

Issue #189 Unable to find Class 'core\ip_utils' #190

Closed katcher closed 4 years ago

katcher commented 4 years ago

Following upgrade of moodle to 3.5.11, error above prevented moodle from displaying on the web. The class ip_utils was for somereason not loaded and through an error preventing the site from displaying when in maintenance mod. Adding the require class appears to have fixed the issue. #189

brendanheywood commented 4 years ago

hmm this is weird, that is an auto loaded class, and it should not need this:

https://github.com/moodle/moodle/blob/master/lib/moodlelib.php#L9179

I'll merge this in either way as it's safe.

Can you reproduce this on demand? This might actually be a deeper root cause bug in core

brendanheywood commented 4 years ago

Ah I understand it, I don't think the moodle class loaded is in memory yet. I'm ok with this.

There is a unit test failure, any change you can tweak the test and get that green again please?

Failing travis unit tests:

https://travis-ci.org/github/catalyst/moodle-auth_outage/jobs/663981854#L784

fix needs to be here:

https://github.com/catalyst/moodle-auth_outage/blob/master/tests/phpunit/local/outagelib_test.php#L291

Peterburnett commented 4 years ago

Hi all, thanks for the patch @katcher . I have fixed the unit tests, and submitted a second PR here: #191 . I will close this PR now, and merge the duplicate