Skip to content

Commit

Permalink
Merge branch 'merge_problems_fix' of https://github.com/SELab-2/UGent-4
Browse files Browse the repository at this point in the history
… into merge_problems_fix
  • Loading branch information
sPAICEcake committed May 21, 2024
2 parents d35a5ee + 021b181 commit 2649c96
Showing 1 changed file with 31 additions and 16 deletions.
47 changes: 31 additions & 16 deletions frontend/frontend/src/pages/assignmentPage/AssignmentPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import {
Skeleton,
Stack,
Tooltip,
Typography,
ListItemText
Typography
} from '@mui/material'
import { t } from 'i18next'
import instance from '../../axiosConfig.ts'
Expand Down Expand Up @@ -950,29 +949,45 @@ export function AssignmentPage() {
</Box>
<Box
display={'flex'}
justifyContent={'flex-end'}
flexDirection={'row'}
alignItems={'center'}
gap={1}
sx={{
padding: 1,
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
backgroundColor: 'background.default',
gap: 1,
}}
>
<Typography
variant={'h6'}
variant="h6"
color="text.primary"
fontWeight={'bold'}
aria-label={'title'}
margin={0}
>
{'Score: '}
Score:
</Typography>
{submissions.length > 0 ? (
<ListItemText
primary={
score
? `${score.score}/${assignment?.max_score} (${(100 * score.score) / Number(assignment?.max_score)}%)`
: ' ' + t('no_score_yet')
<Typography
variant="h6"
color={
'text.primary'
}
/>
>
{score
? `${score.score}/${assignment?.max_score} (${(100 * score.score) / Number(assignment?.max_score)}%)`
: t('no_score_yet')}
</Typography>
) : (
<ListItemText
primary={' ' + t('no_score_yet')}
/>
<Typography
variant="h6"
color={
'text.primary'
}
>
{t('no_score_yet')}
</Typography>
)}
</Box>

Expand Down

0 comments on commit 2649c96

Please sign in to comment.