Made CodeViewer's editor use an actual unique key

Made CodeViewer's code use the course id since that's unique (there
could be several course with the same name but not course id or code.

What CourseID is used for beyond checking if a course exists is beyond
me though.