Who awarded a teaching license in non-Islamic schools?