feat: course card redesign

This commit is contained in:
pateljannat
2021-06-28 12:52:10 +05:30
parent f8948ac2ef
commit 9bc5408a44
37 changed files with 389 additions and 94 deletions

View File

@@ -21,12 +21,14 @@
"engine": "InnoDB",
"field_order": [
"title",
"is_published",
"disable_self_learning",
"column_break_3",
"short_code",
"video_link",
"column_break_3",
"is_published",
"disable_self_learning",
"image",
"section_break_5",
"tags",
"short_introduction",
"description"
],
@@ -80,6 +82,17 @@
"fieldname": "disable_self_learning",
"fieldtype": "Check",
"label": "Disable Self Learning"
},
{
"fieldname": "image",
"fieldtype": "Attach Image",
"label": "Preview Image",
"reqd": 1
},
{
"fieldname": "tags",
"fieldtype": "Data",
"label": "Tags"
}
],
"index_web_pages_for_search": 1,
@@ -106,7 +119,7 @@
"link_fieldname": "course"
}
],
"modified": "2021-06-21 11:34:04.552376",
"modified": "2021-06-28 12:04:21.524161",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Course",

View File

@@ -241,6 +241,9 @@ class LMSCourse(Document):
member_names = [m['member'] for m in memberships]
return find_all("User", name=["IN", member_names])
def get_tags(self):
return self.tags.split(",") if self.tags else []
def get_outline(self):
return CourseOutline(self)

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('LMS Course Review', {
// refresh: function(frm) {
// }
});

View File

@@ -0,0 +1,49 @@
{
"actions": [],
"creation": "2021-06-28 12:30:02.111289",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"review",
"rating"
],
"fields": [
{
"fieldname": "review",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Review",
"reqd": 1
},
{
"fieldname": "rating",
"fieldtype": "Rating",
"label": "Rating"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-06-28 12:30:15.953008",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Course Review",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class LMSCourseReview(Document):
pass

View File

@@ -0,0 +1,8 @@
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
# import frappe
import unittest
class TestLMSCourseReview(unittest.TestCase):
pass