As a student, you are not necessarily allowed to record your classes. This is because your teacher has authority over the teaching situation and is the owner of the lecture, so to speak, and it is therefore up to the individual teacher to decide if students are allowed to record their classes. Always ask your teacher for permission before you record a class.
If a teacher chooses to let students record their classes, the teacher must be careful not to treat students differently in an unfair way. This means that the teacher has to have a good reason to give particular students permission to record classes if others have been told no. However, it would be legal to give students with disabilities special permission to record classes, even if others are not allowed. This would not be unfair discrimination.
If you have recorded a class as a student, you are not allowed to share the recording with others, because of the rules about copyright and data protection. If you want to release a recording, you have to get the permission of both the teacher and all of the students in the recording.