From 00278f7cf0e1c8ea016a2039e6f2c0cc1b326caf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?=
<80620802+burakboduroglu@users.noreply.github.com>
Date: Wed, 15 Jul 2026 12:03:16 +0300
Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20exam=20detail=20section=20d?=
=?UTF-8?q?escriptions,=20grade=20panel,=20and=20disclosure=20fix=20-=20ke?=
=?UTF-8?q?ep=20SectionDisclosure=20children=20mounted=20(no=20re-fetch=20?=
=?UTF-8?q?on=20toggle)=20-=20move=20Grade=20form=20to=20SidePanel,=20add?=
=?UTF-8?q?=20Results=20header=20button=20-=20disable=20Grade=20button=20b?=
=?UTF-8?q?efore=20exam=20ends=20with=20hint=20text=20-=20add=20i18n=20key?=
=?UTF-8?q?s=20for=20exam=20section=20descriptions=20(details,=20examStati?=
=?UTF-8?q?stics,=20etc.)=20-=20add=20descriptions=20to=20schedule/statist?=
=?UTF-8?q?ics/questions/results=20headers=20-=20fix=20RollCall=20layout:?=
=?UTF-8?q?=20flex=20row,=20centered=20items,=20stable=20button=20widths?=
=?UTF-8?q?=20-=20add=20hideLabel/hideDetail=20props=20to=20AttendanceStat?=
=?UTF-8?q?usPicker=20for=20compact=20use?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../events/attendance-status-picker.tsx | 18 ++++--
.../sessions/course-sessions-panel.tsx | 16 ++++--
src/components/ui/section-disclosure.tsx | 2 +-
src/i18n/messages.ts | 15 +++++
src/pages/exam-detail-page.tsx | 56 +++++++++++++------
5 files changed, 76 insertions(+), 31 deletions(-)
diff --git a/src/components/events/attendance-status-picker.tsx b/src/components/events/attendance-status-picker.tsx
index 8e7ce26..ae38825 100644
--- a/src/components/events/attendance-status-picker.tsx
+++ b/src/components/events/attendance-status-picker.tsx
@@ -1,4 +1,4 @@
-import { For, createMemo, createResource } from "solid-js";
+import { For, Show, createMemo, createResource } from "solid-js";
import { getSettings } from "@/api/getSettings";
import type { AttendanceStatus } from "@/api/types";
import { Label } from "@/components/ui/label";
@@ -11,6 +11,8 @@ export function AttendanceStatusPicker(props: {
value: AttendanceStatus;
onChange: (status: AttendanceStatus) => void;
label?: string;
+ hideLabel?: boolean;
+ hideDetail?: boolean;
}) {
const t = useT();
const [settings] = createResource(() => getSettings());
@@ -21,10 +23,12 @@ export function AttendanceStatusPicker(props: {
const selectedMeta = createMemo(() => getAttendanceStatusMeta(props.value));
return (
-
+
+
+
-
- {selectedMeta() ? `${t(selectedMeta()!.key)}: ${t(selectedMeta()!.detailKey)}` : props.value}
-
+
+
+ {selectedMeta() ? `${t(selectedMeta()!.key)}: ${t(selectedMeta()!.detailKey)}` : props.value}
+
+
);
}
diff --git a/src/components/sessions/course-sessions-panel.tsx b/src/components/sessions/course-sessions-panel.tsx
index 9e507f9..aca6de9 100644
--- a/src/components/sessions/course-sessions-panel.tsx
+++ b/src/components/sessions/course-sessions-panel.tsx
@@ -237,15 +237,19 @@ function RollCall(props: { sessionId: string; roster: Enrollment[] }) {
{(row) => {
const saved = () => rows().get(row.user.id) as SessionAttendance | undefined;
return (
-
+
{personLabel(row.user)}
-
{row.user.id}
+
{row.user.id}
+
+
+
+
setLocal((current) => ({ ...current, [row.user.id]: status }))} />
+
+
-
setLocal((current) => ({ ...current, [row.user.id]: status }))} />
-
);
}}
diff --git a/src/components/ui/section-disclosure.tsx b/src/components/ui/section-disclosure.tsx
index cbc34b8..ec53285 100644
--- a/src/components/ui/section-disclosure.tsx
+++ b/src/components/ui/section-disclosure.tsx
@@ -41,7 +41,7 @@ export function SectionDisclosure(props: ParentProps<{
>
- {props.open ? props.children : null}
+ {props.children}
diff --git a/src/i18n/messages.ts b/src/i18n/messages.ts
index 4faa2c4..4fc9f78 100644
--- a/src/i18n/messages.ts
+++ b/src/i18n/messages.ts
@@ -206,9 +206,14 @@ export type MessageKey =
| "exams.yourResult"
| "exams.notGraded"
| "exams.gradeStudent"
+ | "exams.gradeAfterExam"
| "exams.results"
| "exams.noResults"
+ | "exams.details"
| "exams.schedule"
+ | "exams.examStatistics"
+ | "exams.examQuestions"
+ | "exams.studentResults"
| "exams.window"
| "exams.unscheduled"
| "exams.mode"
@@ -681,9 +686,14 @@ const en: Dict = {
"exams.yourResult": "Your result",
"exams.notGraded": "Not graded yet",
"exams.gradeStudent": "Grade a student",
+ "exams.gradeAfterExam": "Available after the exam ends",
"exams.results": "Results table",
"exams.noResults": "No results yet.",
+ "exams.details": "Exam Details",
"exams.schedule": "Schedule",
+ "exams.examStatistics": "Exam Statistics",
+ "exams.examQuestions": "Exam Questions",
+ "exams.studentResults": "Student Grades",
"exams.window": "Window",
"exams.unscheduled": "Unscheduled",
"exams.mode": "Mode",
@@ -1166,9 +1176,14 @@ const tr: Dict = {
"exams.yourResult": "Sonucun",
"exams.notGraded": "Henüz notlanmadı",
"exams.gradeStudent": "Öğrenci notla",
+ "exams.gradeAfterExam": "Sınav bitince kullanılabilir",
"exams.results": "Sonuç tablosu",
"exams.noResults": "Henüz sonuç yok.",
+ "exams.details": "Sınav Detayları",
"exams.schedule": "Zamanlama",
+ "exams.examStatistics": "Sınav İstatistikleri",
+ "exams.examQuestions": "Sınav Soruları",
+ "exams.studentResults": "Öğrenci Notları",
"exams.window": "Aralık",
"exams.unscheduled": "Zamansız",
"exams.mode": "Mod",
diff --git a/src/pages/exam-detail-page.tsx b/src/pages/exam-detail-page.tsx
index 9b7b364..68fc493 100644
--- a/src/pages/exam-detail-page.tsx
+++ b/src/pages/exam-detail-page.tsx
@@ -116,13 +116,13 @@ function ExamDetailContent() {
const [deleteOpen, setDeleteOpen] = createSignal(false);
const [removeUserId, setRemoveUserId] = createSignal(null);
const [sheetUserId, setSheetUserId] = createSignal(null);
+ const [gradeOpen, setGradeOpen] = createSignal(false);
const [openSections, setOpenSections] = createSignal({
schedule: true,
ownResult: false,
answerSheet: false,
statistics: false,
questions: false,
- grade: false,
results: false,
});
@@ -183,7 +183,7 @@ function ExamDetailContent() {
setPending(false);
}
};
- const toggleSection = (section: "schedule" | "ownResult" | "answerSheet" | "statistics" | "questions" | "grade" | "results") => {
+ const toggleSection = (section: "schedule" | "ownResult" | "answerSheet" | "statistics" | "questions" | "results") => {
setOpenSections((current) => ({ ...current, [section]: !current[section] }));
};
@@ -332,7 +332,7 @@ function ExamDetailContent() {
open={openSections().schedule}
onToggle={() => toggleSection("schedule")}
title={t("exams.schedule")}
- description={examModeLabel(ex().mode)}
+ description={t("exams.details")}
>
@@ -355,7 +355,12 @@ function ExamDetailContent() {
- toggleSection("ownResult")} title={t("exams.yourResult")}>
+ toggleSection("ownResult")}
+ title={t("exams.yourResult")}
+ description={ownResult() ? `${t("form.mark")}: ${ownResult()!.mark}` : t("exams.notGraded")}
+ >
}>
}>
{(r) => }
@@ -378,7 +383,7 @@ function ExamDetailContent() {
- toggleSection("statistics")} title={t("exams.statistics")}>
+ toggleSection("statistics")} title={t("exams.statistics")} description={t("exams.examStatistics")}>
}>
{(s) => (
@@ -409,28 +414,43 @@ function ExamDetailContent() {
open={openSections().questions}
onToggle={() => toggleSection("questions")}
title={t("questions.title")}
+ description={t("exams.examQuestions")}
>
-
- toggleSection("grade")} title={t("exams.gradeStudent")}>
- {
- await postExamResult(id(), values);
- await refetchResults();
- }}
- />
-
-
+
+ {
+ await postExamResult(id(), values);
+ await refetchResults();
+ }}
+ />
+
toggleSection("results")}
title={t("exams.results")}
- description={`${(results() ?? []).length}`}
- meta={{(results() ?? []).length}}
+ description={`${(results() ?? []).length} ${t("exams.studentResults")}`}
+ actions={
+
+
+
+ {t("exams.gradeAfterExam")}
+
+
+
+
+ }
>
}>