-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update zoho on (un)enrolment #112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -143,6 +139,22 @@ def enroll(self): | |||
) | |||
enrollment_status.save() | |||
|
|||
# Update student profile (Contacts) in Zoho | |||
today = current_date_for_crm() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this needs a separate function since this is the only place it is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, I just wanted to make it cleaner as a helper function, so as not to meddle with datetimes and formatting inside the enrolment script itself.
@@ -107,4 +111,8 @@ def unenroll(self): | |||
program.enrolled_students.remove(user) | |||
|
|||
# update the student record on the CRM | |||
update_student_record(settings.ZAPIER_UNENROLLMENT_URL, user.email) | |||
try: | |||
update_student_crm_record(student['id'], {'LMS_Access_Status': 'Removed'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does that happen twice?
No description provided.