CCLE-4311-Run Moodle code checkers and fix the reported problem
* Run Moodle code checkers and fix the problems reported by the code
* checker
* Fix bug on line 73 of eventlib.php, remove extra parenthesis

CCLE-4312-Add proper copyright status for all source files and add LICENSE
file