Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      39284

      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;">

        Activity

        Hide
        Petr Škoda added a comment -

        Hmm, this looks like a problem in themes. Thanks for the report.

        Show
        Petr Škoda added a comment - Hmm, this looks like a problem in themes. Thanks for the report.
        Hide
        Michael de Raadt added a comment - - edited

        Hi, Alex.

        The site policy can appear as a link when users create an account and when a user is manually enrolled and logs in for the first time. Where are you expecting to see this?

        The Superfresh theme is not a standard Moodle theme and I couldn't find it in the plugins repository, so I assume it's a custom theme. You might need to contact New School Learning about that.

        Show
        Michael de Raadt added a comment - - edited Hi, Alex. The site policy can appear as a link when users create an account and when a user is manually enrolled and logs in for the first time. Where are you expecting to see this? The Superfresh theme is not a standard Moodle theme and I couldn't find it in the plugins repository, so I assume it's a custom theme. You might need to contact New School Learning about that.
        Hide
        Alex Saavedra added a comment -

        Hi Michael,

        The site policy is effectively expected to be displayed at first log in time, not as a link, but as an object/iframe element.

        I have contacted New School Learning about this bug for them to fix it, but will probably stop using Superfresh theme since we didn't hear back from them. This bug doesn't show up with Moodle standard themes.

        Thank you.

        Alex Saavedra

        Show
        Alex Saavedra added a comment - Hi Michael, The site policy is effectively expected to be displayed at first log in time, not as a link, but as an object/iframe element. I have contacted New School Learning about this bug for them to fix it, but will probably stop using Superfresh theme since we didn't hear back from them. This bug doesn't show up with Moodle standard themes. Thank you. Alex Saavedra
        Hide
        Michael de Raadt added a comment -

        Thanks for getting back to me, Alex.

        Show
        Michael de Raadt added a comment - Thanks for getting back to me, Alex.
        Hide
        Alex Saavedra added a comment -

        Hi Michael,

        New School Learning fixed this issue with Superfresh theme, and now works as expected with Moodle 2.2.

        Alex Saavedra

        Show
        Alex Saavedra added a comment - Hi Michael, New School Learning fixed this issue with Superfresh theme, and now works as expected with Moodle 2.2. Alex Saavedra

          People

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

            Dates

            • Created:
              Updated:
              Resolved: