-
Bug
-
Resolution: Fixed
-
Minor
-
2.8
-
None
-
2.8
-
MOODLE_28_STABLE
-
MOODLE_28_STABLE
The main idea behind the locallib.php file in plugins is to separate the inner API and functionality of the plugin from the interface library lib.php. The lib.php files from all the plugins are loaded by the Moodle core on almost all page requests. That is why it is essential to keep their size as small as possible and provide just necessary interface API/code there. As the file locallib.php is included automatically from lib.php, this whole looses sense. The recommended pattern is to load locallib.php from scripts (like view.php) explicitly.