fix submission index logic for student index