Commit Graph

519 Commits

Author SHA1 Message Date
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
16ce16e85e Deprecate ExperimentWaffleFlag.override method
This is part of a removal of the many override methods of toggle
flag/namespace classes. This allows us to remove imports of test modules
from production code.
2020-11-03 19:25:37 +01:00
Régis Behmo
474da0c5a5 Refactor WaffleFlag and WaffleFlagNamespace internal API
This simplifies the internals of the waffle flag classes in order to
better move them to edx-toggles later.
2020-10-29 22:59:52 +01:00
Régis Behmo
13a70fcaa6 Deprecate COURSE_OUTLINE_PAGE_FLAG and UNIFIED_COURSE_TAB_FLAG
These flags are deprecated in favor or the DISABLE_* equivalent.
This allows us to get rid of the DefaultTrueWaffleNamespace class.
2020-10-27 10:20:41 +01:00
Dillon Dumesnil
8bb88df35f Revert "AA-51: Adds in 'Up next' banner to course home" 2020-10-23 11:05:27 -07:00
Saleem Latif
43d0a67fa1 Request for field to specify locale in Django enterprise accounts 2020-10-20 17:56:22 +05:00
Tim McCormack
c71c9d4984 Replace s/metric/attribute/g in waffle_utils and in caller
This changes:

- `WAFFLE_FLAG_CUSTOM_METRICS`
- `WaffleFlagNamespace._set_waffle_flag_metric`
- `_get_waffle_flag_custom_metrics_set` and some other unreferenced
  internals
2020-09-22 23:19:23 +00:00
Tim McCormack
ba9ee4e151 ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)
This uses the new names introduced in edx-django-utils
3.8.0 (edx/edx-django-utils#59), which we're already using, as
well as updating a few other locations where we incorrectly refer
to New Relic custom metrics instead of custom attributes.

Includes a couple of unrelated lint fixes in a file I modified.
2020-09-18 13:33:50 +00: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
7dc460d50a Wrap toggle annotation lines with multiline comments
This takes advantage of the new multiline annotation format with
single-line comment prefix, from code-annotations.
2020-09-16 15:16:12 +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
Carla Duarte
6392722e0e AA-125: Add Course Goals to MFE API 2020-08-28 10:31:59 -04:00
Nick
10ac2780de Merge pull request #24733 from edx/ndalfonso/AA-287-cta-events
AA-287 cta events
2020-08-12 09:37:13 -04:00
Manjinder Singh
c76ed6ae45 Extracting plugin app from edx-platform (#24678)
* Moving plugins infrastructure to edx-django-utils
This PR extracts the code that enables plugins in edx-platform and puts it in edx-django-utils. This is done to allow other IDAS to add plugin functionality.
2020-08-12 07:48:53 -04:00
Nicholas D'Alfonso
0211a2b0ff AA-287 cta events 2020-08-10 18:00:13 -04:00
Calen Pennington
f9619d6cad Add a pluggable CallToAction service for XBlocks
This also has an initial use case for Personalized Learner Schedules
to add CTAs to capa and vertical blocks to allow users to shift their
course deadlines.
2020-08-06 14:38:26 -04:00
Nicholas D'Alfonso
754f231f68 AA-283 mobile reset dates endpoint
- add has_ended to endpoint
2020-08-05 11:53:59 -04: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
morenol
5949c17dda [BD-10] Remove uses bootstrap method (#24535) 2020-07-28 08:57:42 -04:00
morenol
68d1c7f78c [BD-10] Remove _uses_pattern_library property from EdxFragmentViews (#24536) 2020-07-27 12:01:40 -04:00
Dillon Dumesnil
de8ef23d24 Merge pull request #24595 from edx/ddumesnil/aa-234
AA-234: Switch link in dates widget if Course Home MFE is active
2020-07-24 08:30:43 -07:00
Dillon Dumesnil
39b66dcdbb AA-234: Switch link in dates widget if Course Home MFE is active 2020-07-24 07:54:21 -07:00
Diane Kaplan
44aa0a847c [REV-1205] Add ecommerce event tracking to 4 course home links (#24526) 2020-07-24 07:14:24 -04:00
Diane Kaplan
f96a98d76f [REV-1205] Add ecommerce event tracking to course sock and track selection upsell links (#24562) 2020-07-23 14:29:27 -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
Diane Kaplan
0b2a9c7010 [REV-1205] Add ecommerce event tracking to FBE (feature based enrollment) upsell links (#24528) 2020-07-23 11:40:22 -04:00
David Ormsbee
96ea413a07 Make Blocks API and Dates mobile views non-atomic.
These are expensive, read-only web requests. Unfortunately,
middleware adds writes, and we currently run with view-level
transactions enabled by default. Holding those long transactions
open has caused extra load on the database and been our largest
sources of django.db.utils:OperationError exceptions.

This has been particularly noticeable as we start deploying the
new Courseware MFE, which uses the BlocksInCourseView more
frequently.
2020-07-22 17:10:11 -04:00
Calen Pennington
3e47170470 Revert "Merge pull request #24547 from edx/revert-24503-ora2-dates-reprise"
This reverts commit 21d1f3d5d1, reversing
changes made to 19f82258aa.
2020-07-21 11:54:06 -04:00
Diane Kaplan
72dd144476 [REV-1205] add event tracking for PLS upsell links (#24522)
Co-authored-by: Diane Kaplan <dkaplan@edx.org>
2020-07-21 10:00:39 -04:00
Dillon Dumesnil
75db9b2534 Revert "Ora2 dates reprise" 2020-07-20 09:55:02 -07:00
Calen Pennington
03ba0b8331 Revert "Merge pull request #24501 from edx/revert-24421-ora2-dates"
This reverts commit fccb52b6c8, reversing
changes made to a0bc37866d.
2020-07-15 14:29:11 -04:00
Dillon Dumesnil
2601975fd3 Revert "AA-223 - Add ORA2 dates to the dates page" 2020-07-15 10:13:00 -07:00
Calen Pennington
d6bf54b576 Add ORA2 dates to the dates page
ORA2 (openassessment) problems have multiple dates associated with are
not bound to the `due` date that is modified by Personalized Learner
Schedules. We expose the ORA2 dates separately in the dates page
so that learners aren't surprised by the differing deadlines.

[AA-223]
2020-07-15 09:52:22 -04:00
Michael Terry
f9d379203e Merge pull request #24391 from edx/mikix/assignments-complete
AA-225: Only consider scored items for past due assignments
2020-07-14 15:28:52 -04:00
Michael Terry
939f268da8 AA-225: Only consider scored items for past due assignments
When considering if an assignment is past due for the dates tab,
only look at the scored and graded units in the subsection (i.e.
ignore reading and video units).

This still leaves the "complete" field alone -- i.e. those
subsections will still be left incomplete generally. But for
assignment-focused tasks, they will instead be considered complete.
2020-07-14 15:04:19 -04:00
Carla Duarte
61228f34cf AA-187: Mobile API for course deadline data 2020-07-14 12:29:08 -04:00
Dillon Dumesnil
b479d511b7 Merge pull request #24424 from edx/ddumesnil/aa-226
AA-226: Adding Authentication classes to endpoints for mobile use
2020-07-13 08:19:52 -07:00
Dillon Dumesnil
be346499da AA-219: Dates Tab behavior improvements
This switches the Dates Tab to be an enrolled tab allowing only
enrolled learners to view. Additionally, it will now redirect
logged out learners to the login page if they hit the Dates Tab directly.
2020-07-10 07:08:07 -07: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
Dillon Dumesnil
f0b4c75289 AA-226: Adding Authentication classes to endpoints for mobile use
The class BearerAuthenticationAllowInactiveUser is needed for the
mobile app to authenticate. The other Auth classes are to support
the standard work flows.
2020-07-08 10:06:58 -07:00
Robert Raposa
10ab63995a remove temporary USE_DEFAULT_TRUE_NAMESPACE (#24404)
Once USE_DEFAULT_TRUE_NAMESPACE is fully rolled out
and proves to return True where we wish, we can
remove this temporary roll-out flag introduced in:
https://github.com/edx/edx-platform/pull/24322

ARCHBOM-1316
2020-07-07 15:07:59 -04:00
Aura Milena Alba
6026a98e11 Remove pattern library in course_home.py (#24157)
[BD-10] [DEPR-83][DEPR-81] Remove pattern library in course_home.py
2020-07-07 11:23:22 -04:00
Robert Raposa
7f22041fc1 ARCHBOM-1316: always enable some course_experience flags (#24322)
In order to remove the deprecated flag_undefined_default=True
argument, this commit updates the following flags to always be
enabled using a new temporary class:

- course_experience.course_outline_page
- course_experience.unified_course_tab

Adds a temporary setting `USE_DEFAULT_TRUE_NAMESPACE`,
to enable a monitored rollout of this change.

TNL-7061 is the ticket where these flags will actually be
removed. This requires more careful work including removing
all dead code, and potentially refactoring tests that were
testing shared functionality, but only when the flag was
False.

ARCHBOM-1316
2020-07-02 12:00:23 -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
Adam Butterworth
c37f73c40e Merge pull request #24158 from eduNEXT/lmm/course_sock_standalone
[BD-10] Remove unused course sock URL.
2020-06-18 09:16:26 -04:00