Fixed 500 error on views with incomplete course id in url.
LMS-11217
Merge pull request #4792 from edx/waheed/lms11217-fix-500-error-in-views-with-incompete-course-id

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