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

@@ -88,6 +88,7 @@ export interface UserSolution {
exercise: string;
isDisabled?: boolean;
shuffleMaps?: ShuffleMap[];
isPractice?: boolean
}
export interface WritingExam extends ExamBase {
@@ -162,6 +163,7 @@ export interface WritingExercise extends Section {
evaluation?: WritingEvaluation;
}[];
topic?: string;
isPractice?: boolean
}
export interface AIDetectionAttributes {
@@ -196,6 +198,7 @@ export interface SpeakingExercise extends Section {
evaluation?: SpeakingEvaluation;
}[];
topic?: string;
isPractice?: boolean
}
export interface InteractiveSpeakingExercise extends Section {
@@ -215,6 +218,7 @@ export interface InteractiveSpeakingExercise extends Section {
first_topic?: string;
second_topic?: string;
variant?: "initial" | "final";
isPractice?: boolean
}
export interface FillBlanksMCOption {
@@ -243,6 +247,7 @@ export interface FillBlanksExercise {
solution: string; // *EXAMPLE: "preserve"
}[];
variant?: string;
isPractice?: boolean
}
export interface TrueFalseExercise {
@@ -251,6 +256,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 {
@@ -274,6 +280,7 @@ export interface WriteBlanksExercise {
solution: string;
}[];
variant?: string;
isPractice?: boolean
}
export interface MatchSentencesExercise {
@@ -285,6 +292,7 @@ export interface MatchSentencesExercise {
allowRepetition: boolean;
options: MatchSentenceExerciseOption[];
variant?: string;
isPractice?: boolean
}
export interface MatchSentenceExerciseSentence {
@@ -308,7 +316,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;