I am upgrading a custom block in preparation for our upgrade to moodle 3.1 and ran it through codechecker until all errors were gone. I went to install it but ended up with an error pointing to line 849 of lib/upgradelib.php.
// OK, it's as we all hoped. For further tests, the object will do them itself.
if (!$blockobj->_self_test()) {
throw new plugin_defective_exception($component, 'Self test failed.');
}
Is it required that blocks define their own method? I put a function in the block code to simply return true, but I would like to know what I am really supposed to do with this method. I could not find anything more than a page Blocks/Appendix A that said this was a private method and no description is given. I did not see in the block development instructions to add this method. I'm new to moodle so sorry if I missed this somewhere.