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

Correct Moodle 4.0 course renderer warning in frontpage

XMLWordPrintable

    • Moppies Kanban

      Now the course is rendered using output components there's an unexpected warning in the frontpage.

      Notice: Undefined property: stdClass::$coursedisplay in course/classes/output/section_format/header.php on line 92

      Steps to reproduce:

      1. Set debug to developer level
      2. Add some activity to the frontpage (not the dashboard, the old frontpage)
      3. Edit summary (head section) and add a custom name.
      4. Turn edit off

      Expected result: no warning is displayed

      Real result: in some instances, the $SITE course does not have 
      $course->coursedisplay attribute an get a warning when the output component tries to access it.
       
      How to solve: if "coursedisplay" is optional, output/header should take this into account. Apart, a behat test for this scenario will be a good idea.

            tusefomal Ferran Recio
            tusefomal Ferran Recio
            Carlos Escobedo Carlos Escobedo
            Adrian Greeve Adrian Greeve
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 50 minutes
                2h 50m

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