Commit Graph

107 Commits

Author SHA1 Message Date
Brian Mesick
e478975105 chore: Add missing PII annotations, update safelist
PII Annotations are very out of date, this commit adds most that were
missing in edx-platform, and some additional annotations to the
safelist. It is not comprehensive, several other upstream Open edX
packages also need to be updated. It also does not include removing
annotations that have been moved upstream, or been removed entirely.
Those are separate follow-on tasks.
2024-11-05 12:58:36 -05:00
Mohammad Ahtasham ul Hassan
6a63cfcaa4 feat: add override option to upgrade CTA utils and add course_run_key identifier (#35441)
* feat: add override option to upgrade CTAs and send course_run_key identifier
2024-09-16 13:15:51 +05:00
Awais Ansari
1fb20b3598 feat: update account verification email context (#35165) 2024-07-24 14:40:58 +05:00
Juliana Kang
40ddfeb3b8 feat: Add override on percentage config to the First Purchase Discount (#35167)
REV-4098
2024-07-23 15:43:34 -04:00
Juliana Kang
a19697786f feat: Add First Purchase Discount override (#35143)
REV-4098
2024-07-22 14:01:07 -04:00
Juliana Kang
475b49c3ca feat: Add waffle flag for First Purchase Discount override (#35133)
REV-4097
2024-07-19 08:59:55 -04:00
Sarina Canelake
4a2f231302 fix: fix github url strings (org edx -> openedx) 2022-09-15 14:52:28 -04:00
Eugene Dyudyunov
b4fecd620b refactor: rename toggle_warnings to toggle_warning (#30458)
Rename toggle_warnings to toggle_warning for consistency with setting_warning.
2022-05-24 11:47:31 -04:00
Eugene Dyudyunov
8bd43207ca refactor!: switch from LegacyWaffle* to modern waffles (#30330)
This is a first stage for removing the LegacyWaffle* classes.

LegacyWaffleFlag usage replaced with WaffleFlag;
LegacyWaffleSwitche usage replaced with WaffleSwitch;
New CourseWaffleFlag added to the temporary module __future__ as FutureCourseWaffleFlag;
Updated all the imports to use CourseWaffleFlag from the __future__ module;

BREAKING CHANGE: A number of toggle related constants (e.g. ENABLE_ACCESSIBILITY_POLICY_PAGE)
changed types. They were strings, and are now toggle instances (e.g. WaffleSwitch). Although the entire
refactor should be self-contained in edx-platform, if any plugins or dependencies were directly
using these constants, they will break. If this is the case, try to find a better publicized way of
exposing those toggles.
2022-05-05 12:03:10 -04:00
Mohammad Ahtasham ul Hassan
dd488a76d1 fix: fixed django40 warnings (#29641)
* fix: fixed django4 warnings
Co-authored-by: UsamaSadiq <usama.sadiq@arbisoft.com>
2022-02-25 16:24:51 +05:00
Dillon Dumesnil
e05122a437 fix: Include course key when checking enabled for COURSEWARE_MFE_MILESTONES_STREAK_DISCOUNT
AA-1191
2022-01-25 09:21:10 -05:00
Jawayria
c227712f03 chore: Applied lint-amnesty on openedx/features 2021-12-02 15:02:24 +05:00
M. Zulqarnain
7aadf55387 feat: New codemods on OpenedX 4 (#28779) 2021-11-01 18:05:02 +05:00
M. Zulqarnain
39b91154fb feat: New codemods on OpenedX 1 (#28776) 2021-10-27 13:07:36 +05:00
Soban Javed
56d12bf230 feat!: upgrade pyjwt to version 2.1.0 2021-09-17 16:08:15 +05:00
Chris Deery
4078443969 fix: [AA-950] Add unit test to verify segment called correctly (#28668)
* fix: [AA-950] Add unit test to verify segment called correctly

Add positive and negative test
Moved flag update to same block as segment
Moved WaffleFlag check to can_show_streak_discount_coupon for consistency
2021-09-07 12:53:13 -04:00
Chris Deery
8d682cb447 feat: [AA-950] Productize Streak Discount (#28582)
* feat: [AA-950] Productize Streak Discount

- Change STREAK_DISCOUNT_EXPERIMENT_FLAG to STREAK_DISCOUNT_FLAG
- Remove references to "experiment" and ticket AA-759
- Made flag names more consistent
- Move segment event from get_bucket  to streak calculation
- Streak discount event edx.bi.course.streak_discount_enabled is sent when celebrations are calculated
- Convert LegacyWaffleFlags to WaffleFlags

Co-authored-by: cdeery <cdeery@edx.edu>
2021-09-01 10:55:32 -04:00
Awais Qureshi
82ef28b43f chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
2021-07-29 18:24:39 +05:00
Matthew Piatetsky
f89ae754e4 Revert "feat: add debugging logs to help figure out why experiment isn't activating in production" 2021-06-01 15:10:14 -04:00
Matthew Piatetsky
98eb516745 feat: add debugging logs to help figure out why experiment isn't activating in production 2021-06-01 09:10:40 -04:00
Diane Kaplan
c3a22eb6e5 feat: remove course_home_welcome upsell link (REV-2131) (#27603) 2021-05-26 15:13:09 -04:00
Matthew Piatetsky
9c5992521a feat: Add flag for AA-759 streak celebration discount experiment
AA-759
2021-05-10 13:11:07 -04:00
Usama Sadiq
aa618c460c refactor: remove unused-imports (#27083) 2021-03-19 22:42:14 +05:00
Awais Qureshi
05a5f5954b refactor: remove unused imports. 2021-03-19 10:15:59 +00:00
Awais Qureshi
81eadbd2ae BOM-2442
pyupgrade in discount app.
2021-03-12 12:41:07 +05:00
Awais Qureshi
e40d259a09 BOM-2442
pyupgrade in course-search and discount.
2021-03-11 14:49:15 +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
Aarif
93a4f96e30 replaced unittest assertions pytest assertions (#26575) 2021-02-22 16:19:37 +05:00
Awais Qureshi
5ea60327b1 BOM-2336
Apply pylint-amnesty.
2021-02-04 16:49:47 +05:00
Michael Terry
1482755bbd Show discount deadline in a timezone-aware way
Also, fix it and the access expiration deadline to not hardcode
the date presentation in an American way.
2021-01-08 13:56:18 -05:00
Carla Duarte
99163bdf2c AA-131: Allow anonymous users through course home MFE 2020-12-16 12:58:33 -05:00
Michael Terry
eef72b5ab7 TNL-7185: Send data, not rendered HTML to the learning MFE
Specifically, send data versions of course_expired_message and
offer_html.

The rendered HTML is still being sent for now, until the learning
MFE is updated to consume the data objects.
2020-12-14 13:41:03 -05:00
Régis Behmo
a16cd71046 Start waffle namespace deprecation
By explicitly importing the legacy namespace classes, we make it clear
that we are using soon-to-be-deprecated classes. We will then be able to
start removing the legacy classes, one module at a time.
2020-12-03 16:06:14 +01: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
Manjinder Singh
c74b623948 Fixing code-annotations (#25539)
* Fixing code-annotations
2020-11-06 12:52:08 -05:00
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Régis Behmo
4586002956 Import waffle classes from edx_toggles instead of waffle_utils
Those classes were ported to edx_toggles. The imports remain in
waffle_utils.__init__ for backward compatibility.
2020-11-03 19:25:37 +01:00
Régis Behmo
2307dff4c9 Deprecate WaffleFlag.override method
This allows us to get rid of waffle_utils' custom WaffleFlag method.
2020-11-03 19:25:37 +01:00
Régis Behmo
a4ba4ae45e Clarify many feature toggle annotations across all applications 2020-09-16 15:20:43 +02:00
Régis Behmo
0c3bc12582 Fix deprecated toggle annoation format 2020-09-16 15:16:13 +02:00
Régis Behmo
307457a255 Simplify hack to obtain waffle module names
Instead of going up the stacktrace to find the module names of waffle
flags and switches, we manually pass the module __name__ whenever the
flag is created. This is similar to `logging.getLogger(__name__)`
standard behaviour.

As the waffle classes are used outside of edx-platform, we make the new
module_name argument an optional keyword argument. This will change once
we pull waffle_utils outside of edx-platform.

Note that the module name is normally only required to view the list of
existing waffle flags and switches. The module name should not be
necessary to verify if a flag is enabled. Thus, maybe it would make
sense to create a `add` class methor similar to:

    class WaffleFlag:
        @classmethod
        def add(cls, namespace, flag, module):
            instance = cls(namespace, flag)
            cls._class_instances.add((instance, module))
2020-09-14 09:30:24 +02:00
Aarif
b00804fa4c remove cyclomatic code complexity calculation (#24662) 2020-08-04 23:02:21 +05:00
Aarif
09ac7f9372 remove cyclomatic complexity calculation for python code 2020-08-04 22:10:05 +05:00
Michael Terry
da4dc6c848 AA-278: Add offer html to the course-home API
This is for the frontend-app-learning MFE to consume and show an
alert when offer_html is defined.

I've also tweaked that html a bit to work better in an environment
that doesn't have LMS's exact css.
2020-08-04 09:38:58 -04:00
Alex Dusenbery
f9a5b7790b Upgrade edx-enterprise to 3.4.33 2020-08-03 15:38:31 -04:00
Diane Kaplan
569fb36fee [REV-1205] Add ecommerce event tracking to welcome banner upsell links (#24529) 2020-07-23 13:21:05 -04:00
Robert Raposa
77e490f057 ARCHBOM-1305: remove deprecated flag_undefined_default (#24426)
This is the final step in removing the deprecated
flag_undefined_default as explained by the following ADR:
https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/waffle_utils/docs/decisions/0001-refactor-waffle-flag-default.rst

Notes:

* All uses of flag_undefined_default=False were always
  supposed to have been no-ops.
* All uses of flag_undefined_default=True that are removed
  in this PR have been replaced by migrations in past PRs.
* The temporary metric temp_flag_default_used id no longer
  reporting any data.

ARCHBOM-1305
2020-07-09 09:31:31 -04:00
julianajlk
902f8646ea Update FPD holdback function call order (#24074)
REV-1153
2020-05-28 11:13:11 -04:00
julianajlk
565018bd2e Update FPD holdback to 10% for longitudinal analysis (#24037)
REV-1153
2020-05-26 13:16:40 -04:00
Emma Green
4a9f88b3c1 not sure why we are getting errors here, but they shouldn't stop people checking out 2020-05-13 17:59:01 -04:00