Implement get_prev_code_cell() and use it when submitting quizzes