grading improvements
This commit is contained in:
@@ -46,7 +46,11 @@
|
|||||||
const student = getStudent($group.students, $profile.id);
|
const student = getStudent($group.students, $profile.id);
|
||||||
const teacherFullname = $group.tutors[0]?.fullname;
|
const teacherFullname = $group.tutors[0]?.fullname;
|
||||||
const teacherEmail = $group.tutors[0]?.email;
|
const teacherEmail = $group.tutors[0]?.email;
|
||||||
|
console.log({
|
||||||
|
student,
|
||||||
|
teacherFullname,
|
||||||
|
teacherEmail
|
||||||
|
});
|
||||||
if (!student || !teacherFullname || !teacherEmail) return;
|
if (!student || !teacherFullname || !teacherEmail) return;
|
||||||
|
|
||||||
const baseUrl = `https://app.classroomio.com/courses/${$course.id}`;
|
const baseUrl = `https://app.classroomio.com/courses/${$course.id}`;
|
||||||
|
|||||||
@@ -66,14 +66,13 @@
|
|||||||
const { input, handleSubmit, completion } = useCompletion({
|
const { input, handleSubmit, completion } = useCompletion({
|
||||||
api: '/api/completion/exerciseprompt',
|
api: '/api/completion/exerciseprompt',
|
||||||
onFinish: async (prompt: string, completion: string) => {
|
onFinish: async (prompt: string, completion: string) => {
|
||||||
$isLoading = false;
|
|
||||||
|
|
||||||
if (!$lesson.id) return;
|
if (!$lesson.id) return;
|
||||||
|
|
||||||
toggleConfetti();
|
toggleConfetti();
|
||||||
const template: ExerciseTemplate = JSON.parse($completion);
|
const template: ExerciseTemplate = JSON.parse($completion);
|
||||||
await handleTemplateCreate(template);
|
await handleTemplateCreate(template);
|
||||||
toggleConfetti();
|
toggleConfetti();
|
||||||
|
$isLoading = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import TextField from '$lib/components/Form/TextField.svelte';
|
import TextField from '$lib/components/Form/TextField.svelte';
|
||||||
export let gradeMax = 0;
|
export let gradeMax = 0;
|
||||||
export let disableGrading = false;
|
export let disableGrading = false;
|
||||||
export let grade: number | undefined = 0;
|
export let grade: number | undefined;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if typeof grade === 'number'}
|
{#if typeof grade === 'number'}
|
||||||
|
|||||||
Reference in New Issue
Block a user