feat: grade exercise with AI (#296)
* working on the UI of the grading * working on the grading function of the radio and checkboxes * ai grading fully implemented with dummy functions for generating scores * working on the openai response * working on the openai response * finished with the ai_grading * finished with the ai_grading * creating new migration file * working on reviews * updated the translations * improvements --------- Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
@@ -24,6 +24,7 @@ export function fetchSubmissions(course_id: string) {
|
||||
)
|
||||
),
|
||||
status_id,
|
||||
feedback,
|
||||
course:course_id(*),
|
||||
groupmember:submitted_by(
|
||||
profile(*)
|
||||
@@ -66,6 +67,7 @@ export async function fetchSubmission({
|
||||
id,
|
||||
answers:question_answer(*),
|
||||
status_id,
|
||||
feedback,
|
||||
submitted_by:groupmember!inner(
|
||||
profile!inner(
|
||||
id,
|
||||
@@ -80,14 +82,21 @@ export async function fetchSubmission({
|
||||
}
|
||||
|
||||
export async function updateSubmission(
|
||||
{ id, status_id, total }: { id?: number; status_id?: number; total?: number },
|
||||
{
|
||||
id,
|
||||
status_id,
|
||||
total,
|
||||
feedback
|
||||
}: { id?: number; status_id?: number; total?: number; feedback?: string },
|
||||
otherArgs?: any
|
||||
) {
|
||||
const toUpdate: {
|
||||
status_id?: number;
|
||||
total?: number;
|
||||
feedback?: string;
|
||||
} = {
|
||||
status_id
|
||||
status_id,
|
||||
feedback
|
||||
};
|
||||
|
||||
if (typeof total === 'number') {
|
||||
|
||||
Reference in New Issue
Block a user