When I get negative energy from people I have come to understand that it can be for a variety of reasons - some people are pretty confused in their mind and they. or their energies 'resist' lighter, more spiritual beings. Their energies want to get rid of you/ push you out of a situation, or place, as your presence increases energy and awareness and makes it harder for them to keep up their self-conceit, self-dislike etc.
Other times energies seem to look for the lightest being around and try to use us as a channel out. They are tired of being the bad boy, and just want to go home....
Furthermore it can be an intuitive warning - along the lines of - 'Beware! Keep your wits about you!' Such warnings can be useful - for you it might mean - 'Make sure you study enough for this class'; 'Pray for enough help to master this class, including all possible healings the lecturer might require to be 'fair''
All the best!