Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groep ids kloppen nu op assignment page voor leerkrachten #274

Merged
merged 1 commit into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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