-
Notifications
You must be signed in to change notification settings - Fork 0
Ref: Improve course exam results accessibility #294
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
Merged
Marty-Byrde
merged 8 commits into
canary
from
ref/improve-course-exam-results-accessibility
Mar 28, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
23a9b01
ref: moved examination result pages into `[locale]/results/`
Marty-Byrde f6eb132
ref: mimiced exam results page structure to components
Marty-Byrde a37b565
feat: added show exam results to `CourseActionMenu`
Marty-Byrde 4b05f64
feat: added examination results breadcrumb components
Marty-Byrde 45a1ff6
ref: applied breadcrumbs to exam result pages
Marty-Byrde 286e654
ref: localized new exam breadcrumbs texts
Marty-Byrde 58e3274
ref: resolved moved component import path issue
Marty-Byrde 9514611
ref: added tooltip to show exam results action-item
Marty-Byrde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
src/components/results/examination/ExamResultsBreadcrumbs.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| 'use server' | ||
|
Marty-Byrde marked this conversation as resolved.
|
||
|
|
||
| import { DetailedHTMLProps, HTMLAttributes } from 'react' | ||
| import Link from 'next/link' | ||
| import { getCourseById } from '@/database/course/select' | ||
| import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from '@/src/components/shadcn/breadcrumb' | ||
| import { getScopedI18n } from '@/src/i18n/server-localization' | ||
| import { Course } from '@/src/schemas/CourseSchema' | ||
|
|
||
| async function BaseBreadcrumbs({ | ||
| courseName, | ||
| courseId, | ||
| children, | ||
| ...props | ||
| }: { children: React.ReactNode; courseId: Course['id']; courseName: Course['name'] } & DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>) { | ||
| const t = await getScopedI18n('Shared.Breadcrumbs') | ||
| return ( | ||
| <Breadcrumb {...props}> | ||
| <BreadcrumbList> | ||
| <BreadcrumbItem> | ||
| <BreadcrumbLink asChild> | ||
| <Link href={`/`}>{t('root')}</Link> | ||
| </BreadcrumbLink> | ||
| </BreadcrumbItem> | ||
| <BreadcrumbSeparator /> | ||
| <BreadcrumbItem> | ||
| <BreadcrumbLink asChild> | ||
| <Link href={`/courses`}>{t('courses')}</Link> | ||
| </BreadcrumbLink> | ||
| </BreadcrumbItem> | ||
| <BreadcrumbSeparator /> | ||
| <BreadcrumbItem> | ||
| <BreadcrumbLink asChild> | ||
| <Link href={`/courses/${courseId}/edit`}>{courseName}</Link> | ||
| </BreadcrumbLink> | ||
| </BreadcrumbItem> | ||
| <BreadcrumbSeparator /> | ||
| {children} | ||
| </BreadcrumbList> | ||
| </Breadcrumb> | ||
| ) | ||
| } | ||
|
|
||
| export async function ExamResultsBreadcrumbs({ courseId, ...props }: { courseId: string } & DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>) { | ||
| const t = await getScopedI18n('Shared.Breadcrumbs') | ||
| const course = await getCourseById(courseId) | ||
|
Marty-Byrde marked this conversation as resolved.
|
||
| if (!course) return null | ||
|
|
||
| return ( | ||
| <BaseBreadcrumbs courseId={courseId} courseName={course.name} {...props}> | ||
| <BreadcrumbPage> | ||
| <BreadcrumbItem>{t('examination_results')}</BreadcrumbItem> | ||
| </BreadcrumbPage> | ||
| </BaseBreadcrumbs> | ||
| ) | ||
| } | ||
|
|
||
| export async function ExamResultAttemptResultsBreadcrumbs({ courseId, userName, ...props }: { courseId: string; userName: string } & DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>) { | ||
| const t = await getScopedI18n('Shared.Breadcrumbs') | ||
| const course = await getCourseById(courseId) | ||
| if (!course) return null | ||
|
|
||
| return ( | ||
| <BaseBreadcrumbs courseId={courseId} courseName={course.name} {...props}> | ||
| <BreadcrumbItem> | ||
| <BreadcrumbLink asChild> | ||
| <Link href={`/results/${course.id}/exam`}>{t('examination_results')}</Link> | ||
| </BreadcrumbLink> | ||
| </BreadcrumbItem> | ||
| <BreadcrumbSeparator /> | ||
|
|
||
| <BreadcrumbPage> | ||
| <BreadcrumbItem> | ||
| {userName}'s {t('results')} | ||
|
Marty-Byrde marked this conversation as resolved.
|
||
| </BreadcrumbItem> | ||
| </BreadcrumbPage> | ||
| </BaseBreadcrumbs> | ||
| ) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.