Duplicate offerings in finished offerings section

If a course has multiple offerings then only the newest one should be shown.
Currently everything is being shown which results in duplicate offerings in the finished
courses section for each time the course ran. The fix made is a temporary fix and negates
the problem to a large extent but does not eliminate it.