2.0.1+ Issues

2.0.1+ Issues

by Manish Verma -
Number of replies: 16

Hi, I have noticed couple of issues.....

A)

On upgrading the 1.9.5+ site to 2.0.1+, I noticed that the serial numbers are broken (checked on Splash theme) that were originally generated by HTML Area editor of 1.9.5+. For example:

  1.
  2.
  3.
  4.
  5.
  6.
  7.
  8.
  9.
10.
11.
12.

Looks like,

1.
2.
3.
4.
5.
6.
7.
8.
9.
0.
1.
2.

B) When I hit enter, I am getting space every time. For example:

X

Y

Z

I would like the above to be,

X
Y
Z

without editing html code manually. The, "address" option in place of, "paragraph" option in TinyMCE makes the text slanted which I do not want. How do I get this simple thing done?

Manish.

Average of ratings: -
In reply to Manish Verma

Re: 2.0.1+ Issues

by Mauno Korpelainen -

I have not checked if there have been some changes recently but the first issue is probably just a theme css issue (base theme or canvas theme???) - in my test moodle I had actually discs instead of broken numbers so list-style css of that version was even more broken.

You could try to add to your theme css files (to the bottom)

ol li{list-style-type:decimal;}

and try some small margin and padding there - it looks like your theme css might use negative margin or padding for "ol li" or plain "li"

Here in moodle.org theme code created originally by HTMLArea looks ok both in TinyMCE and in theme (pages)

  1. a
  2. b
  3. c
  4. d
  5. e
  6. f
  7. g
  8. h
  9. i
  10. j
  11. k
  12. l

The second issue is a typical TinyMCE user experience issue - if you want to get <br> tags press <Shift><Enter> - if you press plain <Enter> TinyMCE gives <p> tags by default. This can be also changed in init code of tinymce but that's a longer story - see for example http://tinymce.moxiecode.com/wiki.php/Configuration:Cleanup/Output

In reply to Mauno Korpelainen

Re: 2.0.1+ Issues

by Manish Verma -

Thanks Mauno for the <Shift><Enter> information for the resolution of second issue and for remarks regarding first issue (MDL-25888).

Manish.

In reply to Manish Verma

Odp: Re: 2.0.1+ Issues

by Anna Weber -

Hi,

It seems like the problem with list is not only in upgraded Mdle. I work with brand new 2.0.1+ (not upgraded).  When I write in Editor and use defined list the HTML code displays OK however once I save the formating it is displayed as undefined - like here. Could it be the same issue?

mci_defined_list
html_editor saved_undefined
In reply to Anna Weber

Odp: Re: 2.0.1+ Issues

by Anna Weber -

And I have just noticed that it is not an issue when using the editor for the page content. Then ordered list works OK.

In reply to Manish Verma

Re: 2.0.1+ Issues

by Mauno Korpelainen -

I found the reason and explained it in MDL-25888

Solution is not trivial because various lists can be included inside other list types and this case is caused by yui css

ol li{list-style:decimal outside;}ul li{list-style:disc outside;}

where latter list-style for ul li changes also list-style of ol li if we have ordered lists inside unordered lists - and we have in course sections...

In reply to Mauno Korpelainen

Re: 2.0.1+ Issues

by Matt Bower -

Hi. We are really hoping for a fix for this. Any ideas what can be done or when a fix is expected?

Best wishes,

Matt Bower

(Macquarie University)

In reply to Matt Bower

Re: 2.0.1+ Issues

by Mauno Korpelainen -

As long as moodle 2 themes need to use yui reset css and other yui css files you can only override yui css in custom themes with more specific css rules.

For example adding

ul ol li{list-style:decimal outside;}
ol ul li{list-style:disc outside;}

to your custom theme css files helps if you have ordered lists inside unordered lists or unordered lists inside ordered lists. But it is far from a perfect solution because it is possible to have lists inside lists inside lists...

Yui reset css (together with following yui base css) has some really stupid rules that change normal browser behaviour (supported by all browsers) for some of the most common tags like ul, ol, sub, sup, em, strong...

In reply to Mauno Korpelainen

Re: 2.0.1+ Issues

by Henry Foster -

Yes, thank you, this is really helpful. I was baffled because even adding a style directly to the ol tag using the html editor didn't fix the problem; I didn't realize that the style was being reset at the li level.

In reply to Henry Foster

Re: 2.0.1+ Issues

by Javier Fernandez -

Hi there,

I got that problem too and the unordered lists don´t look as a lists, the disc is gone. I am using the anomaly theme, so any idea where I can fix it?

Thanks in advance,

Javier

In reply to Javier Fernandez

Re: 2.0.1+ Issues

by Mauno Korpelainen -

Anomaly theme is using base theme as a parent theme so you could use any css file of base theme or any css file of anomaly theme.

There is however one css rule in anomaly theme that gives some more headache - in file theme/anomaly/style/general.css and line 32

.course-content ul {margin:0;}

sets margin of unordered lists inside course content to 0.

If you replace this line with

ul ol li{list-style:decimal outside;}
ol ul li{list-style:disc outside;}

you should see the dics in unordered lists inside course topics.

In reply to Mauno Korpelainen

Re: 2.0.1+ Issues

by Javier Fernandez -

Hi Mauno,

Thanks for your help, unfortunately it doesn´t work for me. Instead of that I´ve changed the following code in "/var/www/html/lib/yui/3.2.0/build/cssbase/base-min.css"

ul li{list-style-type:disc; list-style-position: inside; margin: 5px;}

ol li{list-style:decimal outside;}

and it almost works as you can see... The only problem is that all the elements in the lists are "disc" Any idea how to insert "circle" in the second level (Red Fish and Blue Fish)?

Thanks

Javier

In reply to Javier Fernandez

Re: 2.0.1+ Issues

by Mauno Korpelainen -

There are several issues involced already.

The first issue is cache - if the changes you made to your theme css files did not take effect then you most likely forgot to clear cache or set theme designer mode on from theme adminitration menu.

The second issue is that there can be several levels of lists inside lists and several ways to use them.

You could of course start using different css for ol ol ol li, ul ol ol li, ol ul ol li etc but it never ends.

You could as well define list style classes like

.disclist {...}

.circlelist {...}

and so on and use only those classes in your editor with tags like <ul class="circlelist"> or <li class="circlelist"> when ever you need some special list styles.

Personally I might drop all such yui css reset code (from yui) that resets normal css that all browsers can handle natively smile

In reply to Mauno Korpelainen

Re: 2.0.1+ Issues

by Javier Fernandez -

Hi there,

Just in case somebody else is having the same problem.

Edit the file /lib/yui/3.2.0/build/cssbase/base-min.css and add the following code at the end of the file;

 

ul li{list-style:disc inside;}

ul > li > ul > li{list-style:circle inside;margin: 10px}

ul > li > ul > li > ul > li{list-style:square inside;}

ol li{list-style:decimal outside;}

 

Thanks,

Javier

In reply to Javier Fernandez

Re: 2.0.1+ Issues

by viral mehta -

Thanks Javier you were very usefull thank you. I appreciate your time and effort. I am a amateur programmer and spent a lot of time thinking that some thing went wrong in my coding but thanks to you my brain could rest a bit.

Once again thank you

With Regards,
Viral Mehta

 

In reply to viral mehta

Re: 2.0.1+ Issues

by viral mehta -

Hey I pasted the code in the files mentioned by you but still in course summary whenever I am using <ul> tag I don't see a disc before the bulleted points. Can you please help me out with the tags once again?