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