Fix issue loosing ref of the course - refs BT#8186
Merge branch '1.9.x' of github.com:chamilo/chamilo-lms into 1.9.x