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

HTML editor as course format option broken

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_36_STABLE

      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

              • Assignee:
                Unassigned
                Reporter:
                bawjaws David Scotson
                Participants:
                Component watchers:
                Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: