Commit Graph

129 Commits

Author SHA1 Message Date
Douglas Hall
51d8580982 Fix default from email lookups 2016-06-22 13:54:57 -04:00
Ibrahim
603546a04a replace references to settings.PLATFORM_NAME in edx-platform with theme overrides 2016-06-17 18:33:19 +05:00
Eric Fischer
faa7f544d2 Bulk Email Cohorts (#12602)
Adds cohorts as valid bulk email targets.
2016-06-06 16:32:59 -04:00
Eric Fischer
a9a3fabfe8 Bulk Email Multiselect (#12301)
TNL-4356

Allows multiple bulk email targets to be specified at once.

-The previous "All" option has been split into "Staff" and "Learners"
-The backend changes made here lay the groundwork for cohort emailing
-The data migration, 0005, is somewhat large and requires deploy attention
-Tests have been updated
-Numerous safe-commit-linter fixes are included
2016-05-26 14:22:04 -04:00
Asad Iqbal
18cddf6e1e Merge pull request #12488 from edx/asadiqbal08/WL-477
Got two thumbs up, so merging. 
WL-477 Route direct references to email address configurations through theming.helpers
2016-05-23 17:56:28 +05:00
asadiqbal
1c19ebb443 WL-477 2016-05-23 13:24:05 +05:00
Adam Palay
c9b0e12d39 use markupspace for escaping 2016-05-13 11:15:00 -04:00
Adam Palay
91ae60f5e9 refine from_addr length limits (TNL-4264) 2016-05-12 15:12:41 -04:00
Adam
bb5874d5a1 truncate email from addresses if >320 chars when encoded (TNL-4264) (#12171)
* truncate email from addresses if >320 chars when encoded (TNL-4264)

* use exact lengths
2016-04-20 08:43:26 -04:00
Adam Palay
6e43d97fe7 make sure email from addresses don't exceed 320 characters (TNL-4264)
clean up and fix quality violations

since get_course can never return None, we can remove these lines
2016-03-31 14:23:08 -04:00
Nimisha Asthagiri
d170c92f3b Refactor course_image_url 2015-12-04 11:25:40 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05: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
muzaffaryousaf
0881cdf366 Updating account_settings_url for bulk emails.
TNL-1877
2015-06-09 19:02:42 +05:00
muzaffaryousaf
b185a686d8 Removing course_title from email subject.
TNL-1877
2015-06-09 18:48:55 +05:00
Shrhawk
dd20badcf7 Merge pull request #7996 from edx/shr/bug/TNL-2119-Unicode-error-in-templating-bulk-course
bulk_email fix course_image_unicode name
2015-05-15 23:31:01 +05:00
Syed Hassan Raza
f199c305b9 bulk_email fix course_image_unicode name 2015-05-12 01:49:02 +05:00
Feanil Patel
3d7a6d8b90 Fix for when celery runs in eager mode.
When celery runs in eager mode, there is a bug and an exception
is not thrown when using retry logic. A PR to fix the bug can
be found here: https://github.com/celery/celery/pull/2607

In the mean time, we have to deal with the fact that in eager mode
celery will not throw the exception but simply return it. So we
raise it ourselves.
2015-05-08 09:01:50 -04:00
Feanil Patel
95c240d576 Fix a bug in the failure increment. 2015-05-08 09:01:49 -04:00
Adam Palay
afb2dae631 Revert "Revert "use different queue for smaller emails (TNL-1591)""
This reverts commit 228cca4e38ec79f5cbb54098c788ab9556f602e2.
2015-04-15 12:03:23 -04:00
Adam Palay
d9a21bdf4d use email context for keyword substitution, cutting down on db queries (TNL-1591) 2015-04-08 11:22:26 -04:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
Adam Palay
c12b542136 split up bulk email query for students and unenrolled course staff (TNL-1332) (TNL-1143) 2015-02-23 10:58:37 -05:00
Syed Hassan Raza
8b599ee424 python standard logging 2015-02-18 19:47:07 +05:00
Syed Hassan Raza
2f7bee4254 add logging for send_email_task 2015-02-10 21:18:12 +05:00
njdup
32bbb0e71a Implements keyword sub feature for bulk emails
This commit pulls in changes from #4487 that implements keyword
substitution for bulk emails. With these changes, an instructor can
include keywords in their bulk emails which will be automatically substituted
with the corresponding value for the recepient of the email. Keywords are
of the form %%keyword%%, and the keywords implemented in this commit include:

%%USER_ID%% => anonymous_user_id
%%USER_FULLNAME%% => user profile name
%%COURSE_DISPLAY_NAME%% => display name of the course
%%COURSE_END_DATE%% => end date of the course

Client-side validations have also been implemented to ensure that only emails
with well-formed keywords can be sent.
The architecture is designed such that adding in new keywords in the future
would be relatively straight-forward.
2014-12-11 15:03:29 -08:00
Sarina Canelake
89b6adadf2 s/pylint: disable=E1102/pylint: disable=not-callable/ 2014-12-01 11:22:10 -05:00
Sarina Canelake
aa7cc2b79e s/pylint: disable=E0702/pylint: disable=raising-bad-type/ 2014-12-01 11:22:10 -05:00
Braden MacDonald
a8f622af7f Consistently ensure dog_stats_api tags are formatted correctly 2014-10-09 12:35:26 -07: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
Julia Hansbrough
6ccb11f03e Change Location, CourseLocator, etc to reference opaque-keys library 2014-05-30 20:32:38 +00:00
Adam Palay
5b769df452 No longer chunk queries when sending out bulk email (LMS-2718)
refactor _generate_items_for_subtask not to chunk queries

use django's iterator methor for querysets

remove bulk email query settings

use read_replica if available, since this is read-only

update changelog
2014-05-29 09:10:25 -04:00
Sarina Canelake
bf32f5a7b9 Opaque-keys: fix pep8 violations 2014-05-23 14:22:54 -04:00
Calen Pennington
eb11ba76a7 Better unicode handling in instructor tasks/bulk-email 2014-05-09 09:23:51 -04:00
Calen Pennington
cd746bf8e5 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds the non-courseware lms/djangoapps and lms/lib.

These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).

For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.

Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>

[LMS-2370]
2014-05-08 12:09:23 -04:00
Don Mitchell
81a92e4bfc Consolidate course_id triple parsing 2014-02-24 11:45:59 -05:00
Jay Zoldak
9c4a9d8f64 Make code safe for unicode course ids 2014-01-31 16:35:56 -05:00
Jay Zoldak
bc30addfb9 Unicode changes to support QRF
fixing unit tests

fixing merge error

fixing xqueue submission issue with unicode url (trial 0.1)

fixing fotmats as commented upon

removing yaml file language selection

Unicode changes to support QRF

removed unnecessary pass in modulestore/init.py

fixing merge error

fixing fotmats as commented upon

removing yaml file language selection

fixing pep8 violations

- fixing pylint violations

pylint violation

fixing line spaces and formats

ignore pylint E1101

remove empty line

fixing pylint violations

 pep8 violations

bulk mail unicode/decode

fix migration error

fix pep8 just to push again

more unicode/decode
Final changes to comments and error messages.
2014-01-30 16:20:36 -05:00
Don Mitchell
858e354a6d Moved roles.py to common student 2014-01-14 17:04:43 -05:00
Calen Pennington
061a46beef Formalize various access roles as objects
This centralizes the logic for group membership, and means that we
don't need to make queries to find out whether the legacy groups names exist.
2013-11-13 13:42:37 -05:00
Brian Wilson
5b48ed840b Refactor subtask creation logic to be less email-specific. 2013-10-28 12:58:11 -04:00
Brian Wilson
0f8f82c845 Define and use SubtaskStatus class. 2013-10-28 12:57:41 -04:00
Brian Wilson
ed4b954a53 Remove the use of celery.group from bulk email subtasks. 2013-10-28 12:47:11 -04:00
Brian Wilson
16b85c0c2a Check for requeued subtasks when in RETRY state. 2013-10-22 18:17:00 -04:00
Brian Wilson
ba6477abef Handle all exceptions returned by django-ses. 2013-10-18 15:12:07 -04:00
Brian Wilson
a699674015 Check that a subtask has not already completed before running. 2013-10-17 13:32:44 -04:00
Sarina Canelake
86c4a03eba admin-console support for enabling email per course 2013-10-16 13:02:41 -04:00
Brian Wilson
b8239068cb Check that email subtasks are known to the InstructorTask before executing. 2013-10-16 13:02:41 -04:00
Brian Wilson
87a72b7e99 Rename some constants, and refactor bulk email task flow. 2013-10-16 13:02:40 -04:00