Commit Graph

37 Commits

Author SHA1 Message Date
Jawayria
8fc7333982 Refactor: Remove unused imports
Removed unused imports from openedx/core/djangoapps/{dark_lang, django_comment_common, embargo, lang_pref, oauth_dispatch, plugins, programs, schedules}
2021-04-06 17:11:59 +05:00
Usama Sadiq
0223feb17b refactor: ran pyupgrade on openedx/core/djangoapps (#26955)
ran pyupgrade on openedx/core/djangoapps/{schedules, self_paced, service_status}
2021-04-01 15:00:49 +05:00
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
Michael Terry
74887aa216 feat: turn on schedule creation by default
This commit removes several waffle toggles that have been enabled
on edx.org for years. It's time to remove the rollout gating for
these features and enable them by default.

This doesn't directly change any behavior. But it does create new
database objects by default now and allows for enabling other
schedule based features more easily.

Specifically, the following toggles were affected.

schedules.create_schedules_for_course
- Waffle flag removed as always-enabled
- We now always create a schedule when an enrollment is created

schedules.send_updates_for_course
- Waffle flag removed as always-enabled
- Course update emails are sent as long as the ScheduleConfig
  allows it.
- This is not a change in default behavior, because ScheduleConfig
  is off by default.

dynamic_pacing.studio_course_update
- Waffle switch removed as always-enabled
- Course teams can now always edit course updates directly in Studio

ScheduleConfig.create_schedules
ScheduleConfig.hold_back_ratio
- Model fields for rolling out the schedules feature
- Schedules are now always created
- This commit only removes references to these fields, they still
  exist in the database. A future commit will remove them entirely

This commit also adds a new has_highlights field to CourseOverview.
This is used to cache whether a course has highlights, used to
decide which course update email behavior they get. Previously every
enrollment had to dig into the modulestore to determine that.
2021-02-23 12:34:02 -05:00
usamasadiq
e6d43ac69c Applied pylint amnesty 2021-02-08 12:45:57 +05:00
Matthew Piatetsky
101c9b6633 Remove uses of the active field on the schedule model in the code.
Removing the active field from the model itself and the database is broken out into a separate ticket (AA-574)
AA-488
2021-01-05 18:25:44 -05:00
Dillon Dumesnil
9e2eab506f AA-454 and AA-470: Update language and bug fix for highlights
Since Course Highlights aren't necessarily weekly (self-paced courses),
update the language to be more generic. And then includes a bug fix to
not send highlights to learners after they have unenrolled from a course.
2020-12-04 15:26:47 +00:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Abdul Hannan
fa6633ba4e DO NOT MERGE - NEED FAKE - Rename start in schedule 5/5 (#22392)
* Remove start field in Schedules

Co-authored-by: hunytalk <ahannan@edx.org>
Co-authored-by: Cory Lee <cory@edx.org>
2020-03-12 15:40:19 -04:00
Michael Terry
f56a01adbe Reset schedule when mode changes
This way if an audit user upgrades a self paced course to verified,
their schedule will reset to the current time.

AA-60
2020-03-11 11:53:49 -04:00
Calen Pennington
d853444229 Schedules is a core part of the LMS, install it by default, rather than through the plugins mechanism 2020-03-04 10:52:17 -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
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
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
Jolyon Bloomfield
b66e367520 INCR-199 migrate openedx/core/djangoapps/schedules 2019-04-05 00:43:41 -04:00
Matthew Piatetsky
f294b1a374 fix unicode strings in openedx/ part 1 2019-02-13 10:47:35 -05:00
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
Tyler Hallada
ce683242b3 Register course start signal receiver in CMS too
The code was refactored to remove logic that conditionally launches the
update_course_schedules task. It now always launches the task.
2018-03-13 21:37:21 +05:00
Nimisha Asthagiri
2d28d2ce9e Update Schedules to use Plugin Signals 2018-01-18 11:48:24 -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
sandroroux
4dbb935ca7 Removed references to CREATE_SCHEDULE_WAFFLE_FLAG. 2017-12-04 14:10:29 -05:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
Gabe Mulley
26303580a5 update schedule start when course start date changes 2017-11-17 13:28:31 -05:00
Gabe Mulley
e5a0bcfc32 hold back some users from dynamic pacing features 2017-11-08 09:48:48 -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
Tyler Hallada
806114a3ef Check org before course deadline config w/ tests 2017-10-25 17:54:47 -04:00
sandroroux
40d3f4f2fc Unit tests for "_add_upsell_button_to_email_template". 2017-10-13 10:08:52 -04:00
Nimisha Asthagiri
813007bb49 Schedules/ACE - support debug logging via waffle 2017-09-16 22:03:28 -04:00
Nimisha Asthagiri
65f8731a73 Update schedule start only if new course start date is in the future 2017-09-11 16:19:46 -04:00
Nimisha Asthagiri
5193649956 Update Schedules when start date changes on non-live courses 2017-09-10 08:41:26 -04:00
Gabe Mulley
9429128776 do not create schedules for instructor led courses 2017-09-06 15:25:10 -04:00
Gabe Mulley
6a36eb0183 Use ACE to 'send' Recurring Nudge emails 2017-08-31 16:58:08 -04:00
Clinton Blackburn
986afbfa38 Powering courseware deadline with schedules 2017-08-05 22:06:17 -04:00