Minor - formatting code, fixing PHP warnings.
Minor - format code.
Cleaning wiki code see #7006

Moving code inside a class, using session to handle messages,
replacing relative to absolute image paths, fixing redirections.
Merge branch '1.9.x' of ssh://github.com/chamilo/chamilo-lms into chamilo19