Files
encoach_ui_odoo19/src/interfaces/results.ts
2024-09-03 17:43:33 +01:00

38 lines
901 B
TypeScript

import {Module} from "@/interfaces";
import {InstructorGender} from "./exam";
import {Stat} from "./user";
export type UserResults = {[key in Module]: ModuleResult};
interface ModuleResult {
exams: string[];
score: number;
total: number;
}
export interface AssignmentResult {
user: string;
type: "academic" | "general";
stats: Stat[];
}
export interface Assignment {
id: string;
name: string;
assigner: string;
assignees: string[];
results: AssignmentResult[];
exams: {id: string; module: Module; assignee: string}[];
instructorGender?: InstructorGender;
startDate: Date;
endDate: Date;
teachers?: string[];
archived?: boolean;
released?: boolean;
// unless start is active, the assignment is not visible to the assignees
// start date now works as a limit time to start the exam
start?: boolean;
}
export type AssignmentWithCorporateId = Assignment & {corporateId: string};