Commit Graph

20 Commits

Author SHA1 Message Date
Usama Sadiq
7f6cabbf98 Ran pyupgrade on lms/djangoapps (#26519)
* refactor: ran pyupgrade on lms/djangoapps/bulk_enroll
Co-authored-by: M. Zulqarnain <muhammad.zulqarnain@arbisoft.com>
2021-03-01 17:13:18 +05:00
M. Zulqarnain
6f2d54d53b BOM-2268 : Add Pylint amnesty for Bulk Email (#26208)
* Add Amnest for Bulk Email
2021-02-03 18:15:37 +05:00
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
aarif
fd3a83236a ran python-modernize and isort on files mentioned in INCR-446
changes made to comply with quality

changes made to comply with quality

changes made to comply with quality
2019-07-16 15:14:12 +05:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
Matthew DuBose
a24d892e9c correct mention of old course ID in description of bulk email django tool 2018-04-10 15:42:07 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Omar Al-Ithawi
3739cc4549 Make the course lang override platform lang 2017-04-05 16:48:53 +03:00
Douglas Hall
4ac746a20b Add the course root to the bulk email template context so that templates can customize the full course URL with a custom hostname. 2016-09-19 15:34:55 -04:00
Eric Fischer
0cf3e39c31 Replace bulk email settings with admin config models
Moves ENABLE_INSTRUCTOR_EMAIL and REQUIRE_COURSE_EMAIL_AUTH from settings files
to admin-accessible configuration models. This allows for the bulk email settings
to be modified without a new AMI deploy. See TNL-4504.

Also updates tests:
    -python tests mock out the new configurations in place of the old settings
    -lettuce test has been moved to bokchoy
        (note that there was some loss of coverage here - the lettuce tests had
        been doing some voodoo to allow for cross-process inspection of emails
        messages being "sent" by the server, from the client! In discussion with
        testeng, this seems outside the realm of a visual acceptance test. So,
        the bokchoy test simply confirm the successful queueing of the message,
        and leaves the validation of sending messages to the relevant unit tests.)
    -bok choy fixture has been added, to replace the settings in acceptance.py
    -lettuce and bok choy databases have been updated to reflect the backend changes

The new default is to have bulk_email disabled, we'll need to call this out in the
next OpenEdx release to ensure administrators enable this feature if needed.
2016-05-16 11:09:39 -04:00
Giovanni Di Milia
08dfe5e99f Fixed pylint violation for files in lms/djangoapps/bulk_email 2015-10-14 14:45:32 -04:00
cahrens
614a92957c Correct email settings URL and rename variable.
TNL-2677
2015-07-31 11:39:19 -04:00
Chris Dodge
1809a28b89 Add the ability for Microsites to be able to send appropriately branded emails rather than the default system installed version
fix tests. Update Admin views/forms.

enforce uniqueness constraint in the Admin ModelForm submissions

Update bok_choy cached DBs with new schema changes

PR feedback
2014-10-08 13:04:41 -04:00
Sarina Canelake
c24087a912 django-admin command for enabling email per course 2013-10-11 16:39:12 -04:00
Sarina Canelake
bfebe684b3 Cleanup bulk email app 2013-09-03 16:11:34 -04:00
Brian Wilson
8f93051d30 Add editable templates for bulk email
Adds the edX Marketing-approved template as html default.
2013-08-29 12:40:34 -04:00
Jason Bau
d341d6d26d Change optout to use user.id instead of email.
Includes Data + Schema migrations for optout email -> user.id change.
Note that migrations should be reversible.
2013-08-29 12:40:33 -04:00
Kevin Luo
3b32d4216c Add delay to course bulk email task and use SITE_NAME for site url
Delay for possible race condition with fetching course email object.
 Use settings.SITE_NAME for host name to generate email footer url.
2013-08-29 12:40:32 -04:00
Kevin Luo
907bf6e1b7 Add bulk email feature for instructors, with optout option
Adds a new Email link to the instructor dashboard for frontend interface to send
email to course members. Adds a feature flag ENABLE_INSTRUCTOR_EMAIL to toggle this.
Creates a new djangoapp bulk_email that handles this action by getting the recipient
list and batching the emails to different celery tasks to do the actual sending.
Requires lynx package to convert HTML email to plaintext. Handles SMTP errors by
retrying or falling through to the next email. Adds the option to opt out of course
specific emails in the user dashboard with an Email Settings link for each course.
Uses severable configurable settings with defaults. DEFAULT_BULK_FROM_EMAIL
specifies the from address for email. EMAILS_PER_TASK specifies the number of emails
each celery task takes on. EMAIL_HOST, EMAIL_PORT, EMAIL_HOST_USER,
EMAIL_HOST_PASSWORD, and EMAIL_USE_TLS for the SMTP email backend settings.

Co-authored-by: Akshay Jagadeesh <akjags@gmail.com>
2013-08-29 12:40:31 -04:00