diff --git a/frontend/src/components/Assignment.vue b/frontend/src/components/Assignment.vue index 1f522ad09..004a9d647 100644 --- a/frontend/src/components/Assignment.vue +++ b/frontend/src/components/Assignment.vue @@ -281,7 +281,6 @@ watch(submissionResource, () => { if (submissionResource.doc.answer) { answer.value = submissionResource.doc.answer } - if (submissionResource.isDirty) { isDirty.value = true } else if (showUploader() && !submissionFile.value) { @@ -309,6 +308,7 @@ const submitAssignment = () => { submissionResource.setValue.submit( { ...submissionResource.doc, + assignment_attachment: submissionFile.value?.file_url, evaluator: evaluator, }, { @@ -351,6 +351,7 @@ const addNewSubmission = () => { } const saveSubmission = (file) => { + isDirty.value = true submissionFile.value = file } @@ -401,6 +402,7 @@ const validateFile = (file) => { } const removeSubmission = () => { + isDirty.value = true submissionFile.value = null } diff --git a/frontend/src/components/BatchStudents.vue b/frontend/src/components/BatchStudents.vue index f72e9fd0c..fd3f8ff34 100644 --- a/frontend/src/components/BatchStudents.vue +++ b/frontend/src/components/BatchStudents.vue @@ -5,7 +5,7 @@ {{ __('Statistics') }} -
+
@@ -22,6 +22,22 @@
+
+
+ +
+
+ + {{ certificationCount.data }} + + + {{ __('Certified') }} + +
+
+
@@ -210,7 +226,7 @@ import { } from 'frappe-ui' import { BookOpen, - Clipboard, + GraduationCap, Plus, ShieldCheck, Trash2, @@ -410,6 +426,17 @@ watch(students, () => { assessmentCount.value = Object.keys(students.data?.[0].assessments).length } }) + +const certificationCount = createResource({ + url: 'frappe.client.get_count', + params: { + doctype: 'LMS Certificate', + filters: { + batch_name: props.batch.name, + }, + }, + auto: true, +})