Fixed 500 error on views with incomplete course id in url.

LMS-11217

Added try except in views to catch InvalidKeyError and raised Http404 when an incomplete course id is in url.

Added unit test.
true, but we'd need to document that the course id would need to be the first arg offered