- Adapted more of the design to be more responsive;

- Revamped some of the UserSolutions;
- Transformed the homepage chart to use actual dynamic values;
- Created an endpoint for the stats;
This commit is contained in:
Tiago Ribeiro
2023-04-20 00:20:20 +01:00
parent d61592b73e
commit 87f7b717fc
22 changed files with 5468 additions and 829 deletions

View File

@@ -28,11 +28,12 @@ export interface UserSolution {
solutions: any[];
module?: Module;
exam?: string;
type: string;
score: {
correct: number;
total: number;
};
id: string;
exercise: string;
}
export interface WritingExam {

View File

@@ -3,6 +3,7 @@ import {Module} from "@/interfaces";
export type UserResults = {[key in Module]: ModuleResult};
interface ModuleResult {
exams: string[];
score: number;
total: number;
}

View File

@@ -1,3 +1,6 @@
import {Module} from ".";
import {UserSolution} from "./exam";
export interface User {
email: string;
name: string;
@@ -7,4 +10,16 @@ export interface User {
type: Type;
}
export interface Stat {
user: string;
exam: string;
exercise: string;
module: Module;
solutions: any[];
score: {
correct: number;
total: number;
};
}
export type Type = "student" | "teacher" | "admin" | "owner" | "developer";