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

Use admin warning renderer for all admin warnings

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Look at the moodle/admin/ notifications page on non-stable branch to see the maturity info output.

      Look at the update prompt page you get if you update your Moodle code to a newer version (again I think it'll need to be non-stable release to get the prompt) to see the maturity_warning output.

      Not sure how to activitate the test_site_warning, it seems to be something to do with Behat, but when it shows it should be on the same page as above. (I've been testing it by changing the code to 'true' so that it always thinks it's a test site)

      Do that on Clean, Standard and a Canvas-based theme.

      There will be slight changes in appearance as before there was no real consistency within or between themes, but nothing shocking.

      Show
      Look at the moodle/admin/ notifications page on non-stable branch to see the maturity info output. Look at the update prompt page you get if you update your Moodle code to a newer version (again I think it'll need to be non-stable release to get the prompt) to see the maturity_warning output. Not sure how to activitate the test_site_warning, it seems to be something to do with Behat, but when it shows it should be on the same page as above. (I've been testing it by changing the code to 'true' so that it always thinks it's a test site) Do that on Clean, Standard and a Canvas-based theme. There will be slight changes in appearance as before there was no real consistency within or between themes, but nothing shocking.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-44139-master

      Description

      In the file admin/renderer.php there's a whole lot of warnings that are outputted in various circumstances.

      The majority call the function warning() with the error text, and an (optional) class of 'warning' (the default) or 'error' to indicate severity.

      The renderer then outputs the warning as a div.box.generalbox.adminwarning or div.box.generalbox.adminerror.

      There's three functions that just write this same HTML out directly, and so can't be altered by the renderer. These are maturity_warning, maturity_info and test_site_warning.

        Attachments

        1. Screenshot after.png
          179 kB
          Jason Fowler
        2. Screenshot before.png
          183 kB
          Jason Fowler

          Activity

            People

            Assignee:
            bawjaws David Scotson
            Reporter:
            bawjaws David Scotson
            Peer reviewer:
            Dan Poltawski
            Integrator:
            Damyon Wiese
            Tester:
            Jason Fowler
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amy Groshek, David Scotson, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Bas Brands
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

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