ecampbell / moodle-atto_wordimport

Import Word file contents into Moodle Atto text box
2 stars 7 forks source link

Too verbose debugging() calls #1

Closed mudrd8mz closed 8 years ago

mudrd8mz commented 8 years ago

I noticed you use the inbuilt debugging() calls in quite intensive way to track the actual code flow of your plugin. Note that this is not common in Moodle. Even with the debugging level set to the maximum developer level, Moodle related code calls debugging() mostly in case there are some unexpected things happening that need to be debugged.

I do understand your reasoning to be able to monitor the actual work of your plugin. This might be achieved by introducing a plugin level constant like ATTO_WORDIMPORT_VERBOSE_DEBUG or so. If that is set to 1 (with 0 being default), only then it would use debugging() to track the code flow.

ecampbell commented 8 years ago

Replaced global DEBUG_DEVELOPER with local DEBUG_WORDIMPORT to control debugging.