chore: establish learning module baseline
This commit is contained in:
commit
2d04197f3f
2409 files changed
+533050
No files matched your search
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* PBL v2 — learner-facing instructor intro (avatar hover tooltip text).
|
||||
*
|
||||
* Pure (no React) so the "what text to show / when there's none" rule is
|
||||
* unit-testable. The instructor's `description` is curated by the planner to be
|
||||
* learner-readable; the avatar shows it on hover. Returns undefined when it's
|
||||
* absent/blank so the caller can fall back to the role name.
|
||||
*/
|
||||
import type { PBLRole } from '@/lib/pbl/v2/types';
|
||||
import { trimmedPBLText } from '@/lib/pbl/v2/readers';
|
||||
|
||||
export function instructorIntroText(
|
||||
role?: Pick<PBLRole, 'description'> | null,
|
||||
): string | undefined {
|
||||
const text = trimmedPBLText(role?.description);
|
||||
return text ? text : undefined;
|
||||
}
|
||||
Reference in new issue
Block a user