From 23e2611725ef7626166f0a7449854f7535ea8d53 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 7 Mar 2022 12:52:09 +0530 Subject: [PATCH 1/2] feat: discussions redesign --- school/lms/md.py | 2 +- school/www/batch/learn.html | 43 ++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/school/lms/md.py b/school/lms/md.py index 5acb6322..ce410d81 100644 --- a/school/lms/md.py +++ b/school/lms/md.py @@ -99,7 +99,7 @@ class MacroInlineProcessor(InlineProcessor): return e, m.start(0), m.end(0) def sanitize_html(html, macro): - """Sanotize the html using BeautifulSoup. + """Sanitize the html using BeautifulSoup. The markdown processor request the correct markup and crashes on any broken tags. This makes sures that all those things are fixed diff --git a/school/www/batch/learn.html b/school/www/batch/learn.html index 34a5bd52..0e07aa39 100644 --- a/school/www/batch/learn.html +++ b/school/www/batch/learn.html @@ -25,9 +25,9 @@ {% if membership %} {{ pagination(prev_url, next_url) }} {% endif %} + {{ Discussions() }} - {{ Discussions() }} {% endblock %} @@ -41,7 +41,7 @@ {% if membership %} is-member {% endif %} {% if membership or is_instructor %} eligible-for-submission {% endif %}" data-lesson="{{ lesson.name }}" data-course="{{ course.name }}">{{ lesson.title }} - COMPLETED + {{ _("COMPLETED") }}
@@ -62,7 +62,7 @@ {% if ins_len == 1 %} {{ instructors[0].full_name }} {% else %} - {% set suffix = "other" if ins_len - 1 == 1 else "others" %} + {% set suffix = _("other") if ins_len - 1 == 1 else _("others") %} {{ instructors[0].full_name.split(" ")[0] }} and {{ ins_len - 1 }} {{ suffix }} {% endif %} @@ -70,22 +70,21 @@
{{ frappe.utils.format_date(lesson.creation, "medium") }}
-
- {% if membership or lesson.include_in_preview or is_instructor %} - {% if is_instructor and not lesson.include_in_preview %} -
- This lesson is not available for preview. As you are the Instructor of the course only you can see it. - × -
- {% endif %} - {{ render_html(lesson.body) }} - {% else %} -
- Start Learning -
This lesson is not available for preview. Please join the course to access it.
-
- {% endif %} + {% if membership or lesson.include_in_preview or is_instructor %} + {% if is_instructor and not lesson.include_in_preview %} +
+ {{ _("This lesson is not available for preview. As you are the Instructor of the course only you can see it.") }} + × +
+ {% endif %} + {{ render_html(lesson.body) }} + {% else %} +
+ {{ _("Start Learning") }} +
{{ _("This lesson is not available for preview. Please join the course to access it.") }}
+
+ {% endif %}
@@ -98,7 +97,7 @@ {% if prev_url %} {% endif %} @@ -116,7 +115,7 @@
- Mark as Incomplete + {{ _("Mark as Incomplete") }}
{% endif %} @@ -124,12 +123,12 @@
{% if course.enable_certification %}
- Get Certificate + {{ _("Get Certificate") }}
{% endif %}
From 0523f701c2d255cb6b68b85dcce8b9307cbf83af Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Thu, 31 Mar 2022 18:03:11 +0530 Subject: [PATCH 2/2] fix: profile page fixes --- lms/public/css/style.css | 3 +-- lms/www/profiles/profile.html | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 946bbca9..f56cd446 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -677,7 +677,7 @@ input[type=checkbox] { font-size: var(--text-sm); display: flex; flex-direction: column; - margin-bottom: 4rem; + margin-bottom: 3rem; padding-left: 200px; padding-right: 1rem; box-shadow: var(--shadow-sm); @@ -1359,7 +1359,6 @@ pre { .profile-page-body { background-color: var(--gray-50); - padding: 2.5rem 0; } .profile-column-grid { diff --git a/lms/www/profiles/profile.html b/lms/www/profiles/profile.html index 97d96288..7038e7c8 100644 --- a/lms/www/profiles/profile.html +++ b/lms/www/profiles/profile.html @@ -19,7 +19,6 @@
- {{ CoursesEnrolled(member, read_only) }} {{ CoursesCreated(member, read_only) }} {{ CoursesMentored(member, read_only) }} {{ ProfileTabs(profile_tabs) }}