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

condition_info performance warning displayed after creating course.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.3.5
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide

      0. In system settings ensure debugging is set to DEBUG_DEVELOPER and debug messages are displayed.

      1. In site admin menu, choose Courses / Add/edit courses.
      2. Click 'Add a new course'
      3. Type junk for full name and shortname and leave all other options default, then click save changes.
      4. Click link in breadcrumb to course main page.

      EXPECTED: Course displays with no warnings.
      BEFORE FIX: A warning (as description) appears next to each section. (This only appears the first time. If you reload it will go away.)

      Show
      0. In system settings ensure debugging is set to DEBUG_DEVELOPER and debug messages are displayed. 1. In site admin menu, choose Courses / Add/edit courses. 2. Click 'Add a new course' 3. Type junk for full name and shortname and leave all other options default, then click save changes. 4. Click link in breadcrumb to course main page. EXPECTED: Course displays with no warnings. BEFORE FIX: A warning (as description) appears next to each section. (This only appears the first time. If you reload it will go away.)
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE

      Description

      1. Create a course in a Moodle site running integration 2.3.
      2. After creating the course click on the course link in the navigation bar.
      3. You should be given the following warnings -

      Notice: Undefined property: stdClass::$id in course/lib.php on line 2851

      Performance warning: condition_info constructor is faster if you pass in a $item from get_fast_modinfo or the equivalent for sections. [This warning can be disabled, see phpdoc.]
       
          line 417 of /lib/conditionlib.php: call to debugging()
          line 187 of /lib/conditionlib.php: call to condition_info_base->__construct()
          line 419 of /course/format/renderer.php: call to condition_info_section->__construct()
          line 179 of /course/format/renderer.php: call to format_section_renderer_base->section_availability_message()
          line 720 of /course/format/renderer.php: call to format_section_renderer_base->section_header()
          line 45 of /course/format/weeks/format.php: call to format_section_renderer_base->print_multiple_section_page()
          line 281 of /course/view.php: call to require()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Mar/13