added sorting by completed first to teacher's view