wafaahamdy / moodle-tool_resetpasswords

A Moodle Plugin for bulk reset password
Other
0 stars 1 forks source link

Namespace collisions #3

Closed roland04 closed 8 months ago

roland04 commented 8 months ago

In lib.php:31 Please see: https://moodledev.io/general/development/policies/codingstyle/frankenstyle#function-names

Also taking lib.php recommendations into account (https://moodledev.io/docs/apis/commonfiles#libphp) another option could be to move reset_password_sendmail to a different class.

Note this is a blocker for plugins db approval

danmarsden commented 8 months ago

also this class is named incorrectly as well: https://github.com/wafaahamdy/Moodle-Bulkresetpassword/blob/main/form.php#L33

ideally you'd put it into the classes folder in your code and put it in the plugin namespace.

wafaahamdy commented 8 months ago

Thanks for your valuable feedback

I created a new class to handle password reset and email process. I put this class under class folder https://github.com/wafaahamdy/moodle-tool_resetpasswords/blob/approval_issues/classes/rest_sendmail.php

I created new class for for under class/form folder https://github.com/wafaahamdy/moodle-tool_resetpasswords/blob/approval_issues/classes/form/uploadlistform.php