Commit Graph

37 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
jajjibhai008
fa70214578 feat: add hook to modify courserun data for executive education courses 2023-08-28 11:56:23 +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
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
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
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
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
Zainab Amir
4b5f4f1eff feat: add serializer for recommendations api (#31270) 2022-11-08 17:05:28 -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
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
Jansen Kantor
4cd92ec12b fix: remove psudosessioncourseserializer as we now have access to courseoverviews (#31187) 2022-10-21 10:08:14 -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
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
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
jansenk
9f30fece9a feat: add url param to learner home init to allow masquerading
feat: username or email

test: add tests for masquerade by email

style: run black

style: fix typos

fix: fix test errors
2022-09-21 11:06:09 -04:00
Nathan Sprenkle
5f1530cd57 feat: learner home get suggested courses (#31004)
* feat: get suggested courses

* style: run black

* docs: update suggested courses mock

* docs: remove cardID from mock

* docs: fix mock course.title to course.courseName

* docs: fix mock course.bannerUrl to bannerImgSrc

* docs: fix mock provider to courseProvider

* docs: remove old mock courseProvider fields

* docs: fix mock "grades" to "gradeData"

* docs: fix mock remove courseRun.lastEnrolled

* docs: fix mock add enrollment.lastEnrolled

* docs: mock remove enrollment.isStarted

* docs: mock fix bad nesting in courseRun

* docs: mock certificates to certificate

* docs: mock remove certificate.isAvailable

* docs: mock remove entitlement.isEntitlement

* docs: mock add entitlement.expirationDate

* docs: mock fix some entitlement inconsistencies

* docs: mock remove entitlement.canViewCourse

* docs: mock nest relatedPrograms under programs

* fix: return null for missing resumeUrl

* test: return null for missing resumeUrl

* refactor: update suggested course fields

* refactor: update related programs fields

* docs: remove entitlement.expirationDate from mock

Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-09-16 14:41:02 -04:00
Jansen Kantor
8162d21566 feat: add related program info to unfulfilled entitlements (#31011) 2022-09-16 10:30:18 -04:00
Leangseu Kim
9530771cad feat: implement related programs for learner home
chore: simplify lms/djangoapps/learner_home/serializers.py

Co-authored-by: Nathan Sprenkle <nsprenkle@users.noreply.github.com>

chore: safety for authoring_organizations
2022-09-14 11:09:05 -04:00
Leangseu Kim
49380a00ec chore: rename hasAccess to coursewareAccess 2022-09-14 09:32:10 -04:00
Nathan Sprenkle
1673b1d3b9 feat: learner home course provider and grade data (#30959)
* feat: get course provider info

* feat: get grade data

* feat: get course provider for entitlements

* style: run black

Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-09-13 12:24:49 -04:00
Jansen Kantor
3b0e7434d0 fix: change serializer key from entitlements to entitlement (#30968) 2022-09-09 09:53:53 -04:00
leangseu-edx
9b7f9a83cc feat: entitlement for learner dash (#30877)
* feat: add course entitlement info to learner home

* feat: add uuid to entitlement serializer

* feat: add enrollURL

* docs: update comment about booleanfield

* fix: code review

* fix: update unfulfilled entitlement static enrollment response data

Co-authored-by: jansenk <jkantor@edx.org>
2022-09-07 15:19:33 -04:00
Jansen Kantor
2f84f71c03 feat: learner home enterprise dash data (#30939)
* feat: learner home enterprise dash data
2022-09-06 14:29:19 -04:00
Nathan Sprenkle
a12243e9b3 feat: learner home contract updates (#30930)
* refactor: update enterprise dashboard data shape

* refactor: remove hasFinished

* refactor: allow enterprise dashboard to be null

* docs: update mock data

* feat: get if an enrollment has unmet prerequisites

* feat: get is staff for course

* feat: get is too early for course

Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-09-06 09:30:46 -04:00
Nathan Sprenkle
05a14f4b17 feat: learner home get certificate info (#30898)
* feat: update certificate serializer

* refactor: move create test enrollment to utils

* feat: get certificate statuses

Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-08-31 14:51:31 -04:00
Nathan Sprenkle
e0199b2199 feat: learner home contract updates (#30871)
* feat: add startDate to course run serializer

* fix: remove unused certificate serializer fields

Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-08-17 16:40:51 -04:00
Nathan Sprenkle
e025463872 feat: Learner Dashboard get enrollments (#30808)
* feat: fill out enrollment serializer

* test: add basic integration tests for enrollments

* feat: get info for user account activation

* test: test integrating user account activation

* feat: get course enrollments

* feat: get course email settings

* feat: add ecommerce info

* feat: add resume urls

* refactor: move learner home to separate app

* refactor: remove course limit

Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-08-11 11:05:07 -04:00