Merge remote-tracking branch 'origin/develop' into feature/ExamGenRework

This commit is contained in:
Carlos-Mesquita
2024-11-12 14:28:51 +00:00
27 changed files with 836 additions and 755 deletions

View File

@@ -90,6 +90,7 @@ export interface UserSolution {
exercise: string;
isDisabled?: boolean;
shuffleMaps?: ShuffleMap[];
isPractice?: boolean
}
export interface WritingExam extends ExamBase {
@@ -165,6 +166,7 @@ export interface WritingExercise extends Section {
}[];
topic?: string;
variant?: string;
isPractice?: boolean
}
export interface AIDetectionAttributes {
@@ -199,6 +201,7 @@ export interface SpeakingExercise extends Section {
evaluation?: SpeakingEvaluation;
}[];
topic?: string;
isPractice?: boolean
}
export interface InteractiveSpeakingExercise extends Section {
@@ -218,6 +221,7 @@ export interface InteractiveSpeakingExercise extends Section {
first_topic?: string;
second_topic?: string;
variant?: "initial" | "final";
isPractice?: boolean
}
export interface FillBlanksMCOption {
@@ -246,6 +250,7 @@ export interface FillBlanksExercise {
solution: string; // *EXAMPLE: "preserve"
}[];
variant?: string;
isPractice?: boolean
}
export interface TrueFalseExercise {
@@ -254,6 +259,7 @@ export interface TrueFalseExercise {
prompt: string; // *EXAMPLE: "Select the appropriate option."
questions: TrueFalseQuestion[];
userSolutions: { id: string; solution: "true" | "false" | "not_given" }[];
isPractice?: boolean
}
export interface TrueFalseQuestion {
@@ -277,6 +283,7 @@ export interface WriteBlanksExercise {
solution: string;
}[];
variant?: string;
isPractice?: boolean
}
export interface MatchSentencesExercise {
@@ -288,6 +295,7 @@ export interface MatchSentencesExercise {
allowRepetition: boolean;
options: MatchSentenceExerciseOption[];
variant?: string;
isPractice?: boolean
}
export interface MatchSentenceExerciseSentence {
@@ -311,7 +319,8 @@ export interface MultipleChoiceExercise {
passage?: {
title: string;
content: string;
}
}
isPractice?: boolean
}
export interface MultipleChoiceQuestion {

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;