Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function definitions and naming convention #17

Open
ak4t0sh opened this issue Oct 25, 2019 · 2 comments
Open

function definitions and naming convention #17

ak4t0sh opened this issue Oct 25, 2019 · 2 comments

Comments

@ak4t0sh
Copy link

ak4t0sh commented Oct 25, 2019

As described in https://docs.moodle.org/dev/Plugin_files#lib.php :

All the plugin's internal logic should be implemented in the auto-loaded classes or in the locallib.php file.

So your functions defined in index.php should be moved to locallib.php

Moreover to prevent namespace collision you should always use frankenstyle style for your constants and function's name (https://docs.moodle.org/dev/Coding_style#Functions_and_Methods, https://docs.moodle.org/dev/Coding_style#Constants)

@danmarsden
Copy link
Member

@boGitsIT - looks like you missed this one too? - I've commented in-line on the files in your pull request.

@danmarsden
Copy link
Member

just one remaining issue here - process_data_field - ideally like to see that function removed completely and rewritten to build the sql using normal moodle processes rather than this helper function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants