invalid use of Moodle DB API functions
danmarsden opened this issue · 1 comments
danmarsden commented
As previously mentioned in issue #4 your use of the DB api does not follow Moodle guidelines.
In particular your plagiarism_pchkorg_config_model class which puts $DB into $this->DB
At the very least you should be using Global $DB and just use the global $DB from within your functions in plagiarism_pchkorg_config_model but you are also abstracting simple db api calls instead of calling them directly (eg fetch_by_module) - there's no point in the fetch_by_module funciton - you should just make this api call directly in your is_enabled_for_module function.
JaneAdelmann commented
Issue has been fixed. We do not use abstration for $DB
anymore. Thank you for report.