fix: made course filter mandatory for course progress summary report

This commit is contained in:
Jannat Patel
2021-11-01 14:46:16 +05:30
parent 125b8d61d9
commit 43311dfb73
2 changed files with 4 additions and 3 deletions

View File

@@ -8,7 +8,8 @@ frappe.query_reports["Course Progress Summary"] = {
"fieldname": "course",
"label": __("Course"),
"fieldtype": "Link",
"options": "LMS Course"
"options": "LMS Course",
"reqd": 1,
}
]
};

View File

@@ -51,13 +51,13 @@
</span>
<span class="course-student-count">
{% if course.get_students() | length %}
<span class="vertically-center mr-4">
<span class="vertically-center mr-4">
<img class="icon-background" src="/assets/school/icons/user.svg" />
{{ course.get_students() | length }}
</span> {% endif %}
{% set avg_rating = course.get_average_rating() %}
{% if avg_rating %}
<span class="vertically-center ">
<span class="vertically-center">
<img class="icon-background" src="/assets/school/icons/rating.svg" />
{{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}
</span>