fix bug of js logic in the course class delete