Commit Graph

1052 Commits

Author SHA1 Message Date
Sarina Canelake
7fd5b24dfd Merge pull request #25617 from edx/sarina/naive-datetimes
Squashing some naive datetime warnings
2020-11-20 09:02:57 -05:00
Robert Raposa
9ae82024fc Merge pull request #25584 from edx/robrap/ARCHBOM-1260-code-owner-decorator
ARCHBOM-1260: set code_owner for celery tasks
2020-11-17 19:32:59 -05:00
sarina
7a575843ca Squashing some naive datetime warnings 2020-11-17 18:15:58 -05:00
Robert Raposa
8eef18710d set code_owner for celery tasks
ARCHBOM-1260

Co-authored-by: Tim McCormack <tmccormack@edx.org>
2020-11-17 15:33:33 -05:00
sarina
b8bd4f6310 DEPR-48 Remove CourseTalk integration & Course Reviews functionality 2020-11-17 13:11:54 -05:00
Michael Terry
40fbef4af2 AA-289: rewrite how course updates behave when dismissed
Previously, dismissing one course update would disable all future
updates. But that feels a bit limiting.

Instead, these are the new rules:
- If the newest update has not been dismissed yet, it gets displayed.
- If the newest update has been dismissed, we display nothing.
- Editing the newest update will cause it to be displayed again.
- New updates get displayed, even if previous updates were dismissed.

This commit includes a light refactoring and addition of some utility
methods to help manage the above.

It also notes that the learning MFE does not use the "latest_update"
waffle option, which controls the labeling of the update message.
2020-11-12 09:39:15 -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
Manjinder Singh
c74b623948 Fixing code-annotations (#25539)
* Fixing code-annotations
2020-11-06 12:52:08 -05:00
Michael Terry
f2d4e0ccec AA-408: Treat group_access as inheritable in gating transformer
ContentTypeGateTransformer was not considering parent values of
'group_access' when providing its own default value for it.

Also fix a few minor bugs around the place.
2020-11-05 15:27:46 -05:00
Muhammad Ammar
dd732c4f68 Merge pull request #25514 from edx/ammar/update-dsc-cache-key
refactor dsc logs to avoid splunk noise
2020-11-04 19:17:26 +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
muhammad-ammar
f0aae8ecf5 * update DSC needed cache key to invalidate existing stored values
* refactor DSC logs

ENT-3494
2020-11-04 17:52:02 +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
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
muhammad-ammar
2cc0688e1c convert enterprise customer uuid to str before comparison
ENT-3494
2020-11-03 00:20:05 +05:00
muhammad-ammar
5f04fd35a0 more logs for data sharing consent
ENT-3494
2020-11-02 20:24:44 +05:00
Dillon Dumesnil
6b16fcd9b3 AA-393: Update Next Section Logic
Inside content_highlights.py, we had code to calculate due dates
for when there isn't graded content, but we could only reach that
code path if the user had an assignment with a due date at the
target date. Now we will check for all learners who could be in
range of having an update and let the code in content_highlights.py
decide if a highlight should be sent
2020-10-30 15:02:03 -04: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
muhammad-ammar
b8a315933f add log to get insights about why data sharing consent is not required 2020-10-29 20:57:27 +05:00
Muhammad Ammar
1d28f5d60f Merge pull request #25447 from edx/ammar/enterprise-customer-session-storage
update logic to store learner's enterprise customer info in request session
2020-10-27 19:35:37 +05:00
Michael Terry
94e075c440 Merge pull request #25439 from edx/mikix/verified-mode-mfe
AA-197: Provide cert upgrade info to learning MFE
2020-10-27 10:34:38 -04:00
muhammad-ammar
5adf9fdd8b store a learners enterprise customer info into request session only if
user is authenticated. This is needed to avoid storing `None` as
enterprise customer info in request session.
2020-10-27 19:12:01 +05: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
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
Mike OConnell
0dc494360d Correcting error with undeclared local (#25422)
Previous rollback introduced this error while resolving merge
conflicts. Line declaring the local variable was accidentally
omitted.

ENT-3494
2020-10-23 12:48:59 -04:00
Mike OConnell
64ee4a8972 Rolling back previous changes (#25418)
Rolling back previous changes after unexpected behavior
when testing in stage.

ENT-3494
2020-10-23 07:09:09 -04:00
Mike OConnell
b4f7647b40 Moco/ent 3494 (#25408)
* Added logging statements around DSC

Added logging statements to help diagnose failures in presenting
Data Sharing Consent views to learners who have not consented to
data sharing, but their enterprise requires it

ENT-3494

* Yet more logging statements around DSC

Added more logging statements to help diagnose failures in presenting
Data Sharing Consent views to learners who have not consented to
data sharing, but their enterprise requires it. These new logs provide
further detail into the call to the enterprise API to check for consent.

This changelist slightly changes the logic to determine if a consent
check is needed. The changes involve breaking out the conditions of the
iterated checks on the learner details to allow for more granular logging.

ENT-3494
2020-10-22 21:33:16 -04:00
Saleem Latif
43d0a67fa1 Request for field to specify locale in Django enterprise accounts 2020-10-20 17:56:22 +05:00
Jeff Chaves
d25d4038fd ENT-3460: updating usage of EnterpriseCustomerBrandingConfiguration, edx-enterprise 3.8.42 (#25376)
* bumping enterprise version

* adding pillow constraint

* updating usage of EnterpriseCustomerBrandingConfiguration
2020-10-19 16:42:16 -04:00
Alex Dusenbery
98719faca8 Revert "bumping enterprise version to 3.8.35 (#25342)"
This reverts commit 5bf54d696a.
2020-10-14 19:56:55 -04:00
Matthew Piatetsky
651a020fcc Merge pull request #25151 from edx/REV-1510
[REV-1510] Gate sequence if it is a timed exam and contains content type gated problems
2020-10-14 16:54:39 -04:00
Jeff Chaves
5bf54d696a bumping enterprise version to 3.8.35 (#25342)
* bumping enterprise version

* fixing platform tests broken by branding config changes
2020-10-14 14:42:39 -04:00
Matthew Piatetsky
2153057142 Add XBlock service for content type gating
This is used in this commit to check if a timed exam contains any problems that have been gated by content type gating
REV-1510
2020-10-14 08:02:51 -04:00
Mike OConnell
fa435e697b Added logging statements around DSC (#25320)
Added logging statements to help diagnose failures in presenting
Data Sharing Consent views to learners who have not consented to
data sharing, but their enterprise requires it

ENT-3494
2020-10-12 10:42:43 -04:00
Calen Pennington
4456269508 Merge pull request #25305 from cpennington/always-reference-task-packages-absolutely
Always import task packages by absolute paths
2020-10-08 14:41:00 -04:00
Calen Pennington
2714da86a4 Always import task packages by absolute paths
This follows the recommendation in the Celery documentation so as to
not confuse automatic task name generation.

Docs: https://docs.celeryproject.org/en/stable/userguide/tasks.html#automatic-naming-and-relative-imports
2020-10-08 14:10:17 -04:00
HammadAhmadWaqas
215d004930 Handle Client Error for the API called in refund_order_voucher signal. 2020-10-07 11:28:26 +05:00
Alex Dusenbery
3292104470 enterprise_customer_uuid_for_request() should not return a __CACHE_MISS__. 2020-09-29 12:03:33 -04:00
Tim McCormack
5b331b2d4d Merge branch 'master' into timmc/misc-metric-attribute
# Conflicts:
#	cms/envs/common.py
#	lms/envs/common.py
2020-09-28 13:56:08 +00:00
Tim McCormack
f29e418264 Revert "Revert "ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)" (#25025)" (#25055)
This reverts commit 986a448d9e.
2020-09-28 13:53:57 +00:00
Calen Pennington
dc884c2166 Fix a test that relied on incorrect mocking.
We fully hide authorization denied blocks from the mobile app (until the
latest version of the mobile app rolls out).
2020-09-23 10:05:37 -04: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
Alex Dusenbery
de277ce46b Prevent an unbound local variable exception in enterprise_support.api. Add more unit tests for same. 2020-09-22 11:15:17 -04:00
Hammad Ahmad Waqas
3b23a9b227 Merge pull request #25003 from edx/hammad/ENT-3337
catch signal UNENROLL_DONE signal and call /api/v2/enterprise/coupons…
2020-09-22 19:51:35 +05:00
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
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
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