Moodle
  1. Moodle
  2. MDL-25671

Disabling editor for database activity template results in template being saved and html tags stripped

    Details

      Description

      Steps to recreate:

      1. Access a database activity e.g. http://qa.moodle.net/mod/data/view.php?id=18
      2. Click on the template tab
      3. Click the disable editor button.

      As well as the editor being disabled, the template is also saved, and any html table tags are stripped. This is terrible for list views which use a table!

      Furthermore, if the editor is disabled and then the template is edited and then saved, the editor becomes automatically enabled again and any html table tags are again stripped.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            David Mudrak added a comment -

            My suggestion is to force plain textarea instead of HTML editor when editing Database templates, always. Let us provide standard templates by default. Those who want to modify the HTML output must know HTML basics. Note that using any HTML editor is a pain when you try to use a table based template, for example (because the syntax validator in the editor closes the tags automatically which is what you do not want).
            Worse than that, even if you disable HTML editor in your profile and tune the template, you colleague may come and ruin it again with their editor being turned on.

            Show
            David Mudrak added a comment - My suggestion is to force plain textarea instead of HTML editor when editing Database templates, always. Let us provide standard templates by default. Those who want to modify the HTML output must know HTML basics. Note that using any HTML editor is a pain when you try to use a table based template, for example (because the syntax validator in the editor closes the tags automatically which is what you do not want). Worse than that, even if you disable HTML editor in your profile and tune the template, you colleague may come and ruin it again with their editor being turned on.
            Hide
            Dongsheng Cai added a comment -

            Helen

            will another button (say 'disable editor without saving') help? we need database change to make moodle remember turn tinymce off, not sure if this is solution in stable branch.

            Show
            Dongsheng Cai added a comment - Helen will another button (say 'disable editor without saving') help? we need database change to make moodle remember turn tinymce off, not sure if this is solution in stable branch.
            Hide
            Helen Foster added a comment -

            Dongsheng, is it possible for it to be the same as it was in 1.9 i.e. you can disable/enable the html editor without the template being saved?

            Show
            Helen Foster added a comment - Dongsheng, is it possible for it to be the same as it was in 1.9 i.e. you can disable/enable the html editor without the template being saved?
            Hide
            Dongsheng Cai added a comment -

            Helen

            I changed the list template editor to not saving changes when click disable editor button. Please see PULL-52

            Show
            Dongsheng Cai added a comment - Helen I changed the list template editor to not saving changes when click disable editor button. Please see PULL-52
            Hide
            Dongsheng Cai added a comment -

            I created MDL-25784, which could completely solve the problem, but it involves database change, so I have to put it in dev backlog.

            Show
            Dongsheng Cai added a comment - I created MDL-25784 , which could completely solve the problem, but it involves database change, so I have to put it in dev backlog.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            ping! Note this continue being marked as blocker and reopened, so isn't any more in the stable backlog but needs to be fixed/resolved/closed... ciao

            Show
            Eloy Lafuente (stronk7) added a comment - ping! Note this continue being marked as blocker and reopened, so isn't any more in the stable backlog but needs to be fixed/resolved/closed... ciao
            Hide
            Helen Foster added a comment -

            Removing STABLE Sprint 2 as fix version and re-adding STABLE backlog for the issue to once again be included in a forthcoming sprint.

            Show
            Helen Foster added a comment - Removing STABLE Sprint 2 as fix version and re-adding STABLE backlog for the issue to once again be included in a forthcoming sprint.
            Hide
            Dongsheng Cai added a comment -

            Pull request submitted.

            Show
            Dongsheng Cai added a comment - Pull request submitted.
            Hide
            Helen Foster added a comment -

            Thanks Dongsheng for fixing this issue.

            Show
            Helen Foster added a comment - Thanks Dongsheng for fixing this issue.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: