To obtain an ijāzah, a student "had to study in a guild school of law, usually four years for the basic undergraduate course" and ten or more years for a post-graduate course.
How long did a student have to study law, in early Islamic law graduate schools, in order to graduate?
ten or more years