fix(dashboard): redirect to course start after auto-enroll (#741)
* fix(dashboard): redirect to course start after auto-enroll After successful enrollment on the org-site enroll page, verified users were always sent to /lms because resolvePostEnrollRedirect was hardcoded. Restore the API redirectTo target (/courses/:id/lessons?next=true) so students land on their first lesson, with /course/:slug as fallback. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * fix(dashboard): match LMS continue path after auto-enroll Use the same student course continue URL as the LMS home page (/courses/:id/lessons?next=true) via a shared helper, and navigate with goto instead of a hard reload or org-site /course/:slug fallback. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> --------- Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>
This commit is contained in:
co-authored by
Rotimi Best
parent
8bed9f6b4e
commit
bce0f582ce
@@ -13,10 +13,11 @@
|
||||
getStudentCourseComplianceStatusVariant,
|
||||
getStudentCourseProgressPercent
|
||||
} from '$features/course/utils/compliance-utils';
|
||||
import { getStudentCourseContinuePath } from '$features/course/utils/student-course-navigation';
|
||||
|
||||
const gotoCourse = (id: string | undefined) => {
|
||||
if (!id) return;
|
||||
goto(`/courses/${id}/lessons?next=true`);
|
||||
goto(getStudentCourseContinuePath(id));
|
||||
};
|
||||
|
||||
let highlightedCourses = $derived.by(() => {
|
||||
|
||||
Reference in New Issue
Block a user