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

CACHE_DISABLE_ALL should not disable cache_data_sources

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test 1

      1. Open your config.php in your preferred editor
      2. At the top of the file, just beneath the PHP open tag (<?php) add:

        define('CACHE_DISABLE_ALL', true);
        

      3. Log in as editing teacher or above
      4. Navigate to a course
      5. From the cog, choose More
      6. Navigate to Question bank -> Questions
      7. Create a new question (any question will do)
      8. Locate the newly created question in the question bank
      9. From the Edit menu, choose "Preview"
        1. Confirm that a new window opened
        2. Confirm that no errors were shown on the page

      Test 2

      1. Download the attached testcache.php and save it in the Root of you Moodle install where you run PHPunit.
      2. Run it in the CLI: php testcache.php nocache.
        1. Confirm that there were no assertion failures
      Show
      Test 1 Open your config.php in your preferred editor At the top of the file, just beneath the PHP open tag ( <?php ) add: define('CACHE_DISABLE_ALL', true); Log in as editing teacher or above Navigate to a course From the cog, choose More Navigate to Question bank -> Questions Create a new question (any question will do) Locate the newly created question in the question bank From the Edit menu, choose "Preview" Confirm that a new window opened Confirm that no errors were shown on the page Test 2 Download the attached testcache.php and save it in the Root of you Moodle install where you run PHPunit. Run it in the CLI: php testcache.php nocache . Confirm that there were no assertion failures
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_310_STABLE, MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull 3.8 Branch:
      MDL-42012-38-alt
    • Pull 3.9 Branch:
      MDL-42012-39-alt
    • Pull 3.10 Branch:
      MDL-42012-310-alt
    • Pull Master Branch:
      MDL-42012-master-alt

      Description

      There were two behat test failures when when I set
      define('CACHE_DISABLE_ALL', true); in config.php, both of them seem to be in the same line.

      line 67 of /question/preview.php: call to question_require_capability_on()
      

      I attach the full log.

      If you re-run behat tests, please cherry-pick MDL-41942 because without it there will be much more failures

        Attachments

        1. behat_nocaches.log
          6 kB
        2. example_isolated_test.php
          3 kB
        3. MDL-42012-master-alt.mdk.patch
          7 kB
        4. Screenshot_1.jpg
          Screenshot_1.jpg
          31 kB
        5. Screenshot_2.jpg
          Screenshot_2.jpg
          66 kB
        6. testcache.php
          4 kB

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              marina Marina Glancy
              Peer reviewer:
              Tim Hunt
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Tim Hunt, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 30 minutes
                  4h 30m