Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Release Notes
=============

Version 0.59.5
--------------

- Fix verified enrollment for program-as-course hierarchy (#3100)
- fix(deps): update dependency cairosvg to v2.9.0 [security] (#3052)
- hide mitxonline logo and offered by (#3097)
- Upgrade Qdrant (#3087)
- feat: add ProgramBundleUpsell to ProgramAsCoursePage (#3092)
- update the client again! (#3094)

Version 0.59.4 (Released March 25, 2026)
--------------

Expand Down
2 changes: 1 addition & 1 deletion frontends/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"ol-test-utilities": "0.0.0"
},
"dependencies": {
"@mitodl/mitxonline-api-axios": "^2026.3.23",
"@mitodl/mitxonline-api-axios": "^2026.3.25",
"@tanstack/react-query": "^5.66.0",
"axios": "^1.12.2",
"tiny-invariant": "^1.3.3"
Expand Down
36 changes: 36 additions & 0 deletions frontends/api/src/generated/v0/api.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions frontends/api/src/mitxonline/hooks/enrollment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ const useCreateVerifiedProgramEnrollment = () => {
queryClient.invalidateQueries({
queryKey: enrollmentKeys.courseRunEnrollmentsList(),
})
queryClient.invalidateQueries({
queryKey: enrollmentKeys.programEnrollmentsList(),
})
},
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ const course: PartialFactory<CourseWithCourseRunsSerializerV2> = (
name: faker.company.name(),
},
],
certificate_available: faker.datatype.boolean(),
page: {
feature_image_src: faker.image.avatar(),
page_url: faker.internet.url(),
Expand Down
1 change: 1 addition & 0 deletions frontends/api/src/mitxonline/test-utils/factories/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const v2Course: PartialFactory<V2Course> = (overrides = {}) => {
id: uniqueCourseId.enforce(() => faker.number.int()),
title: faker.lorem.words(3),
readable_id: faker.lorem.slug(),
certificate_available: faker.datatype.boolean(),
page: {
feature_image_src: faker.image.avatar(),
page_url: faker.internet.url(),
Expand Down
4 changes: 2 additions & 2 deletions frontends/api/src/mitxonline/test-utils/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ const baskets = {
}

const verifiedProgramEnrollments = {
create: (programId: string, courserunId: string) =>
`${API_BASE_URL}/api/v2/verified_program_enrollments/${encodeURIComponent(programId)}/${encodeURIComponent(courserunId)}/`,
create: (courserunId: string) =>
`${API_BASE_URL}/api/v2/verified_program_enrollments/${encodeURIComponent(courserunId)}/`,
}

export {
Expand Down
2 changes: 1 addition & 1 deletion frontends/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@emotion/styled": "^11.11.0",
"@floating-ui/react": "^0.27.16",
"@mitodl/course-search-utils": "^3.5.2",
"@mitodl/mitxonline-api-axios": "^2026.3.23",
"@mitodl/mitxonline-api-axios": "^2026.3.25",
"@mitodl/smoot-design": "^6.24.0",
"@mui/material": "^6.4.5",
"@mui/material-nextjs": "^6.4.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1209,10 +1209,7 @@ describe.each([

// Mock the enrollment endpoint
const programEnrollmentEndpoint =
mitxonline.urls.verifiedProgramEnrollments.create(
programEnrollment.program.readable_id,
run.courseware_id,
)
mitxonline.urls.verifiedProgramEnrollments.create(run.courseware_id)
setMockResponse.post(programEnrollmentEndpoint, {})

renderWithProviders(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ import {
import { mitxUserQueries } from "api/mitxonline-hooks/user"
import { useQuery } from "@tanstack/react-query"
import { coursePageView, programPageView, programView } from "@/common/urls"
import { mitxonlineLegacyUrl } from "@/common/mitxonline"
import {
mitxonlineLegacyUrl,
isVerifiedEnrollmentMode,
} from "@/common/mitxonline"
import { useReplaceBasketItem } from "api/mitxonline-hooks/baskets"
import { EnrollmentStatus, getBestRun, getEnrollmentStatus } from "./helpers"
import {
Expand All @@ -45,12 +48,6 @@ import {
} from "@mitodl/mitxonline-api-axios/v2"
import CourseEnrollmentDialog from "@/page-components/EnrollmentDialogs/CourseEnrollmentDialog"

const EnrollmentMode = {
Audit: "audit",
Verified: "verified",
} as const
type EnrollmentMode = (typeof EnrollmentMode)[keyof typeof EnrollmentMode]

export const DashboardType = {
Course: "course",
CourseRunEnrollment: "courserun-enrollment",
Expand Down Expand Up @@ -335,7 +332,7 @@ const useEnrollmentHandler = () => {
return
}
createVerifiedProgramEnrollment.mutate(
{ courserun_id: readableId, program_id: programCoursewareId },
{ courserun_id: readableId, request_body: [programCoursewareId] },
{
onSuccess: () => {
window.location.href = href
Expand Down Expand Up @@ -688,15 +685,16 @@ const DashboardCard: React.FC<DashboardCardProps> = ({

const canUpgrade =
isCourseRunEnrollment &&
resource.data.enrollment_mode !== EnrollmentMode.Verified &&
!isVerifiedEnrollmentMode(resource.data.enrollment_mode) &&
(enrollmentRun?.is_upgradable ?? false) &&
(enrollmentRun?.upgrade_product_is_active ?? false)

// Handle enrollment click for courses
const handleEnrollmentClick = React.useCallback(() => {
if (isCourse) {
const isVerifiedProgramEnrollment =
programEnrollment?.enrollment_mode === EnrollmentMode.Verified
const isVerifiedProgramEnrollment = isVerifiedEnrollmentMode(
programEnrollment?.enrollment_mode,
)

enrollment.enroll({
course: resource.data,
Expand Down Expand Up @@ -770,7 +768,7 @@ const DashboardCard: React.FC<DashboardCardProps> = ({
</SubtitleLink>
) : null}
{isCourseRunEnrollment &&
resource.data.enrollment_mode !== EnrollmentMode.Verified &&
!isVerifiedEnrollmentMode(resource.data.enrollment_mode) &&
offerUpgrade ? (
<UpgradeBanner
data-testid="upgrade-root"
Expand Down
Loading
Loading