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:
Rotimi Best
2026-06-11 14:22:18 +01:00
parent 4e24e3cb63
commit c8154409f5
15 changed files with 465 additions and 194 deletions
+3 -3
View File
@@ -649,7 +649,7 @@ export async function enrollInCourse(
return {
success: true,
alreadyJoined: true,
redirectTo: '/lms'
redirectTo: `/courses/${courseId}/lessons?next=true`
};
}
@@ -692,7 +692,7 @@ export async function enrollInCourse(
return {
success: true,
alreadyJoined: false,
redirectTo: '/lms'
redirectTo: `/courses/${courseId}/lessons?next=true`
};
}
@@ -1056,6 +1056,6 @@ export async function acceptStudentInvite(token: string, user: TAuthUser, contex
return {
success: true,
alreadyJoined: result.alreadyJoined,
redirectTo: '/lms'
redirectTo: `/courses/${result.courseId}/lessons?next=true`
};
}
+2 -2
View File
@@ -469,9 +469,9 @@ export async function getUserEnrolledCourses(orgId: string, userId: string) {
* @param userId - User ID to exclude enrolled courses
* @returns Array of recommended courses
*/
export async function getRecommendedCourses(orgId: string, userId: string, limit?: number) {
export async function getRecommendedCourses(orgId: string, userId: string, limit?: number, page?: number) {
try {
return getExploreCourses({ orgId, profileId: userId, limit });
return getExploreCourses({ orgId, profileId: userId, limit, page });
} catch (error) {
if (error instanceof AppError) throw error;
throw new AppError(