No, legally speaking, they are not permitted to compel you to disclose your face. On the other hand, it is not necessary for the regulations that are enforced inside a school or classroom to be legally enforceable. If you don't show up to class, the instructor has the option of marking you absent and assigning you all of the consequences that come along with it.