feat: improve LMS course discovery and enrollment UX
- Add paginated recommended courses to LMS dashboard (top 3, list
view)
and explore page (12 per page); exclude courses blocking new
students
- Polish course preview modal: remove padding, render requirements as
HTML, round banner image, secondary close button
- Redirect to course start page after successful enrollment instead of
/lms;
keep spinner active until navigation completes
- Auto-enable "allow new students" when a course is published
- Move Explore after My Learning in LMS sidebar nav
- Move Certificates after Content in course sidebar
- Add hiddenColumns prop to CourseListRow; show "Learn more" button
instead of actions menu in LMS explore context
This commit is contained in:
@@ -75,6 +75,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
let navigatingAway = false;
|
||||
|
||||
try {
|
||||
const body = data.token ? { inviteToken: data.token } : {};
|
||||
const result = await courseApi.enroll(data.course!.id, body);
|
||||
@@ -90,10 +92,11 @@
|
||||
already_joined: result.data.alreadyJoined
|
||||
});
|
||||
|
||||
navigatingAway = true;
|
||||
// need to force page reload to avoid cache issues
|
||||
window.location.href = result.data.redirectTo || '/lms';
|
||||
} finally {
|
||||
loading = false;
|
||||
if (!navigatingAway) loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user