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

New maintenance mode countdown counts down to 0 instead of 1

    Details

    • Testing Instructions:
      Hide

      Test 1

      1. Run php admin/cli/maintenance.php --enablelater=2
      2. Check site and you should "This site will be switched to maintenance mode in 1 mins and xx secs" (on bottom right of page)
      3. Make sure timer is counting down.
      4. When 30 sec left color of msg should change.
      5. After time elapse msg should change to "The site is undergoing maintenance and is currently not available"

      Test 2

      1. Test Maintenance mode timer is displayed properly on all core themes (especially z-index)
      Show
      Test 1 Run php admin/cli/maintenance.php --enablelater=2 Check site and you should "This site will be switched to maintenance mode in 1 mins and xx secs" (on bottom right of page) Make sure timer is counting down. When 30 sec left color of msg should change. After time elapse msg should change to "The site is undergoing maintenance and is currently not available" Test 2 Test Maintenance mode timer is displayed properly on all core themes (especially z-index)
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      wip-mdl-42597
    • Story Points (Obsolete):
      13
    • Sprint:
      BACKEND Sprint 7

      Description

      If I enable the new maintenance mode countdown with
      sudo -u apache php admin/cli/maintenance.php --enablelater=2
      there is a countdown messagebox at the top of every Moodle page until the maintenance mode is enabled.

      Unfortunately, the message in this message box counts down to 0 instead of 1, so in the last minute before maintenance mode activation, there is a rather confusing message saying
      "Site is switching to maintenance mode in 0 minutes".

      I would like to propose to add 1 to the minutes in lib/outputrenderers.php, function maintenance_warning(), to solve this cosmetic issue.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/May/14