Filtered out level from students history display

This commit is contained in:
Joao Ramos
2024-02-17 14:22:46 +00:00
parent 52d309e7f4
commit 04f97b62c3

View File

@@ -227,7 +227,12 @@ export default function StudentDashboard({user}: Props) {
<section className="flex flex-col gap-3"> <section className="flex flex-col gap-3">
<span className="text-lg font-bold">Score History</span> <span className="text-lg font-bold">Score History</span>
<div className="-md:grid-rows-4 grid gap-6 md:grid-cols-2"> <div className="-md:grid-rows-4 grid gap-6 md:grid-cols-2">
{MODULE_ARRAY.map((module) => { {MODULE_ARRAY
// filtered out level as the questions for a level test are registed as the other modules
// therefore there are no stats to display on the level section
// for future reference, this data is registered on /api/stats/update.ts:90
.filter((module) => module !== 'level')
.map((module) => {
const desiredLevel = user.desiredLevels[module] || 9; const desiredLevel = user.desiredLevels[module] || 9;
const level = user.levels[module] || 0; const level = user.levels[module] || 0;
return ( return (