2026-03-09 11:18:22 +01:00
|
|
|
import type { TCourseType } from '@cio/db/types';
|
2026-05-09 06:05:03 +01:00
|
|
|
import type { TCourseCallout } from '@cio/utils/validation/course';
|
2021-08-24 10:45:43 +03:00
|
|
|
import { writable } from 'svelte/store';
|
|
|
|
|
|
2026-03-09 11:18:22 +01:00
|
|
|
type CourseSettings = {
|
|
|
|
|
logo: string;
|
|
|
|
|
courseTitle: string;
|
|
|
|
|
courseDescription: string;
|
|
|
|
|
grading: boolean;
|
2026-05-09 06:05:03 +01:00
|
|
|
type: TCourseType;
|
2026-03-09 11:18:22 +01:00
|
|
|
allowNewStudents: boolean;
|
|
|
|
|
tabs: { id: number; name: string }[];
|
|
|
|
|
lessonDownload: boolean;
|
|
|
|
|
isPublished: boolean;
|
|
|
|
|
isContentGroupingEnabled: boolean;
|
2026-06-11 14:26:42 +01:00
|
|
|
progressionMode: 'free' | 'sequential';
|
2026-05-09 06:05:03 +01:00
|
|
|
callout: TCourseCallout | null;
|
2026-06-22 05:43:48 +01:00
|
|
|
welcomeEmailMessage: string;
|
2026-08-15 18:55:51 +01:00
|
|
|
certificate: {
|
|
|
|
|
deadline: string | null;
|
|
|
|
|
threshold: number;
|
|
|
|
|
requiredExerciseId: string | null;
|
|
|
|
|
exerciseMinScorePercent: number | null;
|
|
|
|
|
};
|
2026-03-09 11:18:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const settings = writable<CourseSettings>({
|
2023-10-11 11:40:08 +00:00
|
|
|
logo: '',
|
2026-03-09 11:18:22 +01:00
|
|
|
courseTitle: '',
|
|
|
|
|
courseDescription: '',
|
2023-09-24 13:20:04 +00:00
|
|
|
grading: false,
|
2026-05-09 06:05:03 +01:00
|
|
|
type: 'SELF_PACED' as TCourseType,
|
2026-03-09 11:18:22 +01:00
|
|
|
allowNewStudents: false,
|
2023-09-24 13:20:04 +00:00
|
|
|
tabs: [
|
2026-05-18 03:47:22 +01:00
|
|
|
{ id: 3, name: 'course.navItem.lessons.materials.tabs.video.title' },
|
2024-04-19 05:45:48 +01:00
|
|
|
{ id: 1, name: 'course.navItem.lessons.materials.tabs.note.title' },
|
|
|
|
|
{ id: 2, name: 'course.navItem.lessons.materials.tabs.slide.title' },
|
2025-09-10 11:39:06 +01:00
|
|
|
{ id: 4, name: 'course.navItem.lessons.materials.tabs.document.title' }
|
2023-09-24 13:20:04 +00:00
|
|
|
],
|
2026-03-09 11:18:22 +01:00
|
|
|
lessonDownload: false,
|
|
|
|
|
isPublished: false,
|
2026-05-09 06:05:03 +01:00
|
|
|
isContentGroupingEnabled: true,
|
2026-06-11 14:26:42 +01:00
|
|
|
progressionMode: 'free',
|
2026-06-22 05:43:48 +01:00
|
|
|
callout: null,
|
2026-08-15 18:55:51 +01:00
|
|
|
welcomeEmailMessage: '',
|
|
|
|
|
certificate: {
|
|
|
|
|
deadline: null,
|
|
|
|
|
threshold: 100,
|
|
|
|
|
requiredExerciseId: null,
|
|
|
|
|
exerciseMinScorePercent: null
|
|
|
|
|
}
|
2021-08-24 10:45:43 +03:00
|
|
|
});
|