-
Bug
-
Resolution: Fixed
-
Minor
-
3.1.11, 3.2.8, 3.3.5, 3.4.2, 3.5
-
MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
-
MOODLE_34_STABLE, MOODLE_35_STABLE
-
MDL-61238-master -
We've recently encountered an issue where cohort administration pages (both index.php and edit.php) serve up fatal errors to our LTs. This is caused by /cohort/lib.php being included twice, causing redeclaration of the functions.
Note that this issue cannot be encountered on a stock Moodle instance, but with a customisation that includes /cohort/lib.php somewhere after the /lib/setup.php include. This can be simulated by adding the following line to the very bottom of /config.php, after the include:
require_once "{$CFG->dirroot}/cohort/lib.php"; |
Although not relevant, as an example of why a developer might wish to include the cohort library during initialisation: we use cohort memberships to target different branding configuration at our users. To achieve this we have a component that replaces the theme_config object on moodle_page with a branded variant.
- has a non-specific relationship to
-
CONTRIB-7421 Start checking that config.php is only included via require()
-
- Closed
-