Skip to content

Commit

Permalink
Merge pull request #274 from SELab-2/group_id_fix
Browse files Browse the repository at this point in the history
groep ids kloppen nu op assignment page voor leerkrachten
  • Loading branch information
gusvanpoucke authored May 19, 2024
2 parents 4ea971e + 54a2e64 commit 2fc687a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { t } from 'i18next'
import dayjs from 'dayjs'

interface SubmissionListItemTeacherPageProps {
relative_group_id: string
group_name: string
group_id: string
assignment_id: string
course_id: string
Expand All @@ -32,7 +32,7 @@ export interface Score {
* @param {SubmissionListItemTeacherPageProps} props - Props for SubmissionListItemTeacherPage component
*/
export function SubmissionListItemTeacherPage({
relative_group_id,
group_name,
group_id,
assignment_id,
course_id,
Expand Down Expand Up @@ -148,7 +148,7 @@ export function SubmissionListItemTeacherPage({
color: 'primary.light',
},
}}
primary={relative_group_id}
primary={group_name}
/>
{/* Display submission timestamp */}
<ListItemText
Expand Down
21 changes: 8 additions & 13 deletions frontend/frontend/src/pages/assignmentPage/AssignmentPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ export function AssignmentPage() {
))
) : (
<List disablePadding={true}>
{groups.map((group) => (
{groups.map((group, index) => (
<Box key={group.groep_id}>
<Divider
color={'text.main'}
Expand All @@ -544,18 +544,13 @@ export function AssignmentPage() {
pr={3}
>
<SubmissionListItemTeacherPage
relative_group_id={(
group.groep_id -
Math.min(
...groups.map(
(
group
) =>
group.groep_id
)
) +
1
).toString()}
group_name={
assignment
? assignment.max_groep_grootte > 1
? t('group') + ' ' + (index + 1).toString()
: t('group') + ' ' + (index + 1).toString() //TODO Dit vervangen door de naam van de student
: ''
}
group_id={group.groep_id.toString()}
assignment_id={
assignmentId
Expand Down

0 comments on commit 2fc687a

Please sign in to comment.