Created
December 21, 2020 19:15
-
-
Save phette23/35209bfed7d15bacc155106299780481 to your computer and use it in GitHub Desktop.
bulk Moodle template restore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: make sure the course-list query returns the courses you want and also that the right backup is | |
# referenced in the course-restore command. The query should probably use shortnames (e.g. example is | |
# all First Year 4D courses), as opposed to something like categories, because you can target metacourses. | |
for id in $(moosh -n course-list -i 'shortname LIKE "FYCST-1120%-2021SP"'); do | |
moosh -n course-restore --overwrite ~/backup-*.mbz $id; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment