Moodle

setup.php could be nice and look for local/lib.php and include it

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.2, 2.0
  • Fix Version/s: STABLE backlog
  • Component/s: Libraries
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Since there are hooks all over the place for running local code, it would be great if we supported looking for a local lib as a core library and pulling it in if it exists.

Eg just after all the main library requires, we could do

if (file_exists($CFG->dirroot . '/local/lib.php')) {
require_once($CFG->dirroot . '/local/lib.php');
}

If people are happy with this I can push to 1.9 and HEAD.

Activity

There are no comments yet on this issue.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: