feat: use title on lms exercise card

This commit is contained in:
Rotimi Best
2023-11-13 10:24:12 +00:00
parent 6bd27ef568
commit 78732f95f3
4 changed files with 6 additions and 7 deletions
-5
View File
@@ -1,5 +0,0 @@
[build.environment]
NODE_OPTIONS = "--max_old_space_size=4096"
[build]
command = "npm run build"
publish = "build"
+2
View File
@@ -73,6 +73,7 @@ export async function fetchLMSExercises(
id,
title,
order,
is_unlocked,
course!inner (
id,
title,
@@ -91,6 +92,7 @@ export async function fetchLMSExercises(
)
`
)
.eq('lesson.is_unlocked', true)
.eq('lesson.course.group.organisation.id', orgId)
.eq('lesson.course.group.groupmember.profile.id', profileId)
.eq('submission.groupmember.profile.id', profileId);
+1 -1
View File
@@ -15,7 +15,7 @@ interface LoadOutput {
org: CurrentOrg;
}
export const load = async ({ url, cookies }): LoadOutput => {
export const load = async ({ url, cookies }): Promise<LoadOutput> => {
// if (url.hostname === 'classroomio.com') {
// throw redirect(301, 'https://about.classroomio.com');
// }
+3 -1
View File
@@ -52,6 +52,7 @@
exerciseURL: string;
grade: string;
lessonNo: string;
lessonTitle: string;
lessonURL: string;
submissionStatus: number;
submissionUpdatedAt: string;
@@ -84,6 +85,7 @@
courseURL,
exerciseTitle: title,
exerciseURL,
lessonTitle: lesson.title,
lessonNo: lesson.order < 9 ? '0' + (lesson.order + 1) : `${lesson.order}`,
lessonURL,
submissionStatus: submissionItem.status_id,
@@ -154,7 +156,7 @@
href={item.lessonURL}
>
<p class="dark:text-white text-grey text-sm">
#Lesson {item.lessonNo}
Lesson: <span class="italic">{item.lessonTitle}</span>
</p>
</a>
<p class="dark:text-white text-gray-500 text-xs">