Moodle
  1. Moodle
  2. MDL-27692

bullets not numbers in ordered list in topic section in course page view

    Details

    • Testing Instructions:
      Hide

      1. With editing on, go to any course page and edit the topic section at the top of that page.
      2. Make a list of words eg:
      paper
      scissors
      rock
      3. Highlight your list and select 'ordered list' (numerical list) icon in the text editor menu.
      This should produce a list similar to the attached image.
      4. Save your work and then view the text you have just written.
      You should see a numbered list.
      5. Repeat steps 1 thru 4, but create a Label this time and add your list inside the Label. It can be a nested list or a simple list, it matters not as the result should still be the same as 4. above.

      Show
      1. With editing on, go to any course page and edit the topic section at the top of that page. 2. Make a list of words eg: paper scissors rock 3. Highlight your list and select 'ordered list' (numerical list) icon in the text editor menu. This should produce a list similar to the attached image. 4. Save your work and then view the text you have just written. You should see a numbered list. 5. Repeat steps 1 thru 4, but create a Label this time and add your list inside the Label. It can be a nested list or a simple list, it matters not as the result should still be the same as 4. above.
    • Workaround:
      Hide

      Add the following to core.css in base theme...

      ul li,
      .course-content ul.weeks .content .summary ul li,
      .course-content ul.topics .content .summary ul li

      {list-style: disc outside none }

      ol li,
      .course-content ul.weeks .content .summary ol li,
      .course-content ul.topics .content .summary ol li

      {list-style: decimal outside none }

      which will ensure numbered list are rendered correctly.

      Show
      Add the following to core.css in base theme... ul li, .course-content ul.weeks .content .summary ul li, .course-content ul.topics .content .summary ul li {list-style: disc outside none } ol li, .course-content ul.weeks .content .summary ol li, .course-content ul.topics .content .summary ol li {list-style: decimal outside none } which will ensure numbered list are rendered correctly.
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-27692_master
    • Rank:
      17368

      Description

      1.) Selecting 'ordered list' (numerical) from the icon in HTML Editor, in the topic section of a course page, only produces bullet points and not numbers as one would expect.

      The attached image, related to this issue, shows 'HTML Editor' view when editing. Whilst the display in the editor is correct, the outcome, for an ORDERED LIST after saving is not rendered as it should be: 1.) A numbered list

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this, Mary.

          I'll ask Sam H to comment.

          Michael;

          Show
          Michael de Raadt added a comment - Thanks for reporting this, Mary. I'll ask Sam H to comment. Michael;
          Hide
          Sam Hemelryk added a comment -

          Looks like you're on top of this Mary, yell out if there's anything I can help with.
          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Looks like you're on top of this Mary, yell out if there's anything I can help with. Cheers Sam
          Hide
          Mary Evans added a comment -

          Thanks Sam

          Show
          Mary Evans added a comment - Thanks Sam
          Hide
          John Stabinger added a comment -

          Does this look like the same issue?

          http://tracker.moodle.org/browse/MDL-27271

          Might be able to kill two birds with one stone...

          Show
          John Stabinger added a comment - Does this look like the same issue? http://tracker.moodle.org/browse/MDL-27271 Might be able to kill two birds with one stone...
          Hide
          Mary Evans added a comment - - edited

          Hi John,
          Part of that problem has been addressed. However, where the UL works in whatever situation it is in the OL does not. On inspecting the CSS in Firebug I notice that the YUI CSS rule for OL is being overridden by UL which I thought odd, so I have just been testing it.

          I found that if the order is different in the CSS
          Example:
          <code>
          ol li

          { list-style: decimal outside none;}

          ul li

          { list-style: disc outside none;}

          </code>

          OL is overridden in Base theme if this rule is set this way, however, if written the other way round...
          Example:
          <code>
          ul li

          { list-style: disc outside none;}

          ol li

          { list-style: decimal outside none;}

          </code>

          the OL rule works.

          I'm left wondering if this is a case of too many CSS rules at play, as there are lots of UL & OL peppered throughout Moodle style-sheets, or literally a CSS order thing similar to a:link, a:visited, a:hover, a:active, a:focus which MUST be in a specific order to work correctly.

          If this is the case, then the YUI CSS rules for UL & OL have been written the wrong way round in YUI3 CSS. What a lot of messing about for such a small tag!!!

          For this particular fix I'm going to stick with the original CSS rules as written in the MDL Workaround, but also add two more rules to incorporate weekly as well as topic.

          .course-content ul.weeks .content .summary ul li

          {list-style: disc outside none }

          .course-content ul.weeks .content .summary ol li

          {list-style: decimal outside none }

          Cheers
          Mary

          Show
          Mary Evans added a comment - - edited Hi John, Part of that problem has been addressed. However, where the UL works in whatever situation it is in the OL does not. On inspecting the CSS in Firebug I notice that the YUI CSS rule for OL is being overridden by UL which I thought odd, so I have just been testing it. I found that if the order is different in the CSS Example: <code> ol li { list-style: decimal outside none;} ul li { list-style: disc outside none;} </code> OL is overridden in Base theme if this rule is set this way, however, if written the other way round... Example: <code> ul li { list-style: disc outside none;} ol li { list-style: decimal outside none;} </code> the OL rule works. I'm left wondering if this is a case of too many CSS rules at play, as there are lots of UL & OL peppered throughout Moodle style-sheets, or literally a CSS order thing similar to a:link, a:visited, a:hover, a:active, a:focus which MUST be in a specific order to work correctly. If this is the case, then the YUI CSS rules for UL & OL have been written the wrong way round in YUI3 CSS. What a lot of messing about for such a small tag!!! For this particular fix I'm going to stick with the original CSS rules as written in the MDL Workaround, but also add two more rules to incorporate weekly as well as topic. .course-content ul.weeks .content .summary ul li {list-style: disc outside none } .course-content ul.weeks .content .summary ol li {list-style: decimal outside none } Cheers Mary
          Hide
          Mary Evans added a comment -

          Ok...I have been testing this idea again and proved that the order is important in this situation.
          If you add this order set to core.css in base theme in Moodle 2.0.3 (Build 20110525)

          ol li

          {list-style: decimal outside none}


          ul li

          {list-style: disc outside none }

          UL will over-ride OL in course page weekly or topic summary including the lable.

          If you have it set like this...with UL on top...

          ul li

          {list-style: disc outside none}

          ol li

          {list-style: decimal outside none}

          OL works OK.

          Strange but true.

          Mary

          Show
          Mary Evans added a comment - Ok...I have been testing this idea again and proved that the order is important in this situation. If you add this order set to core.css in base theme in Moodle 2.0.3 (Build 20110525) ol li {list-style: decimal outside none} ul li {list-style: disc outside none } UL will over-ride OL in course page weekly or topic summary including the lable. If you have it set like this...with UL on top... ul li {list-style: disc outside none} ol li {list-style: decimal outside none} OL works OK. Strange but true. Mary
          Hide
          Mary Evans added a comment -

          A Before and after view while testing this.

          In either case the Unordered List works without specific CSS.rules

          Show
          Mary Evans added a comment - A Before and after view while testing this. In either case the Unordered List works without specific CSS.rules
          Hide
          Sam Hemelryk added a comment -

          Thanks Mary this has been integrated now.

          Show
          Sam Hemelryk added a comment - Thanks Mary this has been integrated now.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Tested on sections and labels, works ok. So passing.

          But I've detected course->intros are hiding the numbers (and the the bullets). Do we really need to define them everywhere?

          Feel free to ignite new issue about that or whatever, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Tested on sections and labels, works ok. So passing. But I've detected course->intros are hiding the numbers (and the the bullets). Do we really need to define them everywhere? Feel free to ignite new issue about that or whatever, thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This is now upstream, yay! Many thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - This is now upstream, yay! Many thanks!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: