Improving query see BT#6770
Merge branch '1.9.x' of github.com:chamilo/chamilo-lms into nuevo