* fix: include isLearnerPortalEnabled as part of EnterpriseDashboardSerializer
* chore: test serializer changes
---------
Co-authored-by: Hamzah Ullah <hamzahullah@yahoo.com>
After moving the recommendations code from learner_home to learner_recommendations we need to remove the legacy code.
Point the learner dashboard recommendations API from legacy to new endpoint.
VAN-1310
* fix: fix credit serialization
Was accidentally indexing based on course ID string instead of course ID
* docs: update a docstring
Programs are weird in that they index on string of course ID instead of
course ID. Highlighting this info through the docstring
* test: add more checks in serialization tests
* feat: add experimental redirect for Learner Home
As a request by Data, this system repeatably groups users into
experiment groups. Based on end of user ID, users that fall beneath a
threshold (LEARNER_HOME_MFE_REDIRECT_PERCENTAGE) will be redirected to
the Learner Home experience, if enabled. Otherwise, learners will see
the legacy dashboard.
* feat: add learner home redirect percentage setting
Adds LEARNER_HOME_MFE_REDIRECT_PERCENTAGE to common settings to avoid a
failed lookup. Can be overridden through config.
* refactor: change test to not leak implementation
* refactor: remove old profiling function
* refactor: move mocks into separate directory
* refactor: move recommendations code into a new dir
* docs: docstring consistency and branding updates
* docs: add ADR for core versus experimental code
If a user has a certificate in a deleted course, an issue with how the
course is loaded from the cache can cause an exception that breaks our
code. This adds a wrapper to fail gracefully and log the exception for
future tracking / investigation.
It is possible to have an entitlement with no available course runs. In
this case, the entitlement is filtered out by the view logic but the
residual, bad pesudo-session mapping can cause breaks if we don't handle
for this case.
* refactor: make _credit_status function public
This allows for reuse in the new learner home
* feat: add credit to learner home serializers
* feat: get credit statuses for learner home
* fix: add missing permission/auth classes to init
* fix: add missing permission class
Django was complaining about adding JWT auth without the
NotJwtRestrictedApplication class which it would add automatically. Add
the class to remove that warning.
* style: use black / isort to fix import ordering
* refactor: remove dev logging
* style: run black
* refactor: move masquerade check into utils
* style: remove unnecessary assignment
* style: update dependency orderings
* refactor: add function tracing for perf testing
* refactor: move grade data fetching out of serializer
This allows us to separately profile the collection of grade data
* fix: add missing requires_context metadata
* refactor: split out serialization for profiling
* refactor: remove resume url checks for performance
Existing "get resume urls" loads the course structure to verify the last
completed block actually exists. This is a potentially very expensive
operation, especially for users with many enrollments. This isn't a huge
issue since Learning MFE already has a fallback behavior for this case.
* refactor: remove now-unnecessary serializer check
Old behavior passed an empty string for missing resume URL and
serializer would cast to None. Instead, update simply passes through
None for missing resume url
* style: update dependency ordering
* style: run black on some more files
* feat: add social share settings
* docs: add social share settings to mock
* feat: add social brand
* test: added tests for social share settings
Co-authored-by: jansenk <jkantor@edx.org>
Had previously expected use_ecommerce_payment_flow which we forgot to
pass as part of context. Instead, simplify to infer from
ecommerce_payment_page (which will be None if the ecommerce flow is
disabled).