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

Backup_detail_unknown renderer hard codes notification CSS class

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Set the theme to clean.
      2. Go to restore a course.
      3. Upload a random .zip file which isn't a Moodle backup which will take you to a page that reads "Unknown backup format" as a heading then "The selected file is not a valid Moodle backup file and can't be restored."
      4. The headline should be black and the text below should be red.

      Repeat using the standard theme (if applicable - master removed this).

      Show
      Set the theme to clean. Go to restore a course. Upload a random .zip file which isn't a Moodle backup which will take you to a page that reads "Unknown backup format" as a heading then "The selected file is not a valid Moodle backup file and can't be restored." The headline should be black and the text below should be red. Repeat using the standard theme (if applicable - master removed this).
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-44468_master

      Description

      The function 'backup_detail_unknown' has two misuses of the 'notifyproblem' class.

      https://github.com/moodle/moodle/blob/master/backup/util/ui/renderer.php#L216-L231

      The first is to use the class on the page heading:

      https://github.com/moodle/moodle/blob/master/backup/util/ui/renderer.php#L225

      Presumably this is hoping to pick up on the color: red rule but since people will style the .notifyproblem class expecting it to be used in the standard way this can't be counted on and may have strange interactions with header classes etc. Since the text that follows is already styled as a error the class can probably just be removed.

      The second is to output the notification API CSS itself, rather than call the API:

      https://github.com/moodle/moodle/blob/master/backup/util/ui/renderer.php#L226

      This should be changed to call $OUTPUT-notification(blah, 'notifyproblem')

        Attachments

          Activity

            People

            • Assignee:
              bawjaws David Scotson
              Reporter:
              bawjaws David Scotson
              Peer reviewer:
              Mark Nelson
              Integrator:
              Dan Poltawski
              Tester:
              Simey Lameze
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amy Groshek, David Scotson, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

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