Moodle

if html is manually inserted into topic/week summary and the tags are not closed, there is no way to go back and edit the summary

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.9.2
  • Fix Version/s: None
  • Component/s: Course
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

We've discovered that when using the HTML editor to update a label or a topic/week summary, if the HTML is manually input and the tags are not closed, then there is no ability (once saved) to go back in and edit the broken tag.

This was caused by an incomplete image tag copied and pasted by the instructor into the HTML editor (toggled in HTML mode) - <img src="http://example.edu/~teacher/images/blackcat.gif /> - note that the " is missing at the end of blackcat.gif - this caused the editor to break.

Activity

Hide
Mauno Korpelainen added a comment -

Old htmlarea can not handle all possible invalid tags that people can paste and save...

Although the edit icon does not work you have still a couple of ways to edit the label or summary. For example check some working label or summary from the same course and you should find an address like http://yourmoodle/course/editsection.php?id=xx where you can try to change the value xx and after some trials you should guess/find the correct value. Or you can use phpmyadmin and find for example from table mdl_course_sections the correct field and edit it directly with phpmyadmin. Read for example http://moodle.org/mod/forum/discuss.php?d=90459

One way to avoid this kind of situations is to use image plugin (icon in toolbar)... it usually does not mess up code.

Show
Mauno Korpelainen added a comment - Old htmlarea can not handle all possible invalid tags that people can paste and save... Although the edit icon does not work you have still a couple of ways to edit the label or summary. For example check some working label or summary from the same course and you should find an address like http://yourmoodle/course/editsection.php?id=xx where you can try to change the value xx and after some trials you should guess/find the correct value. Or you can use phpmyadmin and find for example from table mdl_course_sections the correct field and edit it directly with phpmyadmin. Read for example http://moodle.org/mod/forum/discuss.php?d=90459 One way to avoid this kind of situations is to use image plugin (icon in toolbar)... it usually does not mess up code.
Hide
Mathieu Petit-Clair added a comment - - edited

This bug also happens when the editor is turned off, re-assigning to course module - better output cleanup should be done there, afaics.

Actually using the html editor should prevent this kind of problem ... and in this case, when previewing the result, you would see a broken image, which warns you that something is wrong.

Show
Mathieu Petit-Clair added a comment - - edited This bug also happens when the editor is turned off, re-assigning to course module - better output cleanup should be done there, afaics. Actually using the html editor should prevent this kind of problem ... and in this case, when previewing the result, you would see a broken image, which warns you that something is wrong.
Hide
Mathieu Petit-Clair added a comment -

I just re-tested this and in 1.9, if all that's missing is a double quote, htmlarea will add it automatically when going back to the "non-manual" mode.

Show
Mathieu Petit-Clair added a comment - I just re-tested this and in 1.9, if all that's missing is a double quote, htmlarea will add it automatically when going back to the "non-manual" mode.
Hide
Mauno Korpelainen added a comment -

About once a week somebody asks similar questions like Tom about missing/non functional edit icon in forums - either because of some unclosed tag or changed behaviour of javascript event handler (onmouseover...)

Tinymce in moodle 2.0 can handle missing tags better than htmlarea - in some cases pressing <> in htmlarea can repair broken tags, in some cases htmlarea can mess up whole code...

Maybe icons could be before the editable content so that if code is broken people could still see and use the edit icon...

Show
Mauno Korpelainen added a comment - About once a week somebody asks similar questions like Tom about missing/non functional edit icon in forums - either because of some unclosed tag or changed behaviour of javascript event handler (onmouseover...) Tinymce in moodle 2.0 can handle missing tags better than htmlarea - in some cases pressing <> in htmlarea can repair broken tags, in some cases htmlarea can mess up whole code... Maybe icons could be before the editable content so that if code is broken people could still see and use the edit icon...
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Dates

  • Created:
    Updated:
    Resolved: