From dd2f830a334f2d37caf44a27902c8419145f5fdc Mon Sep 17 00:00:00 2001 From: pateljannat Date: Fri, 23 Jul 2021 19:07:26 +0530 Subject: [PATCH] fix: upcoming course and doctype cleanup --- community/lms/doctype/chapter/chapter.json | 9 +------ .../lms/doctype/lms_course/lms_course.json | 26 +++++++++---------- community/lms/doctype/lms_quiz/lms_quiz.json | 5 ++-- community/lms/widgets/CourseCard.html | 8 ++++-- community/public/css/style.css | 6 +++++ 5 files changed, 29 insertions(+), 25 deletions(-) diff --git a/community/lms/doctype/chapter/chapter.json b/community/lms/doctype/chapter/chapter.json index 93a1c09f..8b60641a 100644 --- a/community/lms/doctype/chapter/chapter.json +++ b/community/lms/doctype/chapter/chapter.json @@ -9,7 +9,6 @@ "course", "title", "description", - "locked", "index_" ], "fields": [ @@ -24,12 +23,6 @@ "fieldtype": "Markdown Editor", "label": "Description" }, - { - "default": "0", - "fieldname": "locked", - "fieldtype": "Check", - "label": "Locked" - }, { "fieldname": "course", "fieldtype": "Link", @@ -52,7 +45,7 @@ "link_fieldname": "chapter" } ], - "modified": "2021-05-13 21:05:20.531890", + "modified": "2021-07-23 19:03:57.946831", "modified_by": "Administrator", "module": "LMS", "name": "Chapter", diff --git a/community/lms/doctype/lms_course/lms_course.json b/community/lms/doctype/lms_course/lms_course.json index a654c9e0..d6358fbf 100644 --- a/community/lms/doctype/lms_course/lms_course.json +++ b/community/lms/doctype/lms_course/lms_course.json @@ -21,14 +21,14 @@ "engine": "InnoDB", "field_order": [ "title", - "short_code", "video_link", - "column_break_3", - "is_published", - "disable_self_learning", "image", - "section_break_5", + "column_break_3", "tags", + "is_published", + "upcoming", + "disable_self_learning", + "section_break_5", "short_introduction", "description" ], @@ -53,11 +53,6 @@ "fieldtype": "Check", "label": "Published" }, - { - "fieldname": "short_code", - "fieldtype": "Data", - "label": "Short Code" - }, { "fieldname": "column_break_3", "fieldtype": "Column Break" @@ -92,6 +87,12 @@ "fieldname": "tags", "fieldtype": "Data", "label": "Tags" + }, + { + "default": "0", + "fieldname": "upcoming", + "fieldtype": "Check", + "label": "Is an Upcoming Course" } ], "index_web_pages_for_search": 1, @@ -118,7 +119,7 @@ "link_fieldname": "course" } ], - "modified": "2021-07-09 15:05:05.372430", + "modified": "2021-07-23 19:01:29.765570", "modified_by": "Administrator", "module": "LMS", "name": "LMS Course", @@ -141,6 +142,5 @@ "sort_field": "creation", "sort_order": "DESC", "title_field": "title", - "track_changes": 1, - "track_views": 1 + "track_changes": 1 } \ No newline at end of file diff --git a/community/lms/doctype/lms_quiz/lms_quiz.json b/community/lms/doctype/lms_quiz/lms_quiz.json index 85cd2c42..e76c35a5 100644 --- a/community/lms/doctype/lms_quiz/lms_quiz.json +++ b/community/lms/doctype/lms_quiz/lms_quiz.json @@ -27,12 +27,13 @@ "fieldname": "lesson", "fieldtype": "Link", "label": "Lesson", - "options": "Lesson" + "options": "Lesson", + "read_only": 1 } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-06-23 17:58:57.642873", + "modified": "2021-07-23 19:06:12.551633", "modified_by": "Administrator", "module": "LMS", "name": "LMS Quiz", diff --git a/community/lms/widgets/CourseCard.html b/community/lms/widgets/CourseCard.html index ba0250ee..04a8e47a 100644 --- a/community/lms/widgets/CourseCard.html +++ b/community/lms/widgets/CourseCard.html @@ -53,15 +53,19 @@ {% set query_parameter = "?batch=" + membership.batch if membership and membership.batch else "" %} - {% if membership %} + {% if course.upcoming %} + + + {% elif membership %} {% else %} - diff --git a/community/public/css/style.css b/community/public/css/style.css index 32220a32..397628c5 100644 --- a/community/public/css/style.css +++ b/community/public/css/style.css @@ -653,6 +653,12 @@ div.custom-checkbox>label>input:checked+img { color: #FFFFFF; } +.is-default { + background-color: white; + border: 1px solid #C8CFD5; + box-sizing: border-box; +} + .course-home-outline { margin-top: 3rem; flex: 1;