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

When $CFG->disableupdatenotifications is set, various options never set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 2.7.8, 2.8.6
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide
      1. Install a new instance BUT make sure that $CFG->disableupdatenotifications is set to true in your config file prior to installing
      2. Turn full debugging on
      3. Go to the 'Notifications' page and confirm that you do not see any notices
      4. Remove $CFG->disableupdatenotifications from your config file and go to the 'Notifications' page
      5. Confirm that you do not see any notice, and that you can check and view the results of the available updates.
        • You will first be presented the screen to define new settings
      Show
      Install a new instance BUT make sure that $CFG->disableupdatenotifications is set to true in your config file prior to installing Turn full debugging on Go to the 'Notifications' page and confirm that you do not see any notices Remove $CFG->disableupdatenotifications from your config file and go to the 'Notifications' page Confirm that you do not see any notice, and that you can check and view the results of the available updates. You will first be presented the screen to define new settings
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-49911-master

      Description

      Reported by Mary on QA site:

       Notice: Undefined property: stdClass::$updateminmaturity in /var/www/vhosts/qa.moodle.net/html/admin/index.php on line 563 Notice: Undefined property: stdClass::$updatenotifybuilds in /var/www/vhosts/qa.moodle.net/html/admin/index.php on line 563
      

      The problem is, the admin tree code is doing:

      if (empty($CFG->disableupdatenotifications)) {
          $temp = new admin_settingpage('updatenotifications', new lang_string('updatenotifications', 'core_admin'));
          $temp->add(new admin_setting_configcheckbox('updateautocheck', new lang_string('updateautocheck', 'core_admin'),
                                                      new lang_string('updateautocheck_desc', 'core_admin'), 1));
          if (empty($CFG->disableupdateautodeploy)) {
      

      etc.

      That is the wrong approach because it causes some settings never to be set.

      This would be resolved by MDL-49363.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15