Commit Graph

69 Commits

Author SHA1 Message Date
Mohammad Ahtasham ul Hassan
8f88db2cad feat: add course_run_key to learner home upgrade url (#35461)
* fix: fix learner home URL to have course_run_key
2024-09-20 12:14:47 +05:00
Fateme Khodayari
a5359d2e23 fix: course progress url returned based on course_home_mfe_progress_tab_is_active 2024-06-28 15:58:15 +03:30
Nathan Sprenkle
7037c8d27b feat: remove rollout percentage code for learner home (#34198)
This code allowed us to control rollout but is no longer needed.
2024-02-07 15:27:57 +00:00
jajjibhai008
fa70214578 feat: add hook to modify courserun data for executive education courses 2023-08-28 11:56:23 +05:00
Usama Sadiq
4dea331486 fix: fix django4 deprecation warnings (#32948) 2023-08-16 11:15:17 +05:00
Muhammad Bilal Tahir
962e45196f feat: hook for course hasStarted attribute 2023-08-03 17:00:34 +05:00
Jansen Kantor
4331ee210b fix: learner home serializer key error (#32842)
* fix: allow missing authOrgId

---------

Co-authored-by: Leangseu Kim <lkim@edx.org>
2023-07-26 11:49:51 -04:00
Muhammad Bilal Tahir
85bb5f60d7 feat: enrollment mode and organisation auth id 2023-07-19 14:36:30 +05:00
Mubbshar Anwar
73e32b5156 Revert "Revert "refactor: recommendations code refactoring (#31990)" (#32047)" (#32135)
This reverts commit 3b991e6620.
2023-05-02 11:08:43 +05:00
Adam Stankiewicz
1e8acf49fd fix: include isLearnerPortalEnabled as part of EnterpriseDashboardSerializer (#32142)
* fix: include isLearnerPortalEnabled as part of EnterpriseDashboardSerializer

* chore: test serializer changes

---------

Co-authored-by: Hamzah Ullah <hamzahullah@yahoo.com>
2023-04-28 11:29:37 -04:00
Mubbshar Anwar
3b991e6620 Revert "refactor: recommendations code refactoring (#31990)" (#32047)
This reverts commit 20b1e65c21.
2023-04-11 11:17:29 +05:00
Mubbshar Anwar
20b1e65c21 refactor: recommendations code refactoring (#31990)
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
2023-04-10 15:31:37 +05:00
Syed Sajjad Hussain Shah
7b0b14c703 feat: add masters program restrictions for UT Austin (#31873)
Co-authored-by: Syed Sajjad  Hussain Shah <syed.sajjad@H7FKF7K6XD.local>
2023-03-06 10:31:23 +05:00
Syed Sajjad Hussain Shah
1ef66409c9 feat: add masters program restrictions on recommendations (#31857)
Co-authored-by: Syed Sajjad  Hussain Shah <syed.sajjad@H7FKF7K6XD.local>
2023-03-03 15:31:52 +05:00
Nathan Sprenkle
d305ab8a61 fix: fix credit serialization for Learner Home (#31870)
* 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
2023-03-02 11:53:00 -05:00
Syed Sajjad Hussain Shah
23db2c8a7a feat: add location restrictions to recommendations (#31728)
VAN-1293

Co-authored-by: Syed Sajjad  Hussain Shah <syed.sajjad@H7FKF7K6XD.local>
2023-02-16 15:39:47 +05:00
Syed Sajjad Hussain Shah
284e64d1f1 feat: add eventing to personalized recommendations (#31703)
VAN-1261
2023-02-03 16:40:22 +05:00
Mubbshar Anwar
5e014651cb feat: [VAN-1259] Amplitude course recommendation api for course about page (#31650) 2023-01-31 16:30:54 +05:00
Nathan Sprenkle
f783dce52d feat: Learner Home experimental rollout (#31642)
* 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
2023-01-25 10:59:39 -05:00
Zainab Amir
53815f1d89 feat: refactor recommendations util methods (#31639) 2023-01-25 15:18:17 +05:00
Shafqat Farhan
23d436831b fix: VAN-1247 - Add isControl property in recommendations response and update event properties 2023-01-17 20:54:20 +05:00
Shafqat Farhan
030267f5ee fix: VAN-1223 - Add is_control property to recommendations viewed event 2023-01-10 09:28:08 +05:00
Nathan Sprenkle
df47f9df95 refactor: Split learner home experimental / core functionality (#31498)
* 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
2023-01-09 10:09:13 -05:00
Nathan Sprenkle
c8af55db6f fix: handle exception getting cert statuses (#31490)
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.
2023-01-03 14:57:20 -05:00
Nathan Sprenkle
17d076e8a7 fix: allow for entitlement with no psuedo-sessions (#31464)
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.
2022-12-20 13:18:30 -05:00
Nathan Sprenkle
4c827b5ed5 feat: get credit statuses for Learner Home (#31414)
* 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
2022-12-08 15:22:35 -05:00
Nathan Sprenkle
af050d46cb feat: add enterprise UUID to learner home init data (#31328)
* feat: add enterprise UUID to return object

* style: run black
2022-11-22 12:03:43 -05:00
Syed Sajjad Hussain Shah
9478b5f422 feat: show general recommendations (#31278)
Show general recommendations for
* API failure
* and when no enrollable courses are present

VAN-1158
2022-11-21 10:48:14 +05:00
Zainab Amir
9f5596c0af feat: remove testing logs (#31297) 2022-11-16 14:00:15 +05:00
Nathan Sprenkle
5aea84f1df fix: learner home anon user status fix (#31291)
* 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
2022-11-14 14:48:10 -05:00
Zainab Amir
4b5f4f1eff feat: add serializer for recommendations api (#31270) 2022-11-08 17:05:28 -05:00
Zainab Amir
6a89635aa4 feat: update recommendations api (#31259)
- updated status codes
- for control group return general recommendations

VAN-1154
2022-11-07 15:20:01 +05:00
Nathan Sprenkle
5e7432129f feat: implement missing audit access expired check (#31249) 2022-11-03 13:24:59 -04:00
Jansen Kantor
3adf5eb929 fix: remove unused url from backend response (#31244) 2022-11-03 09:57:17 -04:00
Nathan Sprenkle
178f1541d7 refactor: learner home cleanup (#31240)
* 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
2022-11-02 14:55:03 -04:00
Nathan Sprenkle
bfe6494e9d fix: get audit expiration from correct data source (#31238) 2022-11-01 13:40:02 -04:00
Syed Sajjad Hussain Shah
02568f94dc feat: create new waffle flag for learner home recommendations [VAN-1138] (#31225) 2022-10-31 10:58:02 +05:00
Nathan Sprenkle
64403a4c16 refactor: course resume URL speed enhancements (#31222)
* 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
2022-10-27 16:10:50 -04:00
Nathan Sprenkle
98678536d6 feat: add timers / logs for for profiling learner home (#31210)
* feat: added timer func for profiling learner home

Also involved proxying some imported functions to be able to time.
2022-10-27 10:16:01 -04:00
Nathan Sprenkle
32733e43cc temp: added debug logging to init view (#31204)
Also involved reordering some code into more logical groupings.
2022-10-25 16:21:48 -04:00
Jansen Kantor
4cd92ec12b fix: remove psudosessioncourseserializer as we now have access to courseoverviews (#31187) 2022-10-21 10:08:14 -04:00
Leangseu Kim
602fef2954 feat: add rollout waffle flag for leaner_home_mfe
Create flag learner_home_mfe.enabled

chore: update requested change
2022-10-20 10:54:02 -04:00
Nathan Sprenkle
53b9f4a3a1 feat: learner home social share settings (#31147)
* 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>
2022-10-19 10:11:38 -04:00
Syed Sajjad Hussain Shah
52de7e9066 feat: integrate amplitude API with learner_home frontend [VAN-1124] (#31098) 2022-10-10 12:09:28 +05:00
Nathan Sprenkle
5deeff3da1 fix: update enrollment.canUpgrade (#31122)
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).
2022-10-06 13:20:22 -04:00
Nathan Sprenkle
2f10ba0992 fix: learner home entitlement image fallback (#31107)
* fix: add default for pseudo session image

This keeps the serializer from breaking when image is not present in a
pseudo session.
2022-10-05 15:56:08 -04:00
Leangseu Kim
27006febcd fix: safe wrapper for no program banner image 2022-10-05 14:40:06 -04:00
Nathan Sprenkle
dc5b14b723 fix: fix enrollment.has_started check (#31059)
Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-09-29 10:39:55 -04:00
Nathan Sprenkle
b6bc647e18 fix: fix routing for mock path (#31047)
Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-09-28 11:12:01 -04:00
Nathan Sprenkle
511363ee04 fix: resolve backend issues in learner home (#31041)
* fix: un-null course provider

* fix: update enterprise dashboard URL

* fix: update course thumbnail source

Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-09-27 12:23:19 -04:00