Merge branch 'develop' into make-tab-sticky

This commit is contained in:
Ejaaz Khan
2024-11-09 00:08:23 +05:30
committed by GitHub
5 changed files with 200 additions and 196 deletions

View File

@@ -154,10 +154,12 @@ function submitEvaluation(close) {
const getCourses = () => {
let courses = []
for (const course of props.courses) {
courses.push({
label: course.title,
value: course.course,
})
if (course.evaluator) {
courses.push({
label: course.title,
value: course.course,
})
}
}
return courses
}

View File

@@ -88,6 +88,7 @@
doctype="User"
:label="__('Instructors')"
:required="true"
:filters="{ ignore_user_type: 1 }"
/>
<div class="mb-4">
<FormControl

View File

@@ -152,6 +152,7 @@
v-model="instructors"
doctype="User"
:label="__('Instructors')"
:filters="{ ignore_user_type: 1 }"
:required="true"
/>
</div>

View File

@@ -1103,7 +1103,7 @@ def get_categorized_courses(courses):
categories = [live, enrolled, created]
for category in categories:
category.sort(key=lambda x: x.enrollments, reverse=True)
category.sort(key=lambda x: cint(x.enrollments), reverse=True)
live.sort(key=lambda x: x.featured, reverse=True)
@@ -1265,7 +1265,7 @@ def get_batch_details(batch):
batch_details.instructors = get_instructors(batch)
batch_details.courses = frappe.get_all(
"Batch Course", filters={"parent": batch}, fields=["course", "title"]
"Batch Course", filters={"parent": batch}, fields=["course", "title", "evaluator"]
)
batch_details.students = frappe.get_all(
"Batch Student", {"parent": batch}, pluck="student"

File diff suppressed because it is too large Load Diff