fix: batch instructor should be linked to evaluator

This commit is contained in:
Jannat Patel
2025-06-05 12:58:12 +05:30
parent eb9b1c905d
commit 1a1cbd6ea1
6 changed files with 33 additions and 7 deletions

View File

@@ -55,9 +55,10 @@
</div>
</li>
</ComboboxOption>
<div class="h-10"></div>
<div
v-if="attrs.onCreate"
class="absolute bottom-2 left-1 w-[98%] pt-2 bg-white border-t"
class="absolute bottom-2 left-1 w-[99%] pt-2 bg-white border-t"
>
<Button
variant="ghost"

View File

@@ -33,6 +33,7 @@
:placeholder="__('Email')"
type="email"
class="w-full"
@keydown.enter="addEvaluator"
/>
<Button @click="addEvaluator()" variant="subtle">
{{ __('Add') }}

View File

@@ -23,10 +23,10 @@
/>
<MultiSelect
v-model="instructors"
doctype="User"
doctype="Course Evaluator"
:label="__('Instructors')"
:required="true"
:onCreate="(close) => openSettings('Members', close)"
:onCreate="(close) => openSettings('Evaluators', close)"
:filters="{ ignore_user_type: 1 }"
/>
</div>

View File

@@ -86,8 +86,8 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-03-26 14:02:46.588721",
"modified_by": "Administrator",
"modified": "2025-06-05 11:04:32.475711",
"modified_by": "sayali@frappe.io",
"module": "LMS",
"name": "Course Evaluator",
"naming_rule": "By fieldname",
@@ -133,5 +133,6 @@
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": []
"states": [],
"title_field": "full_name"
}

View File

@@ -107,4 +107,5 @@ lms.patches.v2_0.update_course_evaluator_data
lms.patches.v2_0.move_zoom_settings #20-05-2025
lms.patches.v2_0.link_zoom_account_to_live_class
lms.patches.v2_0.link_zoom_account_to_batch
lms.patches.v2_0.sidebar_for_certified_members
lms.patches.v2_0.sidebar_for_certified_members
lms.patches.v2_0.move_batch_instructors_to_evaluators

View File

@@ -0,0 +1,22 @@
import frappe
def execute():
batch_instructors = frappe.get_all(
"Course Instructor",
{
"parenttype": "LMS Batch",
},
["name", "instructor", "parent"],
)
for instructor in batch_instructors:
if not frappe.db.exists(
"Course Evaluator",
{
"evaluator": instructor.instructor,
},
):
doc = frappe.new_doc("Course Evaluator")
doc.evaluator = instructor.instructor
doc.insert()