32 lines
650 B
TypeScript
32 lines
650 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;
|
|
archived?: boolean;
|
|
released?: boolean;
|
|
}
|