 Most schools were residential whereby both teachers and students resided as a rule . The teachers appointed were jurists , theologians , and traditionalists who received their salary from endowments to the institutions they taught in . Each student was offered a lodging where he would resort , a teacher to instruct him in whatever art he requested , and regular grants to cover all his needs . Madrasas were considered prestigious institutions in society . Under the Ayyubids , it was not possible to obtain a job in the government without receiving an education from a madrasa . 
