Commit Graph

149 Commits

Author SHA1 Message Date
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
Christine Lytwynec
08993aead6 Merge pull request #7959 from edx/clytwynec/split_lms_unittests_into_shards
Clytwynec/split lms unittests into shards
2015-05-08 14:19:25 -04: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
e4aa91d510 Remove the mock, it doesn't seem like it's needed. 2015-05-08 09:01:49 -04:00
Feanil Patel
95c240d576 Fix a bug in the failure increment. 2015-05-08 09:01:49 -04:00
Christine Lytwynec
ddb1ae667e Split lms unittests into multiple shards 2015-05-07 09:17:26 -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
a84735057d Move common/lib/*.py to openedx/core/lib
This makes these files importable, and puts them into the new best guess
as to where files should live.
2015-03-23 12:40:24 -04:00
Ned Batchelder
81d17c516e Fix or remove tearDown methods that don't use super.
Update edx-lint to the version that checks if tearDown uses super.

Convert a number of tearDown methods into addCleanup.

Remove some unneeded tearDown methods: no need to call patch.stopall if
none of them were started with patch.start.
2015-03-17 15:14:52 -04:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
stv
6c06f8ce5d Fix Pylint: C1001(old-style-class) 2015-03-13 20:20:04 -07:00
Adam Palay
3aca0d5472 Merge remote-tracking branch 'origin/release' into adam/merge-release-into-master
Conflicts:
	common/djangoapps/student/models.py
	lms/djangoapps/bulk_email/tasks.py
2015-02-23 18:40:45 -05:00
Syed Hassan Raza
cfb2df113d python standard logging 2015-02-23 11:40:41 -05: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
stv
e17504d7b8 Fix Pylint: E0012(bad-option-value) 2015-02-19 19:56:51 -08:00
stv
2e1400f842 Fix Pylint: W0613(unused-argument) 2015-02-19 19:56:51 -08:00
Syed Hassan Raza
8b599ee424 python standard logging 2015-02-18 19:47:07 +05:00
Adam
296167e531 Merge pull request #6950 from edx/release
Release
2015-02-10 16:06:24 -05:00
Syed Hassan Raza
2f7bee4254 add logging for send_email_task 2015-02-10 21:18:12 +05:00
Calen Pennington
b353ed2ea2 Better support specifying of modulestore configuration in test cases
The existing pattern of using `override_settings(MODULESTORE=...)` prevented
us from having more than one layer of subclassing in modulestore tests.

In a structure like:

    @override_settings(MODULESTORE=store_a)
    class BaseTestCase(ModuleStoreTestCase):
        def setUp(self):
            # use store

    @override_settings(MODULESTORE=store_b)
    class ChildTestCase(BaseTestCase):
        def setUp(self):
            # use store

In this case, the store actions performed in `BaseTestCase` on behalf of
`ChildTestCase` would still use `store_a`, even though the `ChildTestCase`
had specified to use `store_b`. This is because the `override_settings`
decorator would be the innermost wrapper around the `BaseTestCase.setUp` method,
no matter what `ChildTestCase` does.

To remedy this, we move the call to `override_settings` into the
`ModuleStoreTestCase.setUp` method, and use a cleanup to remove the override.
Subclasses can just defined the `MODULESTORE` class attribute to specify which
modulestore to use _for the entire `setUp` chain_.

[PLAT-419]
2015-02-04 09:09:14 -05:00
Calen Pennington
03a05fd9d4 Always call super(..).setUp() from setUp 2015-02-04 09:09:14 -05:00
Christine Lytwynec
9dc85bf10d PR updates 2015-01-05 17:38:18 -05:00
Christine Lytwynec
c7ede0df4b fixing pep8 violations 2015-01-05 16:19:36 -05:00
Christine Lytwynec
3127ac2b6c mock html_to_text for tests 2015-01-05 16:19:36 -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
Jesse Zoldak
bf3b87bc64 Clean up all modulestore testcases
Move modulestore config for tests to an importable location
Disable pylnt warning for lms imports in common tests
Refactor all testcases that loaded all xml courses
TE-610
TE-489
2014-12-02 07:09:36 -05:00
Sarina Canelake
c0556a7ef8 s/pylint: disable=W0613/pylint: disable=unused-argument/ 2014-12-01 11:22:11 -05:00
Sarina Canelake
e45994b2ef s/pylint: disable=R0924/pylint: disable=incomplete-protocol/ 2014-12-01 11:22:11 -05: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
Sarina Canelake
19f1dacab2 s/pylint: disable=E1101/pylint: disable=no-member/ 2014-12-01 11:22:09 -05:00
Sarina Canelake
e0f1d3f3f3 s/pylint: disable=C0111/pylint: disable=missing-docstring/ 2014-12-01 11:22:09 -05:00
Sarina Canelake
0dad9da5e4 s/pylint: disable=W0621/pylint: disable=redefined-outer-name/ 2014-12-01 11:22:08 -05:00
Chris Dodge
adbe133f5c Treat an empty string from the admin form to be None/NULL for the CourseEmailTemplateForm 2014-11-17 10:05:12 -05:00
stv
fb9f324f2f Fix PEP8: E303 too many blank lines 2014-11-10 11:00:14 -08:00
stv
d87cfa90bf Fix PEP8: W292 no newline at end of file 2014-11-10 10:59:44 -08:00
Sarina Canelake
725e4908e3 Remove more pep8 violations 2014-11-04 07:37:41 -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
Mat Peterson
4f6088cbd1 Fixed some isinstance errors with opaque-keys 2014-07-11 15:40:08 -04:00
Nimisha Asthagiri
eecff6e0aa ModulestoreEnum class. 2014-06-27 14:37:35 -04:00
Julia Hansbrough
6ccb11f03e Change Location, CourseLocator, etc to reference opaque-keys library 2014-05-30 20:32:38 +00:00
Sarina Canelake
0f2b4cd2b6 Merge pull request #3931 from edx/sarina/fixup-external-opaque-keys-impls
Use external OpaqueKey implementations
2014-05-29 18:23:08 -04:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -04: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
110719deae StaffFactories accept course_keys, not courses. Make that clear in the interface. 2014-05-24 18:49:06 -04:00
Sarina Canelake
265fa826ca Opaque-keys: fix pylint violations 2014-05-23 14:23:12 -04:00
Sarina Canelake
bf32f5a7b9 Opaque-keys: fix pep8 violations 2014-05-23 14:22:54 -04:00