So, at the end of every semester you should create a backup of your course with user data, and download it to a folder on your computer, just in case a parent or student questions a grade. You should also regularly back up your courses without user data and download these onto your computer as well. You can delete older backups as necessary. And at the end of the semester, you can reset your course so it is fresh for your next group of students.
This method can be followed when working either in our “new” Moodle or the “old” Moodle.
The following video explains how to do both. Backing Up and Resetting your Moodle courses