Skip to content

Instantly share code, notes, and snippets.

@phette23
Last active June 11, 2021 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phette23/3b02ce9d322fb1d68135ad78214e97ed to your computer and use it in GitHub Desktop.
Save phette23/3b02ce9d322fb1d68135ad78214e97ed to your computer and use it in GitHub Desktop.
unenroll all students from Moodle course
# used for instance when First Year wants to drop sophomores from their home & replace with new incoming students
# COURSE = course id
USERS=$(moosh -n user-list --course $COURSE --course-role student)
moosh -n course-unenrol $COURSE $USERS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment