It completely depends on what is the situation at hand and the needs of a school. If the school wants to take remote or strictly theoretical exams then online exams are the best however, if the school requires students to be accessed during as well as after the exam (like in practical exams) then offline exams are best.