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

Table of contents in wiki module not displayed correctly with HTML editor + Links not working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1.1, 2.4
    • Fix Version/s: 2.4, STABLE backlog
    • Component/s: Wiki (2.x)
    • Labels:
    • Environment:
      IIS 7.5; IE (8) & FF
    • Database:
      MySQL
    • Testing Instructions:
      Hide
      1. Logged as an admin / teacher go to a course where you can add activities
      2. Create a wiki activity with the default values
      3. Add a new page using HTML format including an H1 tag, an H2 tag and an H3 tag with different contents and save changes
      4. You will be redirected to the view page of the created page, the Table of contents SHOULD display all the H(1|2|3) tags

      Note that if you add a H4 tag it will not be displayed in the table of contents, it only displays up to H3

      Show
      Logged as an admin / teacher go to a course where you can add activities Create a wiki activity with the default values Add a new page using HTML format including an H1 tag, an H2 tag and an H3 tag with different contents and save changes You will be redirected to the view page of the created page, the Table of contents SHOULD display all the H(1|2|3) tags Note that if you add a H4 tag it will not be displayed in the table of contents, it only displays up to H3
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-28616-master

      Description

      When using headings (h1, h2,...), the "table of contents" just shows the "h1-headings"... h2, h3,.. are ignored! This only appears using html-editor, with "creole" or "nwiki" format this is working fine. Also, the content table creates links to its headings, but these links are not working (neither with creole/nwiki nor html).

      Reproduction:
      (1) Add a wiki activity
      (2) Add a new page using html-format
      (3) Write some text using heading 1 and 2
      (4) Save

      Also see the screenshot enclosed.

      "Not jumping to headings" can also be reproduced by following the steps above. This time, just write some stuff between the headings, in order to get a scrollbar.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  3 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12