iarenaza / moodle-filter_multilang2

Moodle filter for Multi-Language Content (v2)
6 stars 17 forks source link

Moodle 4.5 Compatibility Issue #49

Open michael-milette opened 17 hours ago

michael-milette commented 17 hours ago

Hi @iarenaza ,

Multilang2 is going to need some work in order to be made compatible with Moodle 4.5+. There are changes to the API for filter type plugins.

Feel free to take a look at how I worked it out for FilterCodes. Hope it helps.

On a side note, there is one line of difference between the pre-4.5 version (master branch) and the 4.5+ version (MOODLE_405_STABLE branch) of FilterCodes which is preventing me from continuing with a unified version that is compatible with all versions of Moodle. I am very interested to see if you can figure out a way to do it.

Best regards,

Michael Milette

rezeau commented 6 hours ago

Same issue on my localhost testing moodle 4.5. In DEBUG I am getting this error: PHP Notice: Inclusion of filters from 'filter/multilang2/filter.php' using the 'filter_multilang2' class naming has been deprecated. Please rename your class to \filter_multilang2\text_filter and move it to 'filter/multilang2/classes/text_filter.php'. See MDL-82427 for more information.

iarenaza commented 5 hours ago

Thanks for the heads up. I'll have a look at the changes proposed at https://tracker.moodle.org/browse/MDL-82427 MDL-81125 and see what I can do.

Notice in any case that we don't mention 4.5 compatibility in the Moodle plugins database (yet :smile: ).

michael-milette commented 3 hours ago

I know it wasn't listed. Really, this was just a heads up. I noticed Justin Hunt has updated his Video Easy Filter plugin which he seems to have a working unified version. I am going to check out how he managed to do it.

iarenaza commented 1 hour ago

This commit seem to be where the magic happens: https://github.com/justinhunt/moodle-filter_videoeasy/commit/0b7e0ec6af79a8bd01b442c77b9b4fdb15d59530

This other one might be required for PHP 8.2 support (I think we don´t need this one in multilang2, as we use a different approach): https://github.com/justinhunt/moodle-filter_videoeasy/commit/9f349c091393301390a4048d131360e6afabb0e5