update
Some checks failed
Deploy / deploy (build, debian, 22) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822) (push) Has been cancelled

This commit is contained in:
2026-05-02 09:15:49 -06:00
parent 64dc1c9234
commit 2e6e3aacec
2 changed files with 28 additions and 3 deletions

12
src/utils/gradebook.ts Normal file
View File

@@ -0,0 +1,12 @@
export interface GradebookStudentIdentity {
username: string
classname: string
}
export function displayGradebookStudentName(student: GradebookStudentIdentity) {
const generatedPrefix = `web${student.classname}`
if (!student.classname || !student.username.startsWith(generatedPrefix)) {
return student.username
}
return student.username.slice(generatedPrefix.length)
}