Minor - format code.
Fixing some fatal error when the plugin is not activated

Tested with php 5.4.33-1
Merge branch '1.9.x' of ssh://github.com/chamilo/chamilo-lms into chamilo19