MDL-40844 - Activity completion: Update of the sql to include additional name fields.

The activity completion report wasn't showing the additional name fields.