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

CACHE_DISABLE_ALL should not disable cache_data_sources

    XMLWordPrintable

Details

    • MOODLE_26_STABLE, MOODLE_310_STABLE, MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • MDL-42012-39-alt
    • MDL-42012-master-alt
    • 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

    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

              dobedobedoh Andrew Lyons
              marina Marina Glancy
              Tim Hunt Tim Hunt
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Janelle Barcega Janelle Barcega
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Safat Shahin, Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Sabina Abellan, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                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