Moodle
  1. Moodle
  2. MDL-26469

Cron setting not updated when plugins are upgraded

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1, 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.0.8, 2.1.5, 2.2.2
    • Component/s: General
    • Labels:
    • Testing Instructions:
      Hide

      Test the mod_quiz upgrade in MDL-30635 and make sure modules.cron gets updated from 0 to 60.

      Show
      Test the mod_quiz upgrade in MDL-30635 and make sure modules.cron gets updated from 0 to 60.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Rank:
      16062

      Description

      1. Create a new plugin with and put the following line in version.php:
      $plugin->cron = 0

      2. Install the plugin to a Moodle server.
      3. Update version.php, changing the $plugin->version number and setting the cron line to, for example:
      $plugin->cron = 60

      4. Visit the admin/notifications page to upgrade the module

      Expected outcome:
      'mdl_modules' database table now contains the updated 'cron' value for this plugin (i.e. it should be '60')

      Actual outcome:
      'mdl_modules' database table still has the original 'cron' value ('0')

      Workaround:
      For the moment, I've added a manual upgrade to the cron value in 'mypluginname/db/upgrade.php', but would prefer not to have to do that.

        Issue Links

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: