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

External Tool LTI View shouldn't change pagelayout properties

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 2.6.2
    • LTI External tool
    • MOODLE_26_STABLE

      /mod/lti/view.php contains markup that overrides settings of the current pagelayout and theme which cause the page to display incorrectly depending on the display type that the user selects.

      https://github.com/moodle/moodle/blob/master/mod/lti/view.php#L132-L165

      Specifically:

      • setting body overflow:hidden
      • adding padding to the object bottom

      steps to reproduce:

      1. create an external tool instance with "embed (no blocks)" or "embed (with blocks)" set as the display type
      2. save and display

      results: depending on the viewport height and the height of the header/breadcrumb of the current theme, the object frame is cut off on the bottom of the viewport (because the object is hard-coded to 600px high). In addition the blocks on the page are hidden due to the overflow value.

      Solution:

      There are multiple things that need to be addressed here:

      • the code hides the body:overflow via javascript if it's not a pop-up, neglecting blocks
        • I believe that this overflow:hidden can be entirely removed and the pagelayout itself should handle how the page is output - just because there's no footer (site footer) doesn't mean there's nothing below (like overflowed object container)
        • If it can't be removed then the CSS should be move from javascript into styles.css making it easier for a theme to adjust
      • The code adds padding below the object via JS because "the bottom of the object wasn't visible in some themes"
        • The real issue is the body overflow:hidden, not padding/borders, etc... this again can be removed
        • Again if this can't be removed it should be moved to styles.css
      • The size of the object's height is calculated ever 1/4 second by a javascript function
        • This should be done by placing the object in a relative position in a container div so that the object height can be set to 100% and the container can control the height relative to the viewport or page height

        1. frametop.png
          frametop.png
          127 kB
        2. incourse.png
          incourse.png
          165 kB

            Unassigned Unassigned
            dwahl Daniel Wahl (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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