Commit Graph

5629 Commits

Author SHA1 Message Date
Alex Dusenbery
4ad2df083d Ensure that get_enterprise_learner_portal_enabled_message() returns None when there is no associated enterprise customer for the given request. Add unit tests for this function. 2020-09-21 12:47:00 -04:00
Feanil Patel
ddcf31c5ad Merge pull request #25009 from edx/feanil/fix_flaky_test
Fix a flaky test by freezing time in the right spot.
2020-09-21 12:15:28 -04:00
Omar Al-Ithawi
fc0eb71918 Add USER_ACCOUNT_ACTIVATED signal (#23296)
Plugins can listen to USER_ACCOUNT_ACTIVATED signal to perform custom logic.
2020-09-21 09:57:32 -04:00
Ahtisham Shahid
986a448d9e Revert "ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)" (#25025)
This reverts commit ba9ee4e151.

Fixed Style lint issue
2020-09-21 13:48:00 +05:00
Troy Sankey
b111d05149 Merge pull request #25011 from edx/pwnage101/email-optin-treats-course-list-as-override
email opt-in mgmt command: Disable the course lookup if a list is provided
2020-09-18 13:28:28 -04:00
Sid Verma
72b4afe465 Add ADR for content library indexes 2020-09-18 10:25:59 -04:00
Sid Verma
67f3c0343f Simplify and optimize index searching 2020-09-18 10:25:59 -04:00
Sid Verma
f2ed54d72c Add filtering support for list_library_blocks API 2020-09-18 10:25:59 -04:00
Sid Verma
3233fa92d4 Index xblocks in elasticsearch 2020-09-18 10:25:59 -04:00
Sid Verma
735bc412d4 Add elasticsearch tests 2020-09-18 10:25:59 -04:00
Sid Verma
78045115ab Add filtering and search support to library APIs 2020-09-18 10:25:59 -04:00
Tim McCormack
328e790e8a Rename CookieMetricsMiddleware to CookingMonitoringMiddleware
This fixes a misuse of New Relic terminology. Here we are in fact using
custom attributes; custom metrics are a different thing that we may start
using in the future.
2020-09-18 14:25:50 +00:00
Alex Dusenbery
4bb1914ec6 ENT-3367 | Show at most 1 Enterprise Learner Portal dashboard link in the header user-menu. Also, guard against no branding config when getting learner portal data. 2020-09-18 10:23:32 -04: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
Troy Sankey
212d17bbf3 email opt-in mgmt command: Disable the course lookup if a list is provided
This is cherry-picked verbatim from
zafft/analytics-exporter-settings-hotfix (#18530).  I'm fear that
without merging these changes upstream, a larger set of courses will be
consdiered for processing, and that would alter the behavior of the
analytics-email-optin-* jobs.
2020-09-17 17:34:24 -04:00
Feanil Patel
90bc2ffdab Merge pull request #24815 from regisb/regisb/document-feature-toggles
[BD-21] Document feature toggles
2020-09-17 13:46:46 -04:00
Feanil Patel
5e56621aeb Fix a flaky test by freezing time in the right spot.
The test was only freezing time for the first two calls to password reset
which meant that sometimes the last call to reset password was far enough
in the future to not be affected by the rate limiting.

We move the freeze_time context manager to outside of all the password
reset calls to make things more reliable.
2020-09-17 13:43:30 -04:00
Michael Terry
8e1ea3e536 Merge pull request #24987 from edx/mikix/subsection-ora-cutoff
AA-335: Avoid due dates for ORA subsections
2020-09-17 10:57:56 -04:00
Michael Terry
0c9efb793c AA-335: Avoid due dates for ORA subsections
Previously, we'd been avoiding PLS due dates for ORA *sections*.
That is, if a section had only ORA content, we'd not set a PLS
due date for anything in that section.

If any content in that section had non-ORA graded content however,
we would set dates on all subsections, including the ORA one.

This resulted in some ORA-only subsections showing up twice on the
dates tab. So this patch simply brings down the ORA-only check
to a *subsection* level, not a section one.
2020-09-17 10:10:06 -04:00
HammadAhmadWaqas
30edb7ef50 catch signal UNENROLL_DONE signal and call /api/v2/enterprise/coupons/create_refunded_voucher/ API. 2020-09-17 15:39:13 +05:00
Régis Behmo
a4ba4ae45e Clarify many feature toggle annotations across all applications 2020-09-16 15:20:43 +02:00
Régis Behmo
fee9279e6c Fix unused imports in video pipeline 2020-09-16 15:19:16 +02:00
Régis Behmo
e4fc7e86b5 Fix indentation of waffle flag annotation 2020-09-16 15:19:16 +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
0c3bc12582 Fix deprecated toggle annoation format 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
d34aa1c643 Document lms/djangoapps/courseware feature toggles 2020-09-16 15:15:46 +02:00
Régis Behmo
39a3770a6f Document openedx/core/djangoapps/video_pipeline feature toggles 2020-09-16 15:14:56 +02:00
Régis Behmo
8aa049be75 Document openedx/core/djangoapps/video_config feature toggles 2020-09-16 15:14:56 +02:00
Régis Behmo
c8892d321b Document openedx/core/djangoapps/user_authn feature toggles 2020-09-16 15:14:56 +02:00
stvn
e7fbb3d933 Merge PR #24749 open-craft/shimulch/styling-update-to-existing-course-content-search-page
* Commits:
  Styling Update to Existing Course Content Search Page
2020-09-15 10:10:07 -07:00
Feanil Patel
d264490fb7 Merge pull request #24952 from regisb/regisb/simplify-waffle-module-name
[BD-21] Simplify hack to obtain waffle module names
2020-09-15 11:19:43 -04:00
Shimul Chowdhury
9aee2a5e89 Styling Update to Existing Course Content Search Page 2020-09-15 16:11:16 +06:00
Mike OConnell
11e4cab622 Added remote IP to logging (#24932)
* Add remote IP to logging config

Add a new filter to get the remote IP for the current
request and include it in log statements

SEG-34

* Added line for formatting

Added line for formatting

SEG-34
2020-09-14 11:22:11 -04: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
Troy Sankey
ef7ec74a49 Merge pull request #24946 from edx/pwnage101/DENG-379-no-crash-on-missing-themes-dir
Changes that enable the modernization of Analytics Exporter
2020-09-11 11:14:29 -04:00
Florian Haas
125b502c79 Fix documentation for ENABLE_LEARNER_RECORDS
Commit 3222d3fd13 (LEARNER-5987)
introduced the ENABLE_LEARNER_RECORDS site configuration flag, but
incorrectly referred to it as ENABLE_CREDENTIALS_RECORDS in the
documentation for the credentials service.

Fix the reference with the correct flag name.
2020-09-11 14:12:18 +02:00
Troy Sankey
e8ea73c652 Do not crash unexpectedly when looking for a file.
This function to search for themes dirs needs to be able to recover
gracefully if the base dirs do not exist.  This is NOT the app check,
it's just a themes collector---the app check will *properly* report an
error if the base dir does not exist.

DENG-379
2020-09-10 21:17:18 -04:00
Matt Tuchfarber
a391344dca Remove deprecated paid_modes param in programs
paid_modes was replaced with paid_modes_only. Now that methods using
this function are changed, we can remove the param.
2020-09-10 10:37:30 -04:00
Feanil Patel
0113633369 Merge pull request #24818 from edly-io/zubair/BD-18-optimize-paver-settings-call
[BD-18] Optimize paver settings call
2020-09-10 10:19:22 -04:00
uzairr
c68155f76f Modify the api response
Update the api response so that it cannot contain the response
in the form of HTML which may prove vulnerable for MFE in future.

VAN-14
2020-09-10 12:39:09 +05:00
Matt Tuchfarber
3cea568719 Fix variable reuse bug in program enrollment check
Reuse of the variable paid_modes was causing the code to follow an
incorrect path. Changed the filtering version of the variable to
paid_modes_only. Had to keep both variables temporarily until I can fix
plugin code that uses this API.
2020-09-09 14:05:48 -04:00
Zainab Amir
8f83d10528 Add Mechanism to enable logistration MFE (#24908)
Add a toggle that in conjuction with REDIRECT_TO_ACCOUNT_MICROFRONTEND
enables or disables logistration MFE.

VAN-3
2020-09-08 17:46:50 +05:00
Matt Tuchfarber
1c8d90ae4f Merge pull request #24917 from edx/tuchfarber/add_debug_messaging_programs
Add debugging for programs enrollment
2020-09-04 14:27:16 -04:00
Matt Tuchfarber
f90bcabcd7 Add debugging for programs enrollment 2020-09-04 12:05:06 -04:00
Dillon Dumesnil
76034047eb Merge pull request #24891 from edx/ddumesnil/fix-reset-dates-banner-aa-318
AA-318: Update PLS CTA to use the dates_banner_should_display
2020-09-03 10:03:21 -07:00
Dillon Dumesnil
767af37d3d AA-318: Update PLS CTA to use the dates_banner_should_display
This will make it so audit and verified learners will not see the CTA
after due dates. Previously it would only check if the xblock is
self_paced and there are still attempts and it's past due
2020-09-03 10:50:44 -04:00