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

Topic section with default name at site level creates empty h2 tag

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1 regressions, 3.1.1, 3.2
    • Fix Version/s: 3.1.4
    • Component/s: Course, Themes
    • Labels:
    • Testing Instructions:
      Hide
      1. Logged in as Admin, ensure that Frontpage Settings has Site topic enabled
      2. With editing ON go to Frontpage and select the Edit icon at the top of the page that allows you to add content into the Site Topic area. Add some content but leave the "Use Default name" Text box empty and make sure the Checkbox is CHECKED
      3. SAVE settings and view the frontpage.
      4. Using your browser's Web Developer tool (eg: FireBug) check the page source and verify that there is no empty<h2> </h2> tag in the <div "class="box generalbox sitetopic"> section above the contents you added.
      Show
      Logged in as Admin, ensure that Frontpage Settings has Site topic enabled With editing ON go to Frontpage and select the Edit icon at the top of the page that allows you to add content into the Site Topic area. Add some content but leave the "Use Default name" Text box empty and make sure the Checkbox is CHECKED SAVE settings and view the frontpage. Using your browser's Web Developer tool (eg: FireBug) check the page source and verify that there is no empty<h2> </h2> tag in the <div "class="box generalbox sitetopic"> section above the contents you added.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-55362_master

      Description

      When a topic section is added to the site front page with the option "Use default section name" checked, no section name is displayed, but an empty h2 tag is still created. This can lead to a small cosmetic problem, e.g. if the topic section contains an image, the top of the image is not aligned with the top of the surrounding blocks (with theme "clean", see image below). To solve this, a negative margin must be added to the style of the next element (also, creating an empty h2 tag doesn't seem correct).

      Steps to reproduce :

      • under "Front page settings/Edit settings", verify that option "Include a topic section" is checked
      • add some content to the topic section on the front page (turn editing on and click the cog up the top left), leaving the option "Use default section name" checked
      • verify that there is an empty h2 tag inside <div "class="box generalbox sitetopic">

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jan/17