Skip to content
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

Merged
merged 3 commits into from
Aug 28, 2023
Merged

Update zoho on (un)enrolment #112

merged 3 commits into from
Aug 28, 2023

Conversation

bravoalpha79
Copy link
Contributor

No description provided.

Copy link
Contributor

@stefdworschak stefdworschak left a 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()
Copy link
Contributor

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.

Copy link
Contributor Author

@bravoalpha79 bravoalpha79 Aug 23, 2023

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'})
Copy link
Contributor

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?

@bravoalpha79 bravoalpha79 merged commit d1c9f2a into master Aug 28, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants