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

Navigation AJAX mixes up branches and tries to load the wrong content in some situations.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.7, 2.4.4, 2.5
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1
    • Component/s: Navigation
    • Labels:
    • Testing Instructions:
      Hide

      The actual situation is hard to repdroduce here we need to test the AJAX loading of the navigation to make sure it still works.

      Using a site with a categories, sub categories, lots of courses, and students with enrolments.

      1. Log in as a user with no enrolments and check the "Courses" branch still loads correctly as do sub categories and courses through the navigation.
      2. Log in as a user with enrolment, check the My Courses branch expands as you would expect.
      3. Log in as admin and toggle My courses to show categories (check navigation settings)
      4. Check the My courses branch again.
      Show
      The actual situation is hard to repdroduce here we need to test the AJAX loading of the navigation to make sure it still works. Using a site with a categories, sub categories, lots of courses, and students with enrolments. Log in as a user with no enrolments and check the "Courses" branch still loads correctly as do sub categories and courses through the navigation. Log in as a user with enrolment, check the My Courses branch expands as you would expect. Log in as admin and toggle My courses to show categories (check navigation settings) Check the My courses branch again.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-40344-m26

      Description

      This is an annoying issue to reproduce, you need to have the following situation:

      1. Two categories A and B
      2. One course C which has the same ID as Category B. This course should be in Category A.
      3. One course D which has a random ID and is in Category B.
      4. A user enrolled in both courses.

      I hit this with my generated site that contains 25+ categories (3 levels deep) and 100 courses randomly assigned to categories.

      With the above situation produced:

      1. proceed to enrol a student in all courses.
      2. Log in as the student
      3. Using the navigation block expand the My courses branch, and then expand the first category.
      4. Now try to expand the sibling category.
      5. You'll likely get the wrong content.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Jul/13