Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3851

settings.php - all require_once and settings should be in a if ($ADMIN->fulltree) {

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.1.7, 2.2, 2.3
    • Module: Turnitintool
    • None
    • MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE

      Similar to CONTRIB-3843, the settings tree is always generated at present, regardless of whether it is required. Additionally, MOODLE_INTERNAL should be checked for.

      To fix, wrap the whole lot (including the require_once() calls) in:

      defined('MOODLE_INTERNAL') || die;
       
      if ($ADMIN->fulltree) {
          // Existing code
      }

      This should further reduce page load times as the settings tree won't be generated on every page load - they'll only be generated when in the Activity modules settings tree.

            paul.dawson Paul Dawson (Inactive)
            dobedobedoh Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.