diff --git a/packages/features/src/student.tsx b/packages/features/src/student.tsx
index dac8841..0c06fca 100644
--- a/packages/features/src/student.tsx
+++ b/packages/features/src/student.tsx
@@ -570,6 +570,8 @@ function CoursePage({ slug }: { slug?: string }) {
// phones drop the tabs and stack every section in one scroll (P3).
const active = tab ?? (mine ? 'content' : 'overview');
const tabs: [string, string][] = [['overview', t('course.tabOverview')], ['content', t('course.content')]];
+ const quizzes = c.assessments ?? [];
+ const finalQuizzes = quizzes.filter((a) => !a.chapterId || !chapters.some((ch) => ch.id === a.chapterId && ch.lessons.some((l) => l.isPublished)));
const nextChapter = mine && r ? chapters.find((ch) => ch.lessons.some((l) => l.id === r.lesson.id))?.id : undefined;
const includes: [string, ReactNode][] = [
['globe', LOCALE_NAMES[c.instructionLocale]],
@@ -592,20 +594,20 @@ function CoursePage({ slug }: { slug?: string }) {
{c.status === 'ARCHIVED' && }
- {mine && {done ? t('course.completed') : t('course.owned')}}
+
{text.title}
{lessons.length}{t('course.lessonsLabel')}
{formatDuration(courseDuration(c))}
+ {mine && {done ? t('course.completed') : t('course.owned')}}
{(text.subtitle || text.description) && {text.subtitle || text.description}
}
{play && }
{initials(c.instructorName)}
{t('course.createdBy')}{c.instructorName}{t('course.teaches', { n: teaches })}
- {t('course.lastUpdated')} {fmtDate(c.updatedAt)}
@@ -615,13 +617,14 @@ function CoursePage({ slug }: { slug?: string }) {
{done ? t('course.completed') : t('course.owned')}{p.pct}%
{t('my.lessonsDone', { done: p.done, total: p.total })}
+ {pre && !preDone && {t('course.prereq', { title: ct(pre, locale).title })}
}
{r && !done && {t('player.upNext')}{r.index + 1}. {lessonTitle(r.lesson, locale)}{clock(r.lesson.durationSec)}
}
- {r && }
+ {r && }
> : <>
{c.prices.ETB != null && {formatMoney(c.prices.ETB, 'ETB')}{t('checkout.lifetime')}
}
+ {pre && !preDone && {t('course.prereq', { title: ct(pre, locale).title })}
}
-
{t('course.includes')}
@@ -643,7 +646,6 @@ function CoursePage({ slug }: { slug?: string }) {
}
- {pre && !preDone && {t('course.prereq', { title: ct(pre, locale).title })}
}
{tabs.map(([k, label]) => )}
{!!text.outcomes?.length &&
{t('course.outcomes')}
@@ -660,18 +662,20 @@ function CoursePage({ slug }: { slug?: string }) {
{tr(ch.translations, locale)?.title}{d}/{ls.length} · {formatDuration(ls.reduce((s, l) => s + l.durationSec, 0))}
{ls.map((l) => )}
+ {quizzes.filter((a) => a.chapterId === ch.id).map((a) => )}
);
})}
- {!!c.assessments?.length &&
- {t('assess.title')}{c.assessments.filter((a) => me?.assessments?.[a.id]?.passed).length}/{c.assessments.length}
- {c.assessments.map((a) => )}
+ {!!finalQuizzes.length &&
+ {t('assess.title')}{finalQuizzes.filter((a) => me?.assessments?.[a.id]?.passed).length}/{finalQuizzes.length}
+ {finalQuizzes.map((a) => )}
}
{(text.description || text.audience) &&
{t('course.about')}
{text.description &&
{text.description}
}
{text.audience &&
{t('course.audience')}: {text.audience}
}
+
{t('course.lastUpdated')} {fmtDate(c.updatedAt)}
}
@@ -687,9 +691,9 @@ function LessonRow({ c, l, current }: { c: Course; l: Lesson; current?: boolean
const seen = !done && l.durationSec ? Math.min(100, ((me?.progress?.[l.id]?.maxPositionSec ?? 0) / l.durationSec) * 100) : 0;
return (