mirror of
https://github.com/frappe/lms.git
synced 2026-05-02 13:39:31 +03:00
Merge branch 'main' of https://github.com/frappe/lms into certification
This commit is contained in:
+1
-1
@@ -99,7 +99,7 @@ class MacroInlineProcessor(InlineProcessor):
|
|||||||
return e, m.start(0), m.end(0)
|
return e, m.start(0), m.end(0)
|
||||||
|
|
||||||
def sanitize_html(html, macro):
|
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
|
The markdown processor request the correct markup and crashes on
|
||||||
any broken tags. This makes sures that all those things are fixed
|
any broken tags. This makes sures that all those things are fixed
|
||||||
|
|||||||
@@ -677,7 +677,7 @@ input[type=checkbox] {
|
|||||||
font-size: var(--text-sm);
|
font-size: var(--text-sm);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-bottom: 4rem;
|
margin-bottom: 3rem;
|
||||||
padding-left: 200px;
|
padding-left: 200px;
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
box-shadow: var(--shadow-sm);
|
box-shadow: var(--shadow-sm);
|
||||||
@@ -1359,7 +1359,6 @@ pre {
|
|||||||
|
|
||||||
.profile-page-body {
|
.profile-page-body {
|
||||||
background-color: var(--gray-50);
|
background-color: var(--gray-50);
|
||||||
padding: 2.5rem 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-column-grid {
|
.profile-column-grid {
|
||||||
|
|||||||
+21
-22
@@ -25,9 +25,9 @@
|
|||||||
{% if membership %}
|
{% if membership %}
|
||||||
{{ pagination(prev_url, next_url) }}
|
{{ pagination(prev_url, next_url) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{{ Discussions() }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ Discussions() }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
{% if membership %} is-member {% endif %}
|
{% if membership %} is-member {% endif %}
|
||||||
{% if membership or is_instructor %} eligible-for-submission {% endif %}" data-lesson="{{ lesson.name }}"
|
{% if membership or is_instructor %} eligible-for-submission {% endif %}" data-lesson="{{ lesson.name }}"
|
||||||
data-course="{{ course.name }}">{{ lesson.title }}</div>
|
data-course="{{ course.name }}">{{ lesson.title }}</div>
|
||||||
<span class="lesson-progress {{hide if get_progress(course.name, lesson.name) != 'Complete' else ''}}">COMPLETED</span>
|
<span class="lesson-progress {{hide if get_progress(course.name, lesson.name) != 'Complete' else ''}}">{{ _("COMPLETED") }}</span>
|
||||||
|
|
||||||
{% if is_instructor %}
|
{% if is_instructor %}
|
||||||
<a class="button is-default button-links ml-auto" href="/lesson?name={{ lesson.name }}"> {{ _("Edit") }} </a>
|
<a class="button is-default button-links ml-auto" href="/lesson?name={{ lesson.name }}"> {{ _("Edit") }} </a>
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
{% if ins_len == 1 %}
|
{% if ins_len == 1 %}
|
||||||
{{ instructors[0].full_name }}
|
{{ instructors[0].full_name }}
|
||||||
{% else %}
|
{% 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 }}
|
{{ instructors[0].full_name.split(" ")[0] }} and {{ ins_len - 1 }} {{ suffix }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
@@ -83,22 +83,21 @@
|
|||||||
<div class="ml-5 course-meta"> {{ frappe.utils.format_date(lesson.creation, "medium") }} </div>
|
<div class="ml-5 course-meta"> {{ frappe.utils.format_date(lesson.creation, "medium") }} </div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="markdown-source lesson-content-card">
|
<div class="markdown-source lesson-content-card">
|
||||||
{% if membership or lesson.include_in_preview or is_instructor %}
|
{% if membership or lesson.include_in_preview or is_instructor %}
|
||||||
{% if is_instructor and not lesson.include_in_preview %}
|
{% if is_instructor and not lesson.include_in_preview %}
|
||||||
<div class="small alert alert-secondary alert-dismissible mt-4 mb-4">
|
<div class="small alert alert-secondary alert-dismissible mt-4 mb-4">
|
||||||
This lesson is not available for preview. As you are the Instructor of the course only you can see it.
|
{{ _("This lesson is not available for preview. As you are the Instructor of the course only you can see it.") }}
|
||||||
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ render_html(lesson.body) }}
|
{{ render_html(lesson.body) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="">
|
<div class="">
|
||||||
<a class="button is-primary pull-right" href="/courses/{{ course.name }}"> Start Learning </a>
|
<a class="button is-primary pull-right" href="/courses/{{ course.name }}"> {{ _("Start Learning") }} </a>
|
||||||
<div class="">This lesson is not available for preview. Please join the course to access it.</div>
|
<div class=""> {{ _("This lesson is not available for preview. Please join the course to access it.") }} </div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -111,7 +110,7 @@
|
|||||||
{% if prev_url %}
|
{% if prev_url %}
|
||||||
<a class="button is-secondary dark-links prev" href="{{ prev_url }}">
|
<a class="button is-secondary dark-links prev" href="{{ prev_url }}">
|
||||||
<img class="mr-2" src="/assets/lms/icons/left-arrow.svg">
|
<img class="mr-2" src="/assets/lms/icons/left-arrow.svg">
|
||||||
Prev
|
{{ _("Prev") }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@@ -129,7 +128,7 @@
|
|||||||
|
|
||||||
<div class="button is-secondary mark-progress {{ progress }} {% if progress == 'Incomplete' or progress == None %} hide {% endif %}"
|
<div class="button is-secondary mark-progress {{ progress }} {% if progress == 'Incomplete' or progress == None %} hide {% endif %}"
|
||||||
data-progress="Incomplete">
|
data-progress="Incomplete">
|
||||||
Mark as Incomplete
|
{{ _("Mark as Incomplete") }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -137,12 +136,12 @@
|
|||||||
<div>
|
<div>
|
||||||
<a class="button is-primary next {% if membership.progress|int == 100 and not next_url %} hide {% endif %}"
|
<a class="button is-primary next {% if membership.progress|int == 100 and not next_url %} hide {% endif %}"
|
||||||
{% if next_url %} data-href="{{ next_url }}" {% endif %} href="">
|
{% if next_url %} data-href="{{ next_url }}" {% endif %} href="">
|
||||||
{% if next_url %} Next {% else %} Mark as Complete {% endif %}
|
{% if next_url %} {{ _("Next") }} {% else %} {{ _("Mark as Complete") }} {% endif %}
|
||||||
<img class="ml-2" src="/assets/lms/icons/side-arrow-white.svg">
|
<img class="ml-2" src="/assets/lms/icons/side-arrow-white.svg">
|
||||||
</a>
|
</a>
|
||||||
{% if course.enable_certification %}
|
{% if course.enable_certification %}
|
||||||
<div class="button is-primary {% if membership.progress|int != 100 or next_url %} hide {% endif %}" id="certification">
|
<div class="button is-primary {% if membership.progress|int != 100 or next_url %} hide {% endif %}" id="certification">
|
||||||
Get Certificate
|
{{ _("Get Certificate") }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{ CoursesEnrolled(member, read_only) }}
|
|
||||||
{{ CoursesCreated(member, read_only) }}
|
{{ CoursesCreated(member, read_only) }}
|
||||||
{{ CoursesMentored(member, read_only) }}
|
{{ CoursesMentored(member, read_only) }}
|
||||||
{{ ProfileTabs(profile_tabs) }}
|
{{ ProfileTabs(profile_tabs) }}
|
||||||
|
|||||||
Reference in New Issue
Block a user