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
@@ -442,15 +442,19 @@ export const organizationRouter = new Hono()
async (c) => {
try {
const user = c.get('user')!;
const { limit } = c.req.valid('query');
const { limit, page = 1 } = c.req.valid('query');
const orgId = c.req.header('cio-org-id')!;
const result = await getRecommendedCourses(orgId, user.id, limit);
const { data, total } = await getRecommendedCourses(orgId, user.id, limit, page);
const resolvedLimit = limit ?? total;
const totalPages = resolvedLimit > 0 ? Math.ceil(total / resolvedLimit) : 1;
return c.json(
{
success: true,
data: result
data,
pagination: { page, limit: resolvedLimit, total, totalPages }
},
200
);