Skip to content

Instantly share code, notes, and snippets.

@swinbanks
Last active May 15, 2020 01:32
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 swinbanks/2059bbaedb84f9c47fe4e3a29fc4aab6 to your computer and use it in GitHub Desktop.
Save swinbanks/2059bbaedb84f9c47fe4e3a29fc4aab6 to your computer and use it in GitHub Desktop.
Send Enrolment Script with Zoom addition
def enrolment = args.entity
if (enrolment.status == EnrolmentStatus.SUCCESS && enrolment.confirmationStatus == ConfirmationStatus.NOT_SENT) {
email {
template "Enrolment Confirmation"
bindings enrolment: enrolment
to enrolment.student.contact
}
enrolment.setConfirmationStatus(ConfirmationStatus.SENT)
args.context.commitChanges()
if (enrolment.courseClass.customField("ZoomID")) {
email {
template "Zoom Link Test"
bindings enrolment: enrolment
to enrolment.student.contact
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment