Moodle
  1. Moodle
  2. MDL-32610

Update notifications should have a kill switch

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      Testing difficulty: medium (requires access to the source code)

      1. Put $CFG->disableupdatenotifications = true; into your config.php (there is no corresponding UI setting intentionally)
      2. TEST: Make sure there is no Site administration > Server > Update notifications section available
      3. TEST: Make sure there is no available updates info at the Plugins overview admin page
      4. TEST: Make sure there is no available updates info at the admin Notifications page
      5. Increase the $plugin->version in some of your plugin's version.php file and visit the /admin page
      6. TEST: Make sure there is no available updates info at the Plugins check upgrade page
      7. Execute cron and grap its output
      8. TEST: Make sure there is nothing regarding available updates fetching mentioned in the cron output
      9. Remove the flag from the config.php and ideally make sure that all places mentioned above have the available updates related controls back.

      Show
      Testing difficulty: medium (requires access to the source code) 1. Put $CFG->disableupdatenotifications = true; into your config.php (there is no corresponding UI setting intentionally) 2. TEST: Make sure there is no Site administration > Server > Update notifications section available 3. TEST: Make sure there is no available updates info at the Plugins overview admin page 4. TEST: Make sure there is no available updates info at the admin Notifications page 5. Increase the $plugin->version in some of your plugin's version.php file and visit the /admin page 6. TEST: Make sure there is no available updates info at the Plugins check upgrade page 7. Execute cron and grap its output 8. TEST: Make sure there is nothing regarding available updates fetching mentioned in the cron output 9. Remove the flag from the config.php and ideally make sure that all places mentioned above have the available updates related controls back.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-32610-hide-updates
    • Rank:
      39537

      Description

      In a few circumstances (such as completely managed servers, which may have a lot of local modifications) it is desirable to not have the check for updates active.

      Please add a config variable check such as

       if (!empty($CFG->disableupdatenotifications)) {
          return;   // Hide all this functionality from GUI and disable cron checks etc
       }
      

      so it can be defined in config.php

        Issue Links

          Activity

          Hide
          David Mudrak added a comment -

          Submitting a patchset for integration. There are couple of places in the code that needed to be wrapped.

          Show
          David Mudrak added a comment - Submitting a patchset for integration. There are couple of places in the code that needed to be wrapped.
          Hide
          Petr Škoda added a comment -

          It will be funny when the next moodle large scale hack uses this killswitch to disable update notifications...

          Show
          Petr Škoda added a comment - It will be funny when the next moodle large scale hack uses this killswitch to disable update notifications...
          Hide
          David Mudrak added a comment -

          No worries Petr. We all will blame yourself for publishing the recipe here :-p

          Show
          David Mudrak added a comment - No worries Petr. We all will blame yourself for publishing the recipe here :-p
          Hide
          Sam Hemelryk added a comment -

          Thanks David, changes look good, has been integrated now.

          Show
          Sam Hemelryk added a comment - Thanks David, changes look good, has been integrated now.
          Hide
          Andrew Davis added a comment -

          Worked as described. Passing.

          Show
          Andrew Davis added a comment - Worked as described. Passing.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          U P S T R E A M I Z E D !

          Many thanks for the hard work, closing this as fixed.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - U P S T R E A M I Z E D ! Many thanks for the hard work, closing this as fixed. Ciao
          Hide
          Helen Foster added a comment -

          Just noting that this setting is documented here: http://docs.moodle.org/23/en/Notifications

          Show
          Helen Foster added a comment - Just noting that this setting is documented here: http://docs.moodle.org/23/en/Notifications

            People

            • Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: