CLASSROOMIO-T-150: Add teacher to course + linear lesson content
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 <[email protected]> Merge-request: CLASSROOMIO-MR-69 Merged-by: Best Admin <[email protected]>
This commit is contained in:
committed by
Space Cloud
co-authored by
Rotimi Best
parent
b075bbc5de
commit
7523e6c3e7
@@ -22,16 +22,16 @@ export const course: Writable<Course> = writable({
|
||||
discount: 0,
|
||||
reward: {
|
||||
show: false,
|
||||
description: '',
|
||||
description: ''
|
||||
},
|
||||
instructor: {
|
||||
name: '',
|
||||
role: '',
|
||||
coursesNo: 0,
|
||||
description: '',
|
||||
imgUrl: '',
|
||||
},
|
||||
},
|
||||
imgUrl: ''
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export const mockGroupMember = {
|
||||
@@ -46,15 +46,15 @@ export const mockGroupMember = {
|
||||
username: 'robertblake',
|
||||
avatar_url: '',
|
||||
created_at: '2021-08-08T13:42:13+00:00',
|
||||
updated_at: '2021-08-08T13:42:13+00:00',
|
||||
},
|
||||
updated_at: '2021-08-08T13:42:13+00:00'
|
||||
}
|
||||
};
|
||||
|
||||
export const group = writable({
|
||||
id: null,
|
||||
tutors: [],
|
||||
students: [],
|
||||
people: [],
|
||||
people: []
|
||||
});
|
||||
|
||||
export async function setCourse(data: Course, setLesson = true) {
|
||||
@@ -65,7 +65,7 @@ export async function setCourse(data: Course, setLesson = true) {
|
||||
const groupData = Object.assign(data.group, {
|
||||
tutors: [],
|
||||
students: [],
|
||||
people: [],
|
||||
people: []
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
@@ -77,7 +77,10 @@ export async function setCourse(data: Course, setLesson = true) {
|
||||
groupData.students.push(member);
|
||||
} else if (member.profile) {
|
||||
// @ts-ignore
|
||||
groupData.tutors.push(member.profile);
|
||||
groupData.tutors.push({
|
||||
...member.profile,
|
||||
memberId: member.id
|
||||
});
|
||||
|
||||
// tutorsById[member.profile.id] = member.profile;
|
||||
}
|
||||
@@ -120,15 +123,15 @@ export async function setCourse(data: Course, setLesson = true) {
|
||||
discount: 0,
|
||||
reward: {
|
||||
show: false,
|
||||
description: '',
|
||||
description: ''
|
||||
},
|
||||
instructor: {
|
||||
name: '',
|
||||
role: '',
|
||||
coursesNo: 0,
|
||||
description: '',
|
||||
imgUrl: '',
|
||||
},
|
||||
imgUrl: ''
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user