diff --git a/lms/lms/md.py b/lms/lms/md.py index 520be6fc..8105c72f 100644 --- a/lms/lms/md.py +++ b/lms/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/lms/www/batch/learn.html b/lms/www/batch/learn.html index 2b626d5b..a9924c1d 100644 --- a/lms/www/batch/learn.html +++ b/lms/www/batch/learn.html @@ -25,9 +25,9 @@ {% if membership %} {{ pagination(prev_url, next_url) }} {% endif %} + {{ Discussions() }} - {{ Discussions() }} {% endblock %} @@ -51,7 +51,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") }} {% if is_instructor %} {{ _("Edit") }} @@ -75,7 +75,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 %} @@ -83,22 +83,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 %}
@@ -111,7 +110,7 @@ {% if prev_url %} {% endif %} @@ -129,7 +128,7 @@
- Mark as Incomplete + {{ _("Mark as Incomplete") }}
{% endif %} @@ -137,12 +136,12 @@
{% if course.enable_certification %}
- Get Certificate + {{ _("Get Certificate") }}
{% endif %}