This attribute is already deprecated for XBlocks in favour of directly
retrieving it like `block.scope_ids.usage_id.context_key`.
This commit also removes some redundant logging code which was omitted in the
Datadog removal in #19420.
* feat: remove upgrade banner from mobile upgrade banner
After investigating the best way to keep a user logged in, and solve rendering issues, we decided to show the unit page in a full webview within the app. However, in order to comply with app store guidelines, we need to remove the upgrade banner from this page.
LEARNER-8493
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.
* 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
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
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.
- 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.
The content highlights code assumed due dates existed on all
sections. But we recently broke that assumption. So now we
recalculate the spread of sections across the expected duration
ourselves rather than rely on due dates.
This adds request caching to the following places:
* course expiration wrapper (displayed in Units)
* offer banner generation (displayed in Units)
* get_enrollment
* user_by_anonymous_id
* youtube_disabled_for_course
On a sample course with edx-val enabled, this reduced the queries
for a large sequence from 450 to 155.
* INCR-236
* Run python-modernize on openedx/features/course_duration_limits and
verify that the change makes sense and tests does not break
* Remove redundant import and update docstring style
Moves banner into the content instead of at the top. Adds a course
expiration fragment to the course home page, the content, the progress
page, and the discussion page.