LTI tweaks

A couple of tweaks for performance and translating keys from a KAPx course to a Moodle course.

My change to local_ltiprovider_get_user_course has to go along with the changes in wskapx or the grade services will break.
[otf: 744] [otf: 745]