Commit Graph

89 Commits

Author SHA1 Message Date
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
Jawayria
1caae59c1a chore: Applied lint-amnesty on lms/djangoapps/{edxnotes, experiments} 2021-12-20 16:05:02 +05:00
Chris Deery
c4cedbae38 fix: [AA-950] Change coupon flag from WaffleFlag to CourseWaffleFlag (#28623)
Replacing the streak_celebration.discount_experiment_AA759 Waffle flag with
courseware.streak_discount_enabled CourseWaffleFlag

https://openedx.atlassian.net/browse/AA-950

Co-authored-by: cdeery <cdeery@edx.edu>
2021-09-02 08:32:56 -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
Matthew Piatetsky
c2d291781d update name of flag in bucketing check 2021-05-26 09:24:03 -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
Jawayria
bd08f0d755 BOM-2352: Removed unused imports from lms/djangoapps/{email_marketing, experiments} 2021-02-22 21:47:23 +05:00
M. Zulqarnain
16f600910b pyupgrade on lms edxnotes,email_marketing,experiments apps (#26531) 2021-02-22 15:42:32 +05:00
M. Zulqarnain
c9c14ee6fc BOM-2279 : Pylint amnesty for edxnotes,email_marketing, and experiments (#26274)
* lint amnesty for edxnotes,email_marketing, and experiments
2021-02-03 18:15:26 +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
Matthew Piatetsky
007d4b388f Add display name field to user metadata 2020-11-18 14:06:09 -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
Diane Kaplan
103ec9e0dc REV-1564: add user-metadata API, for use by Optimizely experiments (#25450) 2020-11-04 11:21:48 -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
Michael Terry
a4bd5a7ec9 AA-197: Provide cert upgrade info to learning MFE
Specifically, pass the MFE the audit access expiration date and
let it know when the upgrade deadline has passed, by not passing
any verified mode information along.
2020-10-27 09:05:12 -04:00
Régis Behmo
a4ba4ae45e Clarify many feature toggle annotations across all applications 2020-09-16 15:20:43 +02:00
Régis Behmo
7d93715880 Rename toggle_expiration_date to toggle_target_removal_date
This is part of the changes brought by code-annotations==0.7.0
2020-09-16 15:19:16 +02:00
Régis Behmo
98a13d6a7e Remove deprecated toggle_status annotation
This annotation is deprecated since code-annotations==0.7.0
2020-09-16 15:19:15 +02:00
Régis Behmo
d1f9e769d0 Simplify the toggle_use_case annotation
Since code-annotations==0.7.0, incremental_release, launch_date,
monitored_rollout, graceful_degradation, beta_testing are all considered
as "temporary" use cases.
2020-09-16 15:16:13 +02:00
Régis Behmo
ab0e21455a Get rid of the toggle_category annotation, now deprecated
Since code-annotations==0.7.0, this annotation is not used anymore.
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
JJ
36e07f6be8 [REV-1205] Add ecommerce event tracking to course dashboard upgrade button (#24338)
Create a Javascript function to log upsell events to & attach the eventing to the course dashboard upsell button. The revenue squad is looking for more insight into which buttons users are clicking to get to the checkout page.
2020-07-09 09:28:03 -04: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
mariajgrimaldi
c23071defc Fix DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead (#23909)
I wanted to make a byte-sized contribution but there were no Jira tickets so we decided, thanks to a conversation with @jmbowman through the Open Edx Community #incr (Slack) channel, to collaborate in the elimination of warnings listed in the Warnings Report at https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/warning_5freport_5fall_2ehtml/

This PR contributes to the elimination of deprecation warnings, specifically the one mentioned above and reported in the Warnings Report.

Changed logger.warn to logger.warning in the following files:

    lms/djangoapps/experiments/utils.py

    lms/djangoapps/lti_provider/outcomes.py

    lms/djangoapps/courseware/module_render.py

This warning occurs due to deprecation in python 3.4+: https://docs.python.org/3.5/library/logging.html#logging.Logger.warning
2020-05-08 12:15:59 -04:00
Simon Chen
262574b815 Move all the upgrade display logic into courseware.utils 2020-05-05 17:54:22 -04:00
Dillon Dumesnil
fe91d63a0b Show relevant dates in course dates sidebar
This includes (at least) upcoming assignments, FBE access
expiration, and course end date.

AA-4
2020-02-18 08:42:15 -05:00
Dillon Dumesnil
00fe1495b4 Revert commits for AA-4 2020-02-10 12:10:59 -05:00
Dillon Dumesnil
23486a560d Show relevant dates in course dates sidebar
This includes (at least) upcoming assignments, FBE access
expiration, and course end date.

AA-4
2020-02-06 16:01:46 -05:00
hunytalk
73aae081c3 Remove null, blank from start field in Schedules 2020-01-22 18:10:33 +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
Awais Qureshi
5f6b2db31b BOM-1111
Updating User.is_authenticated and User.is_anonymous as properties
2019-12-23 17:51:27 +05:00
Calen Pennington
47b8dfae75 Merge pull request #22156 from cpennington/expose-course-duration
Expose user course duration in the user metadata
2019-10-25 13:49:14 -04:00
julianajlk
73564a04b0 return course_upgrade_deadline even if dynamic deadline is null (#22150)
REV-943
2019-10-25 13:20:40 -04:00
Calen Pennington
d92dcb28bb Expose user course duration in the user metadata 2019-10-25 10:02:55 -04:00
Calen Pennington
7ceb0e30fa Mark course outline with graded and scored status in the DOM so that we can run optimizely code on them 2019-10-17 12:14:49 -04:00
julianajlk
4d3d6c0178 add dynamic_upgrade_deadline to user-metadata (#22046)
REV-943

* added dynamic and course_upgrade_deadline to user-metadata
2019-10-16 11:07:32 -04:00
Stu Young
7c6c166e73 fix toggle implementation annotations (#21802)
fix toggle implementation annotations and rename waffle flags
2019-09-27 11:45:40 -04:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Stu Young
13bbf85257 clean up toggle annotations (#21673)
clean up toggle annotations and lint when running feature toggle report
2019-09-17 11:11:20 -04:00
Calen Pennington
8b4b5a4547 Move stable_bucketing into its own library to minimize circular dependencies 2019-07-03 15:03:31 -04:00
Calen Pennington
39efc54a27 Merge pull request #20884 from cpennington/discount-no-previous-purchase
REVEM-289: Discount no previous purchase
2019-06-25 17:12:19 -04:00
Calen Pennington
f07f2121ba Make has_non_audit_enrollments exclude entitlements 2019-06-25 16:44:36 -04:00
Calen Pennington
388fac3b9c Make has_non_audit_enrollments exclude honor courses correctly 2019-06-25 16:44:36 -04:00
Christie Rice
eeb265e276 REVEM-376 Disable waffle flags by default (#20880) 2019-06-24 11:31:10 -04:00
Christie Rice
b8401beaae REVEM-374 Remove course prices from dashboard (#20856) 2019-06-24 08:56:05 -04:00
Christie Rice
4aba1b21a1 REVEM-372 Remove add_audit_deadline and deprecated_metadata waffle flags (#20769) 2019-06-11 09:05:06 -04:00
Stu Young
d5ee03e81d INCR-258 Run python-modernize on lms/djangoapps/experiments (#20560)
* run python modernize

* run isort

* Fix quality
2019-05-21 11:48:28 -04:00
Christie Rice
036375322a REVEM-350 Consolidate code for user-metadata and dashboard-metadata 2019-05-14 09:38:03 -04:00
Christie Rice
6db32a36bc REVEM-239 Add audit access expiration deadline to user-metadata 2019-05-08 08:53:21 -04:00