diff --git a/lms/lms/doctype/lms_course_progress/lms_course_progress.json b/lms/lms/doctype/lms_course_progress/lms_course_progress.json index 78452c69..91de677d 100644 --- a/lms/lms/doctype/lms_course_progress/lms_course_progress.json +++ b/lms/lms/doctype/lms_course_progress/lms_course_progress.json @@ -5,6 +5,8 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "member", + "member_name", "status", "column_break_3", "lesson", @@ -26,7 +28,6 @@ "fetch_from": "lesson.chapter", "fieldname": "chapter", "fieldtype": "Link", - "in_list_view": 1, "label": "Chapter", "options": "Course Chapter", "read_only": 1 @@ -49,11 +50,24 @@ { "fieldname": "column_break_3", "fieldtype": "Column Break" + }, + { + "fieldname": "member", + "fieldtype": "Link", + "label": "Member", + "options": "User" + }, + { + "fetch_from": "member.full_name", + "fieldname": "member_name", + "fieldtype": "Data", + "label": "Member Name", + "read_only": 1 } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-09-30 13:07:54.246863", + "modified": "2022-11-09 14:24:06.312623", "modified_by": "Administrator", "module": "LMS", "name": "LMS Course Progress", @@ -74,5 +88,7 @@ ], "sort_field": "modified", "sort_order": "DESC", + "states": [], + "title_field": "member_name", "track_changes": 1 } \ No newline at end of file diff --git a/lms/patches.txt b/lms/patches.txt index ba88ca6a..9438129d 100644 --- a/lms/patches.txt +++ b/lms/patches.txt @@ -34,3 +34,4 @@ lms.patches.v0_0.create_course_instructor_role #29-08-2022 lms.patches.v0_0.create_course_moderator_role lms.patches.v0_0.set_dashboard #11-10-2022 lms.patches.v0_0.set_courses_page_as_home +lms.patches.v0_0.set_member_in_progress diff --git a/lms/patches/v0_0/set_member_in_progress.py b/lms/patches/v0_0/set_member_in_progress.py new file mode 100644 index 00000000..e67f688a --- /dev/null +++ b/lms/patches/v0_0/set_member_in_progress.py @@ -0,0 +1,10 @@ +import frappe + + +def execute(): + progress_records = frappe.get_all("LMS Course Progress", fields=["name", "owner"]) + + for progress in progress_records: + full_name = frappe.db.get_value("User", progress.owner, "full_name") + frappe.db.set_value("LMS Course Progress", progress.name, "member", progress.owner) + frappe.db.set_value("LMS Course Progress", progress.name, "member_name", full_name) diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 54203126..a1be2240 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -1216,9 +1216,9 @@ pre { } .preview-video { - width: 100%; - height: 190px; - border: none; + width: 100%; + height: 190px; + border: none; } .course-body-container { @@ -1715,6 +1715,11 @@ li { grid-gap: 2rem; } +.tab-pane .stats-parent { + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + grid-gap: 1rem; +} + .stats-label { color: var(--gray-900); font-weight: 500; @@ -1770,8 +1775,8 @@ li { .frappe-chart .title { font-size: 1rem; - font-weight: bold; - color: var(--gray-900); + font-weight: 500; + fill: var(--gray-900); } .course-description-section { @@ -1799,3 +1804,7 @@ select { appearance: none; -webkit-appearance: none; } + +.course-list-cta { + float: right; +} diff --git a/lms/templates/statistics.html b/lms/templates/statistics.html index 57b84e68..94ea9c1c 100644 --- a/lms/templates/statistics.html +++ b/lms/templates/statistics.html @@ -33,17 +33,43 @@ {% endif %} - {% if enrollment_count %} -