fix: removed unnecessary lines
This commit is contained in:
@@ -164,7 +164,7 @@ jinja = {
|
|||||||
|
|
||||||
## Specify the extension to be used to control what scripts and stylesheets
|
## Specify the extension to be used to control what scripts and stylesheets
|
||||||
## to be included in lesson pages. The specified value must be be a
|
## to be included in lesson pages. The specified value must be be a
|
||||||
## subclass of school.v.plugins.PageExtension
|
## subclass of school.plugins.PageExtension
|
||||||
# school_lesson_page_extension = None
|
# school_lesson_page_extension = None
|
||||||
|
|
||||||
#school_lesson_page_extensions = [
|
#school_lesson_page_extensions = [
|
||||||
|
|||||||
@@ -2,22 +2,19 @@
|
|||||||
{% set progress = frappe.utils.cint(membership.progress) %}
|
{% set progress = frappe.utils.cint(membership.progress) %}
|
||||||
<div class="common-card-style course-card">
|
<div class="common-card-style course-card">
|
||||||
|
|
||||||
<div class="course-image
|
<div class="course-image {% if not course.image %}default-image{% endif %}" {% if course.image %}
|
||||||
{% if not course.image %}default-image{% endif %}"
|
style="background-image: url( {{ course.image }} );" {% endif %}>
|
||||||
{% if course.image %}style="background-image: url( {{ course.image }} );" {% endif %}>
|
<div class="course-tags">
|
||||||
<div class="course-tags">
|
{% for tag in course.get_tags() %}
|
||||||
{% for tag in course.get_tags() %}
|
<div class="course-card-pills">{{ tag }}</div>
|
||||||
<div class="course-card-pills">{{ tag }}</div>
|
{% endfor %}
|
||||||
{% endfor %}
|
{% if membership and not read_only %}
|
||||||
{% if membership and not read_only %}
|
{% if progress < 100 %} <div class="course-card-pills dark-pills ml-auto">{{ frappe.utils.rounded(progress) }}%
|
||||||
{% if progress < 100 %}
|
{{ _("Completed") }}
|
||||||
<div class="course-card-pills dark-pills ml-auto">{
|
|
||||||
{ frappe.utils.rounded(progress) }}% {{ _("Completed") }}
|
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="course-card-pills dark-pills ml-auto">
|
<div class="course-card-pills dark-pills ml-auto"> <img src="/assets/community/icons/check.svg"> {{ _("Completed")
|
||||||
<img src="/assets/community/icons/check.svg"> {{ _("Completed")}}
|
}}</div>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@@ -65,123 +62,56 @@
|
|||||||
{{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}
|
{{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<<<<<<< HEAD:school/lms/widgets/CourseCard.html </div>
|
|
||||||
<div class="course-card-title">{{ course.title }}</div>
|
|
||||||
<div {% if not read_only %} class="mb-4" {% endif %}>
|
|
||||||
<span class="zindex">
|
|
||||||
{{ widgets.Avatar(member=course.get_instructor(), avatar_class="avatar-small") }}
|
|
||||||
<a class="button-links" href="{{ get_profile_url(course.get_instructor().username) }}">
|
|
||||||
<span class="course-instructor">
|
|
||||||
{{ course.get_instructor().full_name }}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
<span class="course-student-count">
|
|
||||||
{% if course.get_students() | length %}
|
|
||||||
<span class="mr-4">
|
|
||||||
<img class="icon-background" src="/assets/school/icons/user.svg" />
|
|
||||||
{{ course.get_students() | length }}
|
|
||||||
</span> {% endif %}
|
|
||||||
{% set avg_rating = course.get_average_rating() %}
|
|
||||||
{% if avg_rating %}
|
|
||||||
<span class="">
|
|
||||||
<img class="icon-background" src="/assets/school/icons/rating.svg" />
|
|
||||||
{{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if read_only %}
|
|
||||||
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
|
||||||
{% else %}
|
|
||||||
=======
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
>>>>>>> 866829af97608c49779499d9a2eba3999b24eed7:community/lms/widgets/CourseCard.html
|
|
||||||
|
|
||||||
{% if read_only %}
|
{% if read_only %}
|
||||||
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
<<<<<<< HEAD:school/lms/widgets/CourseCard.html {% if certificate %} <div class="view-course-link is-default">
|
{% set lesson_index = course.get_lesson_index(membership.current_lesson) if membership and
|
||||||
_("Get Certificate") <img class="ml-3" src="/assets/school/icons/black-arrow.svg" />
|
membership.current_lesson else '1.1' %}
|
||||||
</div>
|
{% set query_parameter = "?batch=" + membership.batch if membership and
|
||||||
<a class="stretched-link" href="/courses/{{ course.name }}/{{ certificate }}"></a>
|
membership.batch else "" %}
|
||||||
|
{% set certificate = course.is_certified() %}
|
||||||
|
|
||||||
{% elif course.enable_certification and progress == 100 %}
|
{% if certificate %}
|
||||||
<div class="view-course-link is-default" id="certification" data-course="{{ course.name }}">
|
<div class="view-course-link is-default">
|
||||||
{{ _("Get Certificate") }} <img class="ml-3" src="/assets/school/icons/black-arrow.svg" />
|
_("Get Certificate") <img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
||||||
</div>
|
</div>
|
||||||
|
<a class="stretched-link" href="/courses/{{ course.name }}/{{ certificate }}"></a>
|
||||||
|
|
||||||
{% elif progress == 100 %}
|
{% elif course.enable_certification and progress == 100 %}
|
||||||
<div class="view-course-link is-default">
|
<div class="view-course-link is-default" id="certification" data-course="{{ course.name }}">
|
||||||
{{ _("Course Completed") }} <img class="ml-3" src="/assets/school/icons/black-arrow.svg" />
|
{{ _("Get Certificate") }} <img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
||||||
</div>
|
</div>
|
||||||
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
|
||||||
|
|
||||||
{% elif course.upcoming %}
|
{% elif progress == 100 %}
|
||||||
<div class="view-course-link is-secondary border">
|
<div class="view-course-link is-default">
|
||||||
{{ _("Upcoming Course") }} <img class="ml-3" src="/assets/school/icons/black-arrow.svg" />
|
{{ _("Course Completed") }} <img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
||||||
</div>
|
</div>
|
||||||
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
||||||
|
|
||||||
{% elif membership %}
|
{% elif course.upcoming %}
|
||||||
<div class="view-course-link is-primary">
|
<div class="view-course-link is-secondary border">
|
||||||
{{ _("Continue Course") }} <img class="ml-3" src="/assets/school/icons/white-arrow.svg" />
|
{{ _("Upcoming Course") }} <img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
||||||
</div>
|
</div>
|
||||||
<a class="stretched-link" href="{{ course.get_learn_url(lesson_index) }}{{ query_parameter }}"></a>
|
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
||||||
|
|
||||||
{% else %}
|
{% elif membership %}
|
||||||
<div class="view-course-link is-default">
|
<div class="view-course-link is-primary">
|
||||||
{{ _("View Course") }} <img class="ml-3" src="/assets/school/icons/black-arrow.svg" />
|
{{ _("Continue Course") }} <img class="ml-3" src="/assets/community/icons/white-arrow.svg" />
|
||||||
</div>
|
</div>
|
||||||
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
<a class="stretched-link" href="{{ course.get_learn_url(lesson_index) }}{{ query_parameter }}"></a>
|
||||||
=======
|
|
||||||
{% set lesson_index = course.get_lesson_index(membership.current_lesson) if membership and
|
|
||||||
membership.current_lesson else '1.1' %}
|
|
||||||
{% set query_parameter = "?batch=" + membership.batch if membership and
|
|
||||||
membership.batch else "" %}
|
|
||||||
{% set certificate = course.is_certified() %}
|
|
||||||
|
|
||||||
{% if certificate %}
|
{% else %}
|
||||||
<div class="view-course-link is-default">
|
<div class="view-course-link is-default">
|
||||||
_("Get Certificate") <img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
{{ _("View Course") }} <img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
||||||
</div>
|
</div>
|
||||||
<a class="stretched-link" href="/courses/{{ course.name }}/{{ certificate }}"></a>
|
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
||||||
|
|
||||||
{% elif course.enable_certification and progress == 100 %}
|
{% endif %}
|
||||||
<div class="view-course-link is-default" id="certification" data-course="{{ course.name }}">
|
{% endif %}
|
||||||
{{ _("Get Certificate") }} <img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% elif progress == 100 %}
|
|
||||||
<div class="view-course-link is-default">
|
|
||||||
{{ _("Course Completed") }} <img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
|
||||||
</div>
|
|
||||||
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
|
||||||
|
|
||||||
{% elif course.upcoming %}
|
|
||||||
<div class="view-course-link is-secondary border">
|
|
||||||
{{ _("Upcoming Course") }} <img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
|
||||||
</div>
|
|
||||||
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
|
||||||
|
|
||||||
{% elif membership %}
|
|
||||||
<div class="view-course-link is-primary">
|
|
||||||
{{ _("Continue Course") }} <img class="ml-3" src="/assets/community/icons/white-arrow.svg" />
|
|
||||||
</div>
|
|
||||||
<a class="stretched-link" href="{{ course.get_learn_url(lesson_index) }}{{ query_parameter }}"></a>
|
|
||||||
>>>>>>> 866829af97608c49779499d9a2eba3999b24eed7:community/lms/widgets/CourseCard.html
|
|
||||||
|
|
||||||
{% else %}
|
|
||||||
<div class="view-course-link is-default">
|
|
||||||
{{ _("View Course") }} <img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
|
||||||
</div>
|
|
||||||
<a class="stretched-link" href="/courses/{{ course.name }}"></a>
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -207,7 +137,7 @@ membership.batch else "" %}
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
course = $(e.currentTarget).attr("data-course");
|
course = $(e.currentTarget).attr("data-course");
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "school.lms.doctype.lms_certification.lms_certification.create_certificate",
|
method: "community.lms.doctype.lms_certification.lms_certification.create_certificate",
|
||||||
args: {
|
args: {
|
||||||
"course": course
|
"course": course
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user