Compare commits

..
Author SHA1 Message Date
kcar fbdd45b177 chore: preserve app workspace t_a1f25994 2026-08-09 20:24:45 +01:00
3 changed files with 67 additions and 68 deletions
+3 -3
View File
@@ -315,20 +315,20 @@ const ExamDashboardPage: React.FC = () => {
{t.exam_code && (
<Typography variant="caption" color="text.secondary">{t.exam_code}</Typography>
)}
<Box sx={{ mt: 'auto', pt: 1, display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<Stack spacing={1} sx={{ mt: 'auto', pt: 1 }}>
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<Chip size="small" label={t.status} color={STATUS_COLOR[t.status] ?? 'default'} variant="outlined" />
<Typography variant="caption" color="text.secondary">
Updated {new Date(t.updated_at).toLocaleDateString()}
</Typography>
</Box>
<Stack direction="row" spacing={1} sx={{ pt: 0.5 }}>
<Button
size="small"
variant="outlined"
onClick={(e) => { e.stopPropagation(); navigate(`/exam-marker/${t.id}/marks`); }}
startIcon={<GradingIcon fontSize="small" />}
>
Edit marks
Mark scheme
</Button>
</Stack>
</Paper>
+3 -3
View File
@@ -1,3 +1,3 @@
export { default as ExamDashboardPage } from './ExamDashboardPage';
export { default as ExamTemplateSetupPage } from './setup/ExamTemplateSetupPage';
export { default as MarkSchemePage } from './MarkSchemePage';
export { default as ExamDashboardPage } from ./ExamDashboardPage;
export { default as ExamTemplateSetupPage } from ./setup/ExamTemplateSetupPage;
export { default as MarkSchemePage } from ./MarkSchemePage;
+56 -57
View File
@@ -4,7 +4,7 @@
* the shared UUIDs (template/question/region ids, exam_code).
*/
export type ExamTemplateStatus = 'draft' | 'ready' | 'archived';
export type ExamTemplateStatus = draft | ready | archived;
export interface ExamTemplate {
id: string;
@@ -31,7 +31,7 @@ export interface CreateTemplatePayload {
institute_id?: string;
}
export type MarkSchemeType = 'points' | 'levels' | 'parts' | 'checklist' | 'free';
export type MarkSchemeType = points | levels | parts | checklist | free;
export interface MarkSchemePoint {
mark: number;
@@ -92,12 +92,12 @@ export interface ExamQuestion {
}
export type ExamResponseAreaKind =
| 'response'
| 'context'
| 'question_number'
| 'mark_area'
| 'reference'
| 'furniture';
| response
| context
| question_number
| mark_area
| reference
| furniture;
export interface ExamResponseArea {
id: string;
@@ -108,7 +108,7 @@ export interface ExamResponseArea {
kind: ExamResponseAreaKind;
response_form: string | null;
context_type?: string | null;
source: 'manual' | 'ai';
source: manual | ai;
confirmed: boolean;
confidence: number | null;
}
@@ -121,7 +121,7 @@ export interface ExamBoundary {
page_index: number;
y: number;
bounds: Record<string, number> | null;
source: 'manual' | 'ai';
source: manual | ai;
confirmed: boolean;
}
@@ -131,57 +131,11 @@ export interface ExamTemplateDetail extends ExamTemplate {
boundaries: ExamBoundary[];
}
export interface TemplateReplacePayload {
meta?: {
title?: string;
subject?: string;
page_count?: number;
status?: ExamTemplateStatus;
};
questions: Array<{
id?: string;
parent_id?: string | null;
label: string;
order?: number;
max_marks?: number;
answer_type?: 'written' | 'mcq' | 'short' | 'diagram' | null;
mcq_options?: unknown | null;
mark_scheme?: Record<string, unknown>;
is_container?: boolean;
spec_ref?: string | null;
bounds?: Record<string, number> | null;
page?: number | null;
}>;
response_areas: Array<{
id?: string;
question_id: string;
page: number;
bounds: Record<string, number>;
kind: ExamResponseArea['kind'];
response_form?: string | null;
context_type?: string | null;
source?: 'manual' | 'ai';
confirmed?: boolean;
confidence?: number | null;
}>;
boundaries: Array<{
id?: string;
question_id?: string | null;
label?: string | null;
page_index: number;
y: number;
bounds?: Record<string, number> | null;
source?: 'manual' | 'ai';
confirmed?: boolean;
}>;
}
export interface PatchQuestionPayload {
label?: string;
order?: number;
max_marks?: number;
answer_type?: 'written' | 'mcq' | 'short' | 'diagram' | null;
answer_type?: written | mcq | short | diagram | null;
mcq_options?: unknown;
mark_scheme?: MarkScheme;
is_container?: boolean;
@@ -201,3 +155,48 @@ export interface Neo4jSyncResult {
status: string;
projection?: Record<string, unknown>;
}
export interface TemplateReplacePayload {
meta?: {
title?: string;
subject?: string;
page_count?: number;
status?: ExamTemplateStatus;
};
questions: Array<{
id?: string;
parent_id?: string | null;
label: string;
order?: number;
max_marks?: number;
answer_type?: written | mcq | short | diagram | null;
mcq_options?: unknown | null;
mark_scheme?: MarkScheme;
is_container?: boolean;
spec_ref?: string | null;
bounds?: Record<string, number> | null;
page?: number | null;
}>;
response_areas: Array<{
id?: string;
question_id: string;
page: number;
bounds: Record<string, number>;
kind: ExamResponseAreaKind;
response_form?: string | null;
context_type?: string | null;
source?: manual | ai;
confirmed?: boolean;
confidence?: number | null;
}>;
boundaries: Array<{
id?: string;
question_id?: string | null;
label?: string | null;
page_index: number;
y: number;
bounds?: Record<string, number> | null;
source?: manual | ai;
confirmed?: boolean;
}>;
}