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

Fake block HTML is not consistent, making it more difficult to create themes

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Accessibility, Calendar, Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      There are two issues with fake blocks:

      1) Calendar has fake blocks, but doesn't even use the print_sideblock function which is supposed to ensure consistent display.

      2) print_sideblock does not ensure consistent display. Real blocks always have <h2><div class="title"> around the heading text. print_sideblock relies on users to pass this in, however all uses (except by the 'real' blocks) do not. [This is also a minor accessibility issue, since headings should be marked as headings.]

      My solution for 2.0 is:

      1) Change calendar to use print_sideblock

      2) Change print_sideblock so that if you pass it plaintext (something without a div tag) for $heading then it automatically adds the HTML above around the $heading. However, if you pass complex HTML (as is sometimes required, for example when a genuine block displays its control icons or already has the above styling) the behaviour is unchanged.

      3) Make minor changes to some themes so the calendar styling isn't broken after this change

        Attachments

          Activity

            People

            • Assignee:
              quen Sam Marshall
              Reporter:
              quen Sam Marshall
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Bas Brands
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10