Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      When a site policy is in place, and points to local URL, although with fully qualified syntax http://mymoodle.example.com/policy.html, it is displayed for a very short time, then it fades out.

      The culprit seems to be function resourcelib_embed_general (lib/resourcelib.php), but only with some themes. Towards the end of the function a YUI injection is not calculating height appropriately. As a result, although <object> element has proper height=600 and width=800, it is being overriden by additional style="height: 0px;".

      A quick and dirt fix was to comment the following line:
      // $PAGE->requires->js_init_call('M.util.init_maximised_embed', array('resourceobject'), true);

      This way, no "style" element is being added to <object> element, and the site policy now appears as expected.

      Steps to reproduce:
      1. Create a site policy file: http://mymoodle.example.com/policy.htm
      2. Enable site policy.
      3. Change theme to superfresh (from http://newschoollearning.com).

      When newly created user tries to login, the site policy is displayed for a short time, then disappears. Close examination shows the following <object> configuration:
      <object id="resourceobject" data="http://mymoodle.example.com/policy.htm" type="text/html" width="800" height="600" style="height: 0px; width: 838px;">

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: