The court took up the matter after widespread student protests over the cancellation of the national medical exam.