diff --git a/frontend/src/components/BatchFeedback.vue b/frontend/src/components/BatchFeedback.vue new file mode 100644 index 000000000..1f1f0b28c --- /dev/null +++ b/frontend/src/components/BatchFeedback.vue @@ -0,0 +1,265 @@ + + diff --git a/frontend/src/components/BatchStudents.vue b/frontend/src/components/BatchStudents.vue index 649d096eb..23bf4c85e 100644 --- a/frontend/src/components/BatchStudents.vue +++ b/frontend/src/components/BatchStudents.vue @@ -383,7 +383,7 @@ const getChartOptions = (categories) => { }, rotate: 0, formatter: function (value) { - return value.length > 30 ? `${value.substring(0, 30)}...` : value // Trim long labels + return value.length > 30 ? `${value.substring(0, 30)}...` : value }, }, }, diff --git a/frontend/src/components/JobCard.vue b/frontend/src/components/JobCard.vue index e59978f8b..a67e69cf2 100644 --- a/frontend/src/components/JobCard.vue +++ b/frontend/src/components/JobCard.vue @@ -1,5 +1,5 @@ @@ -190,12 +193,11 @@ import { BookOpen, Laptop, BookOpenCheck, - Contact2, Mail, SendIcon, MessageCircle, Globe, - ShieldCheck, + ClipboardPen, } from 'lucide-vue-next' import { formatTime, updateDocumentTitle } from '@/utils' import BatchDashboard from '@/components/BatchDashboard.vue' @@ -208,6 +210,7 @@ import AnnouncementModal from '@/components/Modals/AnnouncementModal.vue' import Discussions from '@/components/Discussions.vue' import DateRange from '@/components/Common/DateRange.vue' import BulkCertificates from '@/components/Modals/BulkCertificates.vue' +import BatchFeedback from '@/components/BatchFeedback.vue' const user = inject('$user') const showAnnouncementModal = ref(false) @@ -271,7 +274,7 @@ const tabs = computed(() => { }) batchTabs.push({ - label: 'Live Class', + label: 'Classes', icon: Laptop, }) @@ -291,6 +294,11 @@ const tabs = computed(() => { label: 'Discussions', icon: MessageCircle, }) + + batchTabs.push({ + label: 'Feedback', + icon: ClipboardPen, + }) return batchTabs }) diff --git a/lms/lms/api.py b/lms/lms/api.py index a9e2f7285..8e21b8c7f 100644 --- a/lms/lms/api.py +++ b/lms/lms/api.py @@ -603,9 +603,13 @@ def get_categories(doctype, filters): @frappe.whitelist() def get_members(start=0, search=""): """Get members for the given search term and start index. - Args: start (int): Start index for the query. - search (str): Search term to filter the results. - Returns: List of members. + Args: start (int): Start index for the query. + <<<<<<< HEAD + search (str): Search term to filter the results. + ======= + search (str): Search term to filter the results. + >>>>>>> 4869bba7bbb2fb38477d6fc29fb3b5838e075577 + Returns: List of members. """ filters = {"enabled": 1, "name": ["not in", ["Administrator", "Guest"]]} diff --git a/lms/lms/doctype/lms_batch_feedback/__init__.py b/lms/lms/doctype/lms_batch_feedback/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/lms/lms/doctype/lms_batch_feedback/lms_batch_feedback.js b/lms/lms/doctype/lms_batch_feedback/lms_batch_feedback.js new file mode 100644 index 000000000..fec296c0e --- /dev/null +++ b/lms/lms/doctype/lms_batch_feedback/lms_batch_feedback.js @@ -0,0 +1,8 @@ +// Copyright (c) 2025, Frappe and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("LMS Batch Feedback", { +// refresh(frm) { + +// }, +// }); diff --git a/lms/lms/doctype/lms_batch_feedback/lms_batch_feedback.json b/lms/lms/doctype/lms_batch_feedback/lms_batch_feedback.json new file mode 100644 index 000000000..f9a4ecb2f --- /dev/null +++ b/lms/lms/doctype/lms_batch_feedback/lms_batch_feedback.json @@ -0,0 +1,118 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2025-01-07 18:53:22.279844", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "member", + "member_name", + "member_image", + "batch", + "column_break_swst", + "content", + "delivery", + "instructors", + "value", + "feedback" + ], + "fields": [ + { + "fieldname": "member", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Member", + "options": "User", + "reqd": 1 + }, + { + "fieldname": "batch", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Batch", + "options": "LMS Batch", + "reqd": 1 + }, + { + "fieldname": "feedback", + "fieldtype": "Small Text", + "in_list_view": 1, + "label": "Feedback", + "reqd": 1 + }, + { + "fieldname": "column_break_swst", + "fieldtype": "Column Break" + }, + { + "fieldname": "content", + "fieldtype": "Rating", + "label": "Content" + }, + { + "fieldname": "delivery", + "fieldtype": "Rating", + "label": "Delivery" + }, + { + "fieldname": "instructors", + "fieldtype": "Rating", + "label": "Instructors" + }, + { + "fieldname": "value", + "fieldtype": "Rating", + "label": "Value" + }, + { + "fetch_from": "member.full_name", + "fieldname": "member_name", + "fieldtype": "Data", + "label": "Member Name", + "read_only": 1 + }, + { + "fetch_from": "member.user_image", + "fieldname": "member_image", + "fieldtype": "Attach Image", + "label": "Member Image", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2025-01-10 19:39:04.143783", + "modified_by": "Administrator", + "module": "LMS", + "name": "LMS Batch Feedback", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, + "export": 1, + "if_owner": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "LMS Student", + "share": 1, + "write": 1 + } + ], + "sort_field": "creation", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/lms/lms/doctype/lms_batch_feedback/lms_batch_feedback.py b/lms/lms/doctype/lms_batch_feedback/lms_batch_feedback.py new file mode 100644 index 000000000..43a049f3f --- /dev/null +++ b/lms/lms/doctype/lms_batch_feedback/lms_batch_feedback.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class LMSBatchFeedback(Document): + pass diff --git a/lms/lms/doctype/lms_batch_feedback/test_lms_batch_feedback.py b/lms/lms/doctype/lms_batch_feedback/test_lms_batch_feedback.py new file mode 100644 index 000000000..38b10c4fd --- /dev/null +++ b/lms/lms/doctype/lms_batch_feedback/test_lms_batch_feedback.py @@ -0,0 +1,30 @@ +# Copyright (c) 2025, Frappe and Contributors +# See license.txt + +# import frappe +from frappe.tests import IntegrationTestCase, UnitTestCase + + +# On IntegrationTestCase, the doctype test records and all +# link-field test record dependencies are recursively loaded +# Use these module variables to add/remove to/from that list +EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] +IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] + + +class UnitTestLMSBatchFeedback(UnitTestCase): + """ + Unit tests for LMSBatchFeedback. + Use this class for testing individual functions and methods. + """ + + pass + + +class IntegrationTestLMSBatchFeedback(IntegrationTestCase): + """ + Integration tests for LMSBatchFeedback. + Use this class for testing interactions between multiple components. + """ + + pass