ncstate-delta / moodle-mod_zoom

Moodle plugin for Zoom meeting
https://moodle.org/plugins/mod_zoom
61 stars 106 forks source link

Cleanup: lib.php and locallib.php #570

Open jrchamp opened 5 months ago

jrchamp commented 5 months ago

In 812974f, I removed some long-forgotten todo tags, so it might be good to review the code in light of the updated developer guide.

Unimplemented functions

https://github.com/ncstate-delta/moodle-mod_zoom/blob/812974f4b6f8538eea6693e7219a272459ce0844/lib.php#L439-L493 https://github.com/ncstate-delta/moodle-mod_zoom/blob/812974f4b6f8538eea6693e7219a272459ce0844/lib.php#L892-L979

Misplaced functions

These functions should probably have been in locallib.php to begin with, but Moodle's current recommendation is to move supporting functions that do not need to be in lib.php to an autoloaded class in the plugin's classes directory.

https://github.com/ncstate-delta/moodle-mod_zoom/blob/812974f4b6f8538eea6693e7219a272459ce0844/lib.php#L215-L351 https://github.com/ncstate-delta/moodle-mod_zoom/blob/812974f4b6f8538eea6693e7219a272459ce0844/lib.php#L553-L624 https://github.com/ncstate-delta/moodle-mod_zoom/blob/812974f4b6f8538eea6693e7219a272459ce0844/lib.php#L992-L1272

jrchamp commented 5 months ago

Please note that mod_zoom_update_tracking_fields() is set as a callback in the module settings, so this may need to stay in lib.php if set_updatedcallback() does not allow for namespaced class methods.