All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
Intermixing of the sexes is prohibited whether in classes or elsewhere, unless there is an ultimate necessity and there is no other alternative, because of the probable resulted temptation and corruption. Usaamah ibn Zayd narrated that the Prophet said: “I am not leaving a more harmful trial for men behind me than women.” [Al-Bukhari, Muslim, At-Tirmithi, ibn Maajah and Ahmed] If there were no possible alternatives and the need existed, it would be permissible, with certain conditions:
The girl should cover all of her body. Allaah The Almighty Says (what means): {and not expose their adornment except that which [necessarily] appears thereof and to wrap [a portion of] their head covers over their chests } [Quran 24:31]
They should not wear perfume or adornments.
Everybody should lower their gazes. Allaah The Almighty Says (what means): {Tell the believing men to reduce [some] of their vision and guard their private parts. That is purer for them. Indeed, Allah is Acquainted with what they do. * And tell the believing women to reduce [some] of their vision and guard their private parts…} [Quran 24:30-31]
They should be safe and away from temptation.
If all these conditions are fulfilled, then it is permissible to teach them the rulings of marriage such as validity conditions, numbers, maintenance, and so on.
However, it is impermissible to speak about sexual facts.
Allaah Knows best.