Four vaulted halls open onto the courtyard. Sultan Hasan founded more than a mosque here: its colleges taught law according to all four Sunni schools.