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

Course renderer tries to use $course->subcategories and $course->courses when they may not be defined yet

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.4, 2.2.1
    • 2.1.5, 2.2.2
    • Course
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MDL-31502-master-2
    • Easy
    • Hide

      Setup

      • Navigate to Settings -> Site administration -> Front page -> Front page settings
        • Set 'frontpage' and 'frontpageloggedin' to show the 'Combo list'
        • Set 'maxcategorydepth' to 1
      • Navigate to Settings -> Site administration -> Courses -> Add/edit courses
        • Create a new course category at the top level 'top category'
        • Create a new course category in 'top category' called 'middle category'
        • Create a new course category in 'middle category' called 'bottom category'
        • Create a new course in 'middle category' called 'middle course'
      • Navigate to the front page
        • Confirm that the category listing is displayed as defined:
      • top category
        • middle category
          • middle course
          • bottom category
      Show
      Setup Navigate to Settings -> Site administration -> Front page -> Front page settings Set 'frontpage' and 'frontpageloggedin' to show the 'Combo list' Set 'maxcategorydepth' to 1 Navigate to Settings -> Site administration -> Courses -> Add/edit courses Create a new course category at the top level 'top category' Create a new course category in 'top category' called 'middle category' Create a new course category in 'middle category' called 'bottom category' Create a new course in 'middle category' called 'middle course' Navigate to the front page Confirm that the category listing is displayed as defined: top category middle category middle course bottom category

    Description

      The Combo List frontpage item throws errors about undefined stdClass objects (courses and categories) when the maxcategorydepth is set to a lower number than the total depth

      Attachments

        Activity

          People

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Rajesh Taneja Rajesh Taneja
            Sam Hemelryk Sam Hemelryk
            Andrew Davis Andrew Davis
            Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/Mar/12