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.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.3.7, 2.4.4, 2.5
    • 2.3.8, 2.4.5, 2.5.1
    • Navigation
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • wip-MDL-40344-m26
    • 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.

    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.

      Attachments

        Issue Links

          Activity

            People

              samhemelryk Sam Hemelryk
              samhemelryk Sam Hemelryk
              Dan Poltawski Dan Poltawski
              Ankit Agarwal Ankit Agarwal
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Jul/13