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

Add ability to add small and large logos into core

XMLWordPrintable

    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-55445-master-2nd
    • Hide

      Test image resizing

      1. Download the attached test file, and both sample images.
      2. Drop them at the root of your site
      3. Access the test file and, for each image and mode, confirm that:
        • The thumbnail is always a square
        • The resizing kept the aspect ratio according to the preference

      Test logo

      All the assertions below MUST occur on the front page (Site home) AND any other page.
      All the assertions below MUST be done on both clean and more.

      1. Make sure debugging is fully enabled.
      2. Upload a logo and small logo to theme_clean and theme_more
        • They should appear instantly in their respective theme
      3. Now head to Site administration > Branding and upload a logo and compact logo
      4. In both clean and more confirm that this has had no effect, their logo still appear
      5. Delete the small logo in both
        • Confirm that the compact branding logo is now visible (it should not appear on the front page though)
      6. Delete the logo in both themes
        • Confirm that the branding logo is now visible on the front page
      7. Delete both branding logos
        • Confirm that no logos are displayed

      Repeat all those steps above with all debugging disabled!

      Test branding logos

      1. Head to Site administration > Appearance > Logos and upload a logo and compact logo
      2. Add the following to your themes' layout file
        • columns1.php for instance, and see the result on the login page.

          <img src="<?php echo $OUTPUT->get_logo_url()->out(false); ?>" />
          <img src="<?php echo $OUTPUT->get_compact_logo_url()->out(false); ?>" />
          

      3. Confirm that both logos are displayed.

      Test send_file cachability

      1. Make sure that:
        • debugging is fully disabled
        • a branding logo is set
        • there aren't any clean/more logos
      2. Go to the front page (site home) and open your web inspector to the network tab
      3. Purge all caches (use mdk purge or php admin/cli/purge_caches.php)
      4. Refresh the page
      5. Confirm that logo request responded with the header Cache-Control: Public [...]
      6. Repeat on the dashboard (for the compact logo)
      Show
      Test image resizing Download the attached test file, and both sample images. Drop them at the root of your site Access the test file and, for each image and mode, confirm that: The thumbnail is always a square The resizing kept the aspect ratio according to the preference Test logo All the assertions below MUST occur on the front page (Site home) AND any other page. All the assertions below MUST be done on both clean and more . Make sure debugging is fully enabled. Upload a logo and small logo to theme_clean and theme_more They should appear instantly in their respective theme Now head to Site administration > Branding and upload a logo and compact logo In both clean and more confirm that this has had no effect, their logo still appear Delete the small logo in both Confirm that the compact branding logo is now visible (it should not appear on the front page though) Delete the logo in both themes Confirm that the branding logo is now visible on the front page Delete both branding logos Confirm that no logos are displayed Repeat all those steps above with all debugging disabled! Test branding logos Head to Site administration > Appearance > Logos and upload a logo and compact logo Add the following to your themes' layout file columns1.php for instance, and see the result on the login page. < img src="<?php echo $OUTPUT->get_logo_url()->out(false); ?>" /> < img src="<?php echo $OUTPUT->get_compact_logo_url()->out(false); ?>" /> Confirm that both logos are displayed. Test send_file cachability Make sure that: debugging is fully disabled a branding logo is set there aren't any clean/more logos Go to the front page (site home) and open your web inspector to the network tab Purge all caches (use mdk purge or php admin/cli/purge_caches.php) Refresh the page Confirm that logo request responded with the header Cache-Control: Public [...] Repeat on the dashboard (for the compact logo)

      The logo and other branding assets should not be added to specific themes, they should be added in core so that themes can use them at will.

        1. test_images.php
          2 kB
        2. sample.jpg
          sample.jpg
          64 kB
        3. sample.png
          sample.png
          821 kB

            fred Frédéric Massart
            fred Frédéric Massart
            Dan Poltawski Dan Poltawski
            Andrew Lyons Andrew Lyons
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.