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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2.1
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      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
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31502-master-2

      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

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12