moodle-cs icon indicating copy to clipboard operation
moodle-cs copied to clipboard

Detect that classes which extend moodleform* call parent:: in overridden functions

Open jrchamp opened this issue 5 months ago • 0 comments

We ran into a few issues when parent:: wasn't being called for an overridden function, so I was inspired by #106. I thought maybe this would go into #92, but it should probably be applied to core code also. Here's a quick list of examples that would be good to include sooner rather than later. I hope this helps! ❤️

Call parent::

  • moodleform
    • set_data
    • validation
  • moodleform_mod
    • data_postprocessing
    • data_preprocessing
    • definition_after_data
    • standard_grading_coursemodule_elements
    • (and all from moodleform)

Method override should not exist

  • moodleform_mod
    • get_data

jrchamp avatar Aug 30 '24 19:08 jrchamp