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

Regression from partial cache rebuild

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • MDL-72991-master-4
    • Hide

      Most of the tests were covered by the newly created PHPUnit.

      Manual test - This was copied from MDL-55231

      Test case 1: Drag and drop files in the course

      1. Log in as an editing teacher.
      2. Click "Turn editing on".
      3. Drag a picture to the course page.
      4. Verify that a resource module should be created named after the filename.

      Test case 2:

      1. Log in as an editing teacher.
      2. Create two page modules.
      3. Enable manual completion for the first page module.
      4. Enable access restriction for the second page module, make it available when first page is marked as done.
      5. Log in as a student.
      6. Mark first page module as done.
      7. Verify that the second page module is available after that.
      Show
      Most of the tests were covered by the newly created PHPUnit. Manual test - This was copied from MDL-55231 Test case 1: Drag and drop files in the course Log in as an editing teacher. Click "Turn editing on". Drag a picture to the course page. Verify that a resource module should be created named after the filename. Test case 2: Log in as an editing teacher. Create two page modules. Enable manual completion for the first page module. Enable access restriction for the second page module, make it available when first page is marked as done. Log in as a student. Mark first page module as done. Verify that the second page module is available after that.
    • 1
    • HQ Team International CIH2-212, HQ Team International CIH2-213, HQ Team International CIH2-215, HQ Team International CIH2-216, HQ Team International CIH2-217, HQ Team International CIH2-218

      I've been tracking down a bug which I believe to be a major and serious regression causedby MDL-55231.

      The changes in that issues modified the course modinfo cache to allow for partial rebuilds. In some cases (currently section, but others may also apply) the following happens when calling the move_section_to() function:

      • The course sections which have been modified are purged from the cache with course_purge_section_cache($sectioninfo);
      • The cache is cleared with rebuild_course_cache($course->id, true, true); which does not rebuild the cache, but clears some of the local caches
      • later on, the same {$course} object is used to fetch another copy of the modinfo
      • Because it is the same $course object, it has the same $cacherev as it had when it was first requested, and therefore matches the $coursemodinfo->cacherev (https://github.com/moodle/moodle/blob/8af7bec81e8da777c3895c7eecaf84dffd24c6be/lib/modinfolib.php#L479)
      • That means that we never call self::inner_build_course_cache
      • WHich means that the section is never rebuilt

            huongn@moodle.com Huong Nguyen
            dobedobedoh Andrew Lyons
            Simey Lameze Simey Lameze
            Andrew Lyons Andrew Lyons
            Gladys Basiana Gladys Basiana
            Votes:
            12 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 weeks, 55 minutes
                2w 55m

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