Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-45051

validate_data for events should be called only with debugdeveloper

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.7
    • Events API
    • MOODLE_27_STABLE
    • MDL-45051-master
    • Hide
      1. Add following code to core\event\course_module_viewed::validate_data() (as the first line)

                throw new \coding_exception('MDL-45051');
        

      2. Add this config to your config file
        $CFG->debug = 0;
      3. Visit any course module that triggers the above event, ex:- Glossary
      4. Make sure no error is seen.
      5. Add this to your config.php
        $CFG->debug = 32767;
      6. Visit the module again and make sure an exception is thrown.
      Show
      Add following code to core\event\course_module_viewed::validate_data() (as the first line) throw new \coding_exception('MDL-45051'); Add this config to your config file $CFG->debug = 0; Visit any course module that triggers the above event, ex:- Glossary Make sure no error is seen. Add this to your config.php $CFG->debug = 32767; Visit the module again and make sure an exception is thrown.

      Calling validate_data() is not required for production installs, it is a developer thing and should be done only when debug developer is on.

            Unassigned Unassigned
            ankit_frenz Ankit Agarwal
            Petr Skoda Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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