Is I was praying a valid excuse for being late to class at university level?
It depends on the policies of the school. At the university I attended, there was no punishment for being late or skipping classes entirely – no matter the reason. The student only is only doing a disservice to themselves by missing information that could be valuable when it comes time for exams. Your university may have different policies. If there is a policy about tardiness, and you are in a position to enforce that policy through punishment that you have the authority to impose, then it may be that you can legitimately punish those students who are tardy due to their prayer time. However, you should be sure to also punish the Christians, Jews, and other religious followers for their tardiness or breach of policies due to their religious practices. If they don’t violate any policies, then the school could still be liable for discrimination against the Muslim students.