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

HTML editor as course format option broken

    XMLWordPrintable

Details

    Description

      Some code that used htmleditor as an input type in a course format stopped working in 3.6 due to changes that validate the course format settings on every save.

      That new validation code seems to assume all return values are single values, and not arrays so throws an error when faced with the return from this input type.

      (It's possible this causes issues for any other types that return an array, multi-selects perhaps?)

      The error is:

      clean_param() can not accept arrays use clean_param_array() instead

      It seemed like it should be possible to override this in the format, but attempt to do so got past that error, and then when you returned to the edit page the values had disappeared, at least when following the instructions in deprecation warnings to use editor instead of htmleditor.

      Currently working around this by using the deprecated htmleditor and silencing the error.

      As I said, this might be fixable in the format, but wasn't sure if that was the intended outcome of the change to add validation

      Attachments

        Issue Links

          Activity

            People

              matthewhilton Matthew Hilton
              bawjaws David Scotson
              Matt Porritt Matt Porritt
              Ilya Tregubov Ilya Tregubov
              CiBoT CiBoT
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/May/22

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 11 minutes
                  1h 11m