In indirect speech /
the teacher said to us ,'i have often told you not to idle away your time.
ans-The teacher told us that she had often told us not to idle away our time.
The answer provided by you is absolutely correct. The correct form of reported speech of your given sentence is:
The teacher told us that she had often told us not to idle away our time.
Or,
The teacher reminded us that she had often told us not to idle away our time.