Both answers are possible, but the 2nd is the better one since 'hope' is a human emotion, bringing to the fore the multiple membership of the single class. Compare: The class was very quiet while the teacher was speaking. The class were doing their homework.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.