ENCOA-233: Added the option for certain exercises to not count towards scores

This commit is contained in:
Tiago Ribeiro
2024-11-12 11:03:19 +00:00
parent 1787e3ed53
commit b2dc9b2e31
13 changed files with 165 additions and 149 deletions

View File

@@ -1,6 +1,6 @@
import {Module} from ".";
import {InstructorGender, ShuffleMap} from "./exam";
import {PermissionType} from "./permissions";
import { Module } from ".";
import { InstructorGender, ShuffleMap } from "./exam";
import { PermissionType } from "./permissions";
export type User = StudentUser | TeacherUser | CorporateUser | AgentUser | AdminUser | DeveloperUser | MasterCorporateUser;
export type UserStatus = "active" | "disabled" | "paymentDue";
@@ -12,8 +12,8 @@ export interface BasicUser {
id: string;
isFirstLogin: boolean;
focus: "academic" | "general";
levels: {[key in Module]: number};
desiredLevels: {[key in Module]: number};
levels: { [key in Module]: number };
desiredLevels: { [key in Module]: number };
type: Type;
bio: string;
isVerified: boolean;
@@ -22,7 +22,7 @@ export interface BasicUser {
status: UserStatus;
permissions: PermissionType[];
lastLogin?: Date;
entities: {id: string; role: string}[];
entities: { id: string; role: string }[];
}
export interface StudentUser extends BasicUser {
@@ -109,13 +109,13 @@ export interface DemographicCorporateInformation {
export type Gender = "male" | "female" | "other";
export type EmploymentStatus = "employed" | "student" | "self-employed" | "unemployed" | "retired" | "other";
export const EMPLOYMENT_STATUS: {status: EmploymentStatus; label: string}[] = [
{status: "student", label: "Student"},
{status: "employed", label: "Employed"},
{status: "unemployed", label: "Unemployed"},
{status: "self-employed", label: "Self-employed"},
{status: "retired", label: "Retired"},
{status: "other", label: "Other"},
export const EMPLOYMENT_STATUS: { status: EmploymentStatus; label: string }[] = [
{ status: "student", label: "Student" },
{ status: "employed", label: "Employed" },
{ status: "unemployed", label: "Unemployed" },
{ status: "self-employed", label: "Self-employed" },
{ status: "retired", label: "Retired" },
{ status: "other", label: "Other" },
];
export interface Stat {
@@ -142,6 +142,7 @@ export interface Stat {
path: string;
version: string;
};
isPractice?: boolean
}
export interface Group {
@@ -174,4 +175,4 @@ export interface Code {
export type Type = "student" | "teacher" | "corporate" | "admin" | "developer" | "agent" | "mastercorporate";
export const userTypes: Type[] = ["student", "teacher", "corporate", "admin", "developer", "agent", "mastercorporate"];
export type WithUser<T> = T extends {participants: string[]} ? Omit<T, "participants"> & {participants: User[]} : T;
export type WithUser<T> = T extends { participants: string[] } ? Omit<T, "participants"> & { participants: User[] } : T;