Commit Graph

44 Commits

Author SHA1 Message Date
Awais Qureshi
e92bdc5dce BOM-2442
pyupgrade in course-bookmarks, course-duration
2021-03-11 15:00:33 +05:00
Awais Qureshi
805e10a5ac BOM-2442
pyupgrade in course-bookmarks, course-duration
2021-03-10 18:35:45 +05:00
Aarif
93a4f96e30 replaced unittest assertions pytest assertions (#26575) 2021-02-22 16:19:37 +05:00
Awais Qureshi
07b182b3be BOM-2335
Apply pylint-amnesty.
2021-02-04 16:37:41 +05:00
sarina
7a575843ca Squashing some naive datetime warnings 2020-11-17 18:15:58 -05: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
Michael Terry
3030efec78 AA-177: Add masquerading for course home MFE
- Looks at masquerading config for dates, outline, metadata, and
  celebration APIs in course_home_api / courseware_api.
- Consolidates and cleans up places we check whether masquerading
  gives us full access to a course.
2020-06-29 12:37:47 -04:00
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
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
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -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
Matthew Piatetsky
bd76a71019 delete old holdback code 2019-11-07 09:51:39 -05:00
Matthew Piatetsky
8d8626ca1f address comments 2019-11-01 13:41:01 -04:00
Matthew Piatetsky
c2774083ea create table that excludes enrollments from FBE 2019-10-31 16:30:52 -04:00
Ned Batchelder
b3a731550c Fix problems that drf-yasg uncovered.
These were originally fixed individually, but had to be reverted, and
are now combined in one commit.  The originals were:

7b9040f6b0 This enum was backwards
8774ff1f9b Use ref_name to disambiguate serializers that drf-yasg would otherwise assume are the same.
8a44397139 Is this field missing because it is None?
4a1154a7ca Give a safer buffer for clearing the rate limiting
64c47856dd DRF 3.7.4 changed how you delegate to another view, so don't
7359ca4fb2 Is this right? It fixes two tests
fdd66e5390 Adjust the expected error message for DRF 3.7.7
9257f68fd8 The default TIME_ZONE should be UTC
2019-06-21 18:04:15 -04:00
Ned Batchelder
39c7a2db7c Revert "Use drf-yasg for Open API documentation" 2019-06-11 16:05:00 -04:00
Ned Batchelder
9257f68fd8 The default TIME_ZONE should be UTC
In production, we use UTC as the time zone.  DRF 3.7.7 now puts all
times in the currently set timezone where it used to use UTC.  By
setting TIME_ZONE to UTC, we keep the same results we used to get.

In a few places, we had to change the expected test results to be UTC.
2019-06-10 15:27:39 -04:00
Wei Lee
1d5a72ac33 INCR-236 (#20502)
* INCR-236

* Run python-modernize on openedx/features/course_duration_limits and
  verify that the change makes sense and tests does not break

* Remove redundant import and update docstring style
2019-05-23 11:53:58 -04:00
Bill Tucker
92e8615669 INCR-224: run python-modernize and isort for openedx/features/course_duration/ (#20429) 2019-05-07 08:47:10 -04:00
Matthew Piatetsky
62b9bb89c8 Change content_type_gating enabled_for_enrollment to return false if a course has no verified mode or a user is not enrolled in the audit mode 2019-04-14 16:32:13 -04:00
Calen Pennington
fa2ee761d9 Allow overriding Content Type Gating and Course Duration Limits on a per-course (rather than per-course-run) basis
REVMI-94
2019-03-11 15:23:19 -04:00
Calen Pennington
5d3c9b36df Merge pull request #19964 from cpennington/fbe-query-perf
Sort in python and add an index to improve StackedConfigModel.current…
2019-03-11 12:22:59 -04:00
Calen Pennington
c532077f3a Sort in python and add an index to improve StackedConfigModel.current query performance 2019-03-08 09:50:08 -05:00
Matthew Piatetsky
74bcc29417 Remove FEATURE_BASED_ENROLLMENT_GLOBAL_KILL_FLAG 2019-03-07 15:46:33 -05:00
Matthew Piatetsky
49ae6b9d73 Remove CONTENT_TYPE_GATING flag 2019-03-07 15:46:33 -05:00
Calen Pennington
6d22866e78 Cache org-site lookups in the RequestCache 2019-02-06 10:11:15 -05:00
Calen Pennington
805f32a357 Revert "Allow courses api to return data incrementally" 2019-01-25 12:56:57 -05:00
Calen Pennington
a842921e1f Cache org-site lookups in the RequestCache 2019-01-25 10:30:09 -05:00
Bill Filler
c253374372 Conditionalize track selection based on settings of course duration and content gating 2019-01-07 09:47:37 -05:00
Matthew Piatetsky
1396ca9173 Ignore enrollment date for FBE when masquerading 2018-12-26 20:29:44 -05:00
Bessie Steinberg
6f2a2785e8 REVE-154 FBE Global Kill Switch
Create a global kill switch for feature based enrollment.  To turn on
the kill switch (and turn off both course duration gating and content
type gating) enable a waffle flag named:
'content_type_gating.global_kill_switch'
2018-12-14 09:36:56 -05:00
Bill Filler
6606ddefff Add feature-based enrollment search to support form 2018-12-11 09:53:19 -05:00
Matthew Piatetsky
14a899a65d REVE-104 & REVE-108: Ensure Course Roles' Access 2018-12-07 16:39:09 -05:00
Calen Pennington
bced52b728 Merge pull request #19334 from cpennington/enabled-as-of-datetime
Enabled as of datetime
2018-11-30 15:09:11 -05:00
Calen Pennington
31047260cc Switch ContentTypeGatingConfig.enabled_as_of and CourseDurationLimitConfig.enabled_as_of to datetimes 2018-11-30 10:02:53 -05:00
Matthew Piatetsky
08301a484e Ensure staff users do not see expiration banner 2018-11-29 09:45:49 -05:00
Matthew Piatetsky
815acda002 Populate experiment data with holdback key post enrollment and check holdback key when setting user group 2018-11-28 13:40:57 -05:00
Calen Pennington
0cb48dfe1c Add StackedConfigurationModels for managing content_type_gating and course_duration_limits 2018-11-21 12:18:10 -05:00