MDL-18229: Linking activities and usernames correctly.

Activities to their course page and usernames to their
profile page as per standard.