Update exam.php

Latest changes copied from biju's system