Skip to content

Commit

Permalink
fix: ensure run-based assignments are taken into account on course pa…
Browse files Browse the repository at this point in the history
…ge redirect
  • Loading branch information
adamstankiewicz committed Sep 18, 2024
1 parent 5bca07b commit 8399a89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/course/data/courseLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const makeCourseLoader: Types.MakeRouteLoaderFunctionWithQueryClient = function
hasCurrentEnterpriseOffers,
});
const isCourseAssigned = redeemableLearnerCreditPolicies.learnerContentAssignments.allocatedAssignments.some(
(assignment) => assignment.contentKey === courseKey,
(assignment) => [assignment.contentKey, assignment.parentContentKey].includes(courseKey),
);
// If learner is an assignment-only learner and is not assigned to the currently
// viewed course, redirect to the Dashboard page route.
Expand Down

0 comments on commit 8399a89

Please sign in to comment.