fix: batch instructor should be linked to evaluator
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
:placeholder="__('Email')"
|
||||
type="email"
|
||||
class="w-full"
|
||||
@keydown.enter="addEvaluator"
|
||||
/>
|
||||
<Button @click="addEvaluator()" variant="subtle">
|
||||
{{ __('Add') }}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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
|
||||
22
lms/patches/v2_0/move_batch_instructors_to_evaluators.py
Normal file
22
lms/patches/v2_0/move_batch_instructors_to_evaluators.py
Normal 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()
|
||||
Reference in New Issue
Block a user