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

feat: upgrade send_email api to drf ( 15th ) #35387

Merged
merged 13 commits into from
Sep 9, 2024
Merged

Conversation

awais786
Copy link
Contributor

@awais786 awais786 commented Aug 28, 2024

Issue

Steps to verify postman
You need to enable this flag http://local.edly.io:8000/admin/bulk_email/bulkemailflag/add/

permissions = required course role = staff or limited_staff

Try this URL

form-data as post

send-to = ["myself"] or ["myself","learners","staff"] or any cohort user e.g ["cohort:awa"] ( it has multiple scenarios )
subject= This is subject.
message=This is my message.

schedule=2024-08-29T06:01:00.000Z ( This param is optional )

Try this from instructor dashboard
Go to this URL

Screenshot 2024-08-28 at 5 48 05 PM

@awais786 awais786 changed the title Send email to drf feat: send_email to drf ( 15th ) Aug 28, 2024
@awais786 awais786 marked this pull request as ready for review August 28, 2024 13:01
@awais786 awais786 requested a review from feanil August 28, 2024 13:01
)
except ValueError as err:
return HttpResponseBadRequest(repr(err))
targets = json.loads(request.POST.get("send_to"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not handling validation into serializer because there are multiple input combinations, and moving the validation into the serializer would require refactoring, which could introduce errors.

@awais786 awais786 changed the title feat: send_email to drf ( 15th ) feat: upgrade send_email api to drf ( 15th ) Aug 29, 2024
@awais786 awais786 merged commit f52c08a into master Sep 9, 2024
49 checks passed
@awais786 awais786 deleted the send_email-to-drf branch September 9, 2024 09:52
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

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.

3 participants