Last active
May 15, 2020 01:32
-
-
Save swinbanks/2059bbaedb84f9c47fe4e3a29fc4aab6 to your computer and use it in GitHub Desktop.
Send Enrolment Script with Zoom addition
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
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