clean up CLASSROOMIO-T-150: Notify teacher they have been added Make lesson content be linear on preview mode CLASSROOMIO-T-150: Add teachers with a dropdown to course Co-authored-by: Rotimi Best <rotimiibitoyeemma@gmail.com> Merge-request: CLASSROOMIO-MR-69 Merged-by: Best Admin <best@digdippa.com>
52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
import { writable, derived } from 'svelte/store';
|
|
import { STEPS } from '../constants/quiz';
|
|
import type { Writable } from 'svelte/store';
|
|
import type { CurrentOrg, OrgTeamMember } from '../types/org';
|
|
|
|
export const orgs = writable([]);
|
|
export const currentOrg: Writable<CurrentOrg> = writable({
|
|
id: '',
|
|
name: '',
|
|
shortName: '',
|
|
siteName: '',
|
|
avatar_url: '',
|
|
memberId: '',
|
|
role_id: '',
|
|
landingpage: {},
|
|
theme: ''
|
|
});
|
|
export const orgAudience = writable([]);
|
|
export const orgTeam = writable<OrgTeamMember[]>([]);
|
|
export const currentOrgPath = derived(currentOrg, ($currentOrg) =>
|
|
$currentOrg.siteName ? `/org/${$currentOrg.siteName}` : ''
|
|
);
|
|
|
|
// Quiz
|
|
export const createQuizModal = writable({
|
|
open: false,
|
|
openEdit: false,
|
|
title: '',
|
|
id: null
|
|
});
|
|
|
|
export const deleteModal = writable({
|
|
id: null,
|
|
open: false,
|
|
isQuestion: false
|
|
});
|
|
|
|
export const quizesStore = writable([]);
|
|
|
|
export const quizStore = writable({
|
|
uuid: '',
|
|
title: '',
|
|
questions: [],
|
|
timelimit: '10s',
|
|
theme: 'standard',
|
|
pin: ''
|
|
});
|
|
|
|
export const playQuizStore = writable({
|
|
step: STEPS.CONNECT_TO_PLAY
|
|
});
|