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

REPORT_CUSTOMSQL_MAX_RECORDS conflict between Configurable Reports and Ad-hoc Database Queries

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.7
    • Fix Version/s: None
    • Labels:
      None
    • Plugin Version:
      2014111200
    • Affected Branches:
      MOODLE_27_STABLE

      Description

      When I have both the Configurable Reports block and the Ad-hoc database queries report plugins installed in Moodle, I get the following notice with maximum debugging enabled:

      Notice: Constant REPORT_CUSTOMSQL_MAX_RECORDS already defined in /www/moodle/report/customsql/locallib.php on line 25.

      That line is:

           define('REPORT_CUSTOMSQL_MAX_RECORDS', 5000);
      

      I have determined that this is due to a conflict with a constant of the same name defined around line 25 of blocks/configurable_reports/reports/sql/report.class.php:

           defined('REPORT_CUSTOMSQL_MAX_RECORDS') || define('REPORT_CUSTOMSQL_MAX_RECORDS', 5000);
      

      Could you please replace your line with a line similar to the one from the Configurable Reports plugin? That way, regardless of the order in which Moodle loads the plugins, there won't be any conflict.

      Best regards,

      Michael Milette

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: