Commit Graph

65 Commits

Author SHA1 Message Date
Troy Sankey
d428f7530d Revert "Revert "Rename values in SiteConfiguration (2/3) attempt #2""
This reverts commit e6f58b6d4c.

This is our third (3rd!) attempt to deploy stage 2 of this column rename.
2020-03-04 14:53:47 -05:00
Troy Sankey
e6f58b6d4c Revert "Rename values in SiteConfiguration (2/3) attempt #2" 2020-02-27 13:24:55 -05:00
Troy Sankey
c422dec083 Revert "Revert "Rename values in SiteConfiguration (2/3)""
This reverts commit b85aa4b3fb.
2020-02-26 12:54:24 -05:00
Troy Sankey
b85aa4b3fb Revert "Rename values in SiteConfiguration (2/3)" 2020-02-26 11:23:56 -05:00
Julia Eskew
3541643dd5 Rename values in SiteConfiguration (2/3)
This stage does the following:

- Includes a data migration to copy the values from old to new field.
- Changes business logic to switch to using new field.
- Deletes all code references of the old field.
2020-02-25 13:54:02 -05:00
Troy Sankey
18deacde54 Revert "Revert "This stage does the following: (#22692)""
This reverts commit 84de6bc6de
which reverts commit cebeab4348
which implements the first stage of the `values` column rename in
SiteConfiguration.  However, I included a small change:

This time, we set a default value on the new `site_values` column so
that the ORM will happily deserialize the JSONField without throwing a
JSONDecodeError.
2020-02-19 12:01:57 -05:00
Troy Sankey
7127cc9231 Merge pull request #22975 from edx/rename_start_in_schedules_intermediate
Remove reads from old column
2020-01-30 10:39:25 -05:00
edx-pipeline-bot
fb416ba4e7 Merge pull request #22979 from edx/private_to_public_561fb8c
Mergeback PR from private to public.
2020-01-30 07:03:38 -05:00
Awais Jibran
561fb8cafb Merge pull request #168 from edx/aj/fix-schedules-app
Fix schedules app
2020-01-30 16:10:50 +05:00
Troy Sankey
f821e19fa3 Update tests for previous commit
Updates tests for code changes in commit "Remove reads from old column".
2020-01-29 16:23:31 -05:00
Zainab Amir
b172a2a68c Enable course updates for instructor led courses (#22422)
Currently there is no option to schedule bulk emails to be sent
out at a specific time for instructor led courses. It would reduce
the effort required to create an engaging course if instructor led
course teams had the option to turn on weekly highlight emails as
well.

PROD-575
2020-01-28 15:38:19 +05:00
hunytalk
73aae081c3 Remove null, blank from start field in Schedules 2020-01-22 18:10:33 +05:00
Awais Jibran
0470e432ad Fix schedules app 2020-01-21 21:04:15 +05:00
Julia Eskew
84de6bc6de Revert "This stage does the following: (#22692)"
This reverts commit cebeab4348.
2020-01-14 13:01:21 -05:00
Julia Eskew
cebeab4348 This stage does the following: (#22692)
- Adds the new field and migration to create the column.
- Makes all writes go to both old and new field.
2020-01-14 10:40:39 -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
Jeremy Bowman
63574e12b8 Remove pytest version constraint (#22626)
Fix the issue that was preventing us from upgrading pytest.  pytest does some manipulation of test packages that prevents `pkg_resources` from loading resources from them, but used to contain a workaround for the problem.  That workaround was [removed](https://github.com/pytest-dev/pytest/issues/5392) in 4.6.0 as a performance enhancement when pytest switched from `pkg_resources` to `importlib-metadata` for its own entrypoint handling.  This tripped up one of our test modules which defined classes that loaded templates from inside a test package.  Moving these resources to the parent package fixes the problem.

More and more, `pkg_resources` is being abandoned in favor of `importlib-metadata` and `importlib_resources` as they have a simpler design with much better performance.  However, `importlib_resources` doesn't support loading files from any directory which isn't itself a Python package (and doesn't allow direct use of paths including directories within the package).  Jinja2 chose a [different approach](https://github.com/pallets/jinja/pull/1082) that we may want to emulate in our resource handling.

Also fixed usage of a removed `pytest.raises()` parameter and a bug in our configuration of the `common/lib` tests that became a problem after the upgrade.
2019-12-30 09:10:57 -05:00
Taranjeet Singh
00653433a5 Adds optional "unsubscribe" link and api support to let users opt out of email updates.
Scheduled emails show "unsubscribe" link if waffle switch
`schedules.course_update_show_unsubscribe` is enabled, and
settings.ACE_ENABLED_POLICIES respects `bulk_email_optout`.

API endpoint allows GET/POST requests, which:

* GET asks for confirmation of opt-out
* POST accepts "unsubscribe" or "cancel", where "unsubscribe" creates the
  Optout entry, and "cancel" does nothing.

Fixes flaky tests:

* The resolvers handle users in "bins", which are groups that depend on the user ID.
* The test user ID varies depending on the test order.
* This change ensures that the bin requested matches the user for the test.
2019-12-09 22:49:57 +10:30
hunytalk
227ae8a51a Add reference to new field in schedule model 2019-12-04 19:05:55 +05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Michael Youngstrom
d859d2300c INCR-190 2019-04-02 15:25:52 -04:00
Matthew Piatetsky
f294b1a374 fix unicode strings in openedx/ part 1 2019-02-13 10:47:35 -05:00
Awais Jibran
717712391f Fixing conflicts 2019-02-12 17:50:58 +05:00
Jillian Vogel
6dfbf94b87 Fixes flaky tests added by https://github.com/edx/edx-platform/pull/19018
using CacheIsolationTestCase
2019-02-08 13:57:25 +10:30
Taranjeet Singh
3eb9058dd2 Adds optional "unsubscribe" link and api support to let users opt out of email updates.
Scheduled emails show "unsubscribe" link if waffle switch `schedules.course_update_show_unsubscribe` is enabled, and
settings.ACE_ENABLED_POLICIES respects `bulk_email_optout`.

API endpoint allows GET/POST requests, which:

* GET asks for confirmation of opt-out
* POST accepts "unsubscribe" or "cancel", where "unsubscribe" creates the
  Optout entry, and "cancel" does nothing.
2019-02-07 11:47:10 +10:30
Gabe Mulley
5311509b19 Provide more context to calls to Segment.
Implementation for DE-1089.

Centralize the definition of context into a single method.  This is in
common/djangoapps/track because the context is originally set there by
middleware.
2018-11-15 20:56:10 -05:00
Michael Youngstrom
ed594a9983 Patch random.random from the factory's namespace 2018-10-02 13:08:33 -04:00
Jeremy Bowman
d44e6297ae PLAT-1847 Fix cms tests under Django 1.9 2017-12-13 15:29:02 -05:00
Tyler Hallada
95bb6e3db0 Use pytest-style asserts in test_signals.py 2017-12-07 13:43:49 -05:00
Tyler Hallada
6e791c58ea Fix hold back error
Also add try/except that prevents enroll failure caused by Schedule creation
exception in the future.

Address PR comments

Split one-line docstrings on their own line

Add period to the end of docstring summaries

Use kwargs.get to be more defensive

Disable pylint unused-argument about sender param
2017-12-07 13:43:47 -05:00
Nimisha Asthagiri
8acf3434c0 Revert "Merge pull request #16728 from edx/pacing/remove-create-schedules-from-course-waffle-flag"
This reverts commit 8b652ad352, reversing
changes made to b212af2488.
2017-12-06 11:58:39 -05:00
Nimisha Asthagiri
c6ee8eb68d Move ACE Common code out of Schedules 2017-12-05 11:36:14 -05:00
Alessandro Roux
8b652ad352 Merge pull request #16728 from edx/pacing/remove-create-schedules-from-course-waffle-flag
Dynamic Pacing: Removed references to CREATE_SCHEDULE_WAFFLE_FLAG.
2017-12-04 16:11:27 -05:00
sandroroux
4dbb935ca7 Removed references to CREATE_SCHEDULE_WAFFLE_FLAG. 2017-12-04 14:10:29 -05:00
Tyler Hallada
3425502a23 Schedules: change logging from DEBUG to INFO/EXCEPTION 2017-12-03 22:34:33 -05:00
sandroroux
13edb0b03e Updated course_has_highlights and get_week_highlights. Methods ensure that a course has highlights_enabled_for_messaging
Responded to Nimisha's review feedback.
2017-11-27 17:23:29 -05:00
Gabe Mulley
1f3085b2bc rename test methods 2017-11-17 14:05:15 -05:00
Gabe Mulley
26303580a5 update schedule start when course start date changes 2017-11-17 13:28:31 -05:00
Gabe Mulley
46c7327211 make image_url a function instead of a property 2017-11-15 12:37:13 -05:00
Gabe Mulley
6f20cd5cf2 support a GA tracking pixel 2017-11-15 08:35:35 -05:00
Gabe Mulley
e5a0bcfc32 hold back some users from dynamic pacing features 2017-11-08 09:48:48 -05:00
Tyler Hallada
5332b6920f Merge pull request #16466 from edx/thallada/ret-fix-absolute-url
Schedules: absolute_url returns given URL if already absolute
2017-11-06 16:44:43 -05:00
Nimisha Asthagiri
98e647fa24 Schedule-based Highlights email update 2017-11-06 14:30:28 -05:00
Tyler Hallada
1f88d528bd Add unit tests for absolute_url 2017-11-06 13:17:52 -05:00
Nimisha Asthagiri
4f2fdde2d8 Course Week Highlights accessor 2017-11-03 13:33:46 -04:00
Gabe Mulley
7fd643faa4 Add tests for experience types, ensure courses have a verified mode 2017-11-01 16:51:10 -04:00
Tyler Hallada
57bf89c8e2 Create schedule experience on schedule creation 2017-11-01 16:51:00 -04:00
Gabe Mulley
95d1e5c25e use a left outer join for experience types 2017-11-01 16:50:28 -04:00
Nimisha Asthagiri
08d31e1a43 Schedules: Tests for Course Update messages 2017-10-30 14:13:59 -04:00
Calen Pennington
07bb3ea564 Make the exclude orgs a bit more natural by returning a filtered query 2017-10-25 09:10:17 -04:00