Moodle
  1. Moodle
  2. MDL-28151

High resolution images uploaded as resources are cropped

    Details

    • Testing Instructions:
      Hide

      1. Create a file resource.
      2. Upload an image whose dimensions will exceed a normal page width (I have provided a suitably large image).
      3. View the resource. Verify that you can see the whole image.
      4. Create another file resource.
      5. Upload a small image.
      6. View the resource. Verify that you can see the whole image.

      Show
      1. Create a file resource. 2. Upload an image whose dimensions will exceed a normal page width (I have provided a suitably large image). 3. View the resource. Verify that you can see the whole image. 4. Create another file resource. 5. Upload a small image. 6. View the resource. Verify that you can see the whole image.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      17769

      Description

      This is another instance of MDL-24895. Images which are larger than the page are not completely visible because the overflow-hidden property on page-content suppresses scrollbars.

      Replication instructions:
      1. Create a file resource.
      2. Upload an image whose dimensions will exceed a normal page width (I have provided a suitably large image).
      3. View the resource. The image will be cut-off.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this.

          Show
          Michael de Raadt added a comment - Thanks for reporting this.
          Hide
          Charles Fulton added a comment -

          Verified that this issue is still present 2.3 alpha (20111209).

          Show
          Charles Fulton added a comment - Verified that this issue is still present 2.3 alpha (20111209).
          Hide
          Matthew G. Switlik added a comment -

          A quick fix is to add

          .resourceimage

          {max-width: 100%;}

          to base/style/core.css

          Show
          Matthew G. Switlik added a comment - A quick fix is to add .resourceimage {max-width: 100%;} to base/style/core.css
          Hide
          Matthew G. Switlik added a comment -

          https://github.com/SWiT/moodle/tree/MDL-28151

          If I didn't package up the fix the preferred way let me know. I'm new(ish) to github.

          Show
          Matthew G. Switlik added a comment - https://github.com/SWiT/moodle/tree/MDL-28151 If I didn't package up the fix the preferred way let me know. I'm new(ish) to github.
          Hide
          Dan Poltawski added a comment -

          Hi,

          Thanks for the patch - it makes sense to me. Though I wonder was the overflow-hidden property put there to stop us making the interface unusuable?

          If you could improve the commit message to include the component and a bit more descriptive text then we would be able to integrate it. (See the current git log to see style)

          thanks

          Show
          Dan Poltawski added a comment - Hi, Thanks for the patch - it makes sense to me. Though I wonder was the overflow-hidden property put there to stop us making the interface unusuable? If you could improve the commit message to include the component and a bit more descriptive text then we would be able to integrate it. (See the current git log to see style) thanks
          Hide
          Charles Fulton added a comment -

          Dan, I've fixed up the commit in my repo but preserved the authorship. Hopefully we're good to go here.

          Show
          Charles Fulton added a comment - Dan, I've fixed up the commit in my repo but preserved the authorship. Hopefully we're good to go here.
          Hide
          Dan Poltawski added a comment -

          Thanks Charles, pushing for integration.

          If you could add testing instructions (on how to test the fix) that would be great.

          Show
          Dan Poltawski added a comment - Thanks Charles, pushing for integration. If you could add testing instructions (on how to test the fix) that would be great.
          Hide
          Martin Dougiamas added a comment -

          Correct, the overflow-hidden property was added in 2.0 to stop people destroying the interface with large images but this change for resources looks really good to me.

          +1

          Show
          Martin Dougiamas added a comment - Correct, the overflow-hidden property was added in 2.0 to stop people destroying the interface with large images but this change for resources looks really good to me. +1
          Hide
          Dan Poltawski added a comment -

          I just noticed that Matthew's email address was incorrect, so I just quickly fixed up the author commit.

          Show
          Dan Poltawski added a comment - I just noticed that Matthew's email address was incorrect, so I just quickly fixed up the author commit.
          Hide
          Sam Hemelryk added a comment -

          Thanks guys, this has been integrated now.
          Merged to master, cherry picked to 23, and cherry-picked with conflict resolution to 22 and 21.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Thanks guys, this has been integrated now. Merged to master, cherry picked to 23, and cherry-picked with conflict resolution to 22 and 21. Cheers Sam
          Hide
          Jason Fowler added a comment -

          Looks good Charles

          Show
          Jason Fowler added a comment - Looks good Charles
          Hide
          Sam Hemelryk added a comment -

          Congratulations your code is upstream - gold star for you!

          This issue + 79 others made it in in time for the minor releases.
          Thank you everyone involved for your exuberant efforts.

          Show
          Sam Hemelryk added a comment - Congratulations your code is upstream - gold star for you! This issue + 79 others made it in in time for the minor releases. Thank you everyone involved for your exuberant efforts.

            People

            • Votes:
              16 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: