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

Course format options squat on course object and are assumed to exist

XMLWordPrintable

    • 1
    • HQ Team International CIH2-218

      As part of testing instructions for MDL-73679 I am looking at format_topcoll and hitting a number of barriers.

      One of those barriers is that format options are placed onto $course and are then assumed to exist even though these are specific to individual formats.

      This also concerns me as it prevents us from ever adding another field to the course table as it could conflict with an existing one in a contrib course format.

      We should not:

      • add random options to the $course object; and
      • assume that properties exist.

      For reference, the error I have is this:

      ( ! ) Notice: Undefined property: stdClass::$coursedisplay in /Users/nicols/Sites/moodles/sm/moodle/course/format/classes/output/local/content/section.php on line 216
      

      The coursedisplay is actually a feature of the format_topics and format_weeks formats, but is assumed to exist by core.

            Unassigned Unassigned
            dobedobedoh Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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