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

asynchronous_copy_task does not clear course cache

XMLWordPrintable

    • MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • mdl-80917-403
    • mdl-80917-main
    • Hide

      Reproduction:

      From the site directory, install the minimal dummy plugin:

      git clone https://github.com/Fragonite/moodle-local_tracker_demo.git local/tracker_demo

      Testing:

      1. Make sure PHPUnit is initialised for the site.
      2. Navigate to the site directory from the CLI.
      3. Run: 

        php vendor/bin/phpunit --testsuite core_backup_testsuite --filter test_course_copy

      4. Verify all tests pass.
      Show
      Reproduction: From the site directory, install the minimal dummy plugin: git clone https: //github.com/Fragonite/moodle-local_tracker_demo.git local/tracker_demo Testing: Make sure PHPUnit is initialised for the site. Navigate to the site directory from the CLI. Run:  php vendor/bin/phpunit --testsuite core_backup_testsuite --filter test_course_copy Verify all tests pass.

      The asynchronous_copy_task class does not clear the course cache after running, yet it updates the course record. This can cause problems, such as failing core unit tests if get_fast_modinfo is called from a \core\event\course_restored handler.

       

      1) core_backup\copy_helper_test::test_course_copy
      Failed asserting that '0' matches expected 1582386400.
      2) core_backup\copy_helper_test::test_course_copy_no_users
      Failed asserting that '0' matches expected 1582386400.
      3) core_backup\copy_helper_test::test_course_copy_students_data
      Failed asserting that '0' matches expected 1582386400.
      

       

            avdb Alexander Van der Bellen
            avdb Alexander Van der Bellen
            Dmitrii Metelkin Dmitrii Metelkin
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 47 minutes
                47m

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