feat: cerificate price
This commit is contained in:
@@ -2,5 +2,13 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Course Evaluator', {
|
frappe.ui.form.on('Course Evaluator', {
|
||||||
|
onload: (frm) => {
|
||||||
|
frm.set_query('evaluator', function(doc) {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
"ignore_user_type": 1,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('LMS Certificate', {
|
frappe.ui.form.on('LMS Certificate', {
|
||||||
onload: function (frm) {
|
onload: function (frm) {
|
||||||
frm.set_query("student", function (doc) {
|
frm.set_query("member", function (doc) {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"ignore_user_type": 1,
|
"ignore_user_type": 1,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"field_order": [
|
"field_order": [
|
||||||
"course",
|
"course",
|
||||||
"member",
|
"member",
|
||||||
|
"member_name",
|
||||||
"column_break_3",
|
"column_break_3",
|
||||||
"issue_date",
|
"issue_date",
|
||||||
"expiry_date"
|
"expiry_date"
|
||||||
@@ -44,11 +45,18 @@
|
|||||||
"label": "Member",
|
"label": "Member",
|
||||||
"options": "User",
|
"options": "User",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "member.full_name",
|
||||||
|
"fieldname": "member_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Member Name",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-04-05 14:19:34.409244",
|
"modified": "2022-04-06 11:49:36.077370",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS Certificate",
|
"name": "LMS Certificate",
|
||||||
@@ -70,6 +78,6 @@
|
|||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"states": [],
|
"states": [],
|
||||||
"title_field": "member",
|
"title_field": "member_name",
|
||||||
"track_changes": 1
|
"track_changes": 1
|
||||||
}
|
}
|
||||||
@@ -20,5 +20,13 @@ frappe.ui.form.on('LMS Certificate Evaluation', {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frm.set_query('member', function(doc) {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
"ignore_user_type": 1,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"field_order": [
|
"field_order": [
|
||||||
"course",
|
"course",
|
||||||
"member",
|
"member",
|
||||||
|
"member_name",
|
||||||
"date",
|
"date",
|
||||||
"start_time",
|
"start_time",
|
||||||
"end_time",
|
"end_time",
|
||||||
@@ -28,7 +29,6 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "member",
|
"fieldname": "member",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Member",
|
"label": "Member",
|
||||||
"options": "User",
|
"options": "User",
|
||||||
@@ -68,11 +68,18 @@
|
|||||||
"fieldname": "end_time",
|
"fieldname": "end_time",
|
||||||
"fieldtype": "Time",
|
"fieldtype": "Time",
|
||||||
"label": "End Time"
|
"label": "End Time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "member.full_name",
|
||||||
|
"fieldname": "member_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Member Name",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-04-01 16:26:39.168390",
|
"modified": "2022-04-06 11:44:17.051279",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS Certificate Evaluation",
|
"name": "LMS Certificate Evaluation",
|
||||||
@@ -93,5 +100,6 @@
|
|||||||
],
|
],
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"states": []
|
"states": [],
|
||||||
|
"title_field": "member_name"
|
||||||
}
|
}
|
||||||
@@ -9,5 +9,15 @@ frappe.ui.form.on('LMS Certificate Request', {
|
|||||||
frm: frm
|
frm: frm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onload: function(frm) {
|
||||||
|
frm.set_query('member', function(doc) {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
"ignore_user_type": 1,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"field_order": [
|
"field_order": [
|
||||||
"course",
|
"course",
|
||||||
"member",
|
"member",
|
||||||
|
"member_name",
|
||||||
"evaluator",
|
"evaluator",
|
||||||
"column_break_4",
|
"column_break_4",
|
||||||
"date",
|
"date",
|
||||||
@@ -72,11 +73,18 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "column_break_4",
|
"fieldname": "column_break_4",
|
||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "member.full_name",
|
||||||
|
"fieldname": "member_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Member Name",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-04-01 15:29:31.553492",
|
"modified": "2022-04-06 11:33:33.711545",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS Certificate Request",
|
"name": "LMS Certificate Request",
|
||||||
@@ -97,5 +105,6 @@
|
|||||||
],
|
],
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"states": []
|
"states": [],
|
||||||
|
"title_field": "member_name"
|
||||||
}
|
}
|
||||||
@@ -36,9 +36,12 @@
|
|||||||
"enable_certification",
|
"enable_certification",
|
||||||
"expiry",
|
"expiry",
|
||||||
"column_break_22",
|
"column_break_22",
|
||||||
"paid_certificate",
|
|
||||||
"grant_certificate_after",
|
"grant_certificate_after",
|
||||||
"evaluator"
|
"evaluator",
|
||||||
|
"pricing_section",
|
||||||
|
"paid_certificate",
|
||||||
|
"currency",
|
||||||
|
"price_certificate"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@@ -189,6 +192,25 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Evaluator",
|
"label": "Evaluator",
|
||||||
"options": "Course Evaluator"
|
"options": "Course Evaluator"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "eval: doc.grant_certificate_after == \"Evaluation\"",
|
||||||
|
"fieldname": "pricing_section",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Pricing"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "paid_certificate",
|
||||||
|
"fieldname": "price_certificate",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"label": "Certificate Price"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "paid_certificate",
|
||||||
|
"fieldname": "currency",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Currency",
|
||||||
|
"options": "Currency"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"is_published_field": "published",
|
"is_published_field": "published",
|
||||||
@@ -214,7 +236,7 @@
|
|||||||
"link_fieldname": "course"
|
"link_fieldname": "course"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2022-04-01 15:19:13.075063",
|
"modified": "2022-04-07 12:27:05.353788",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS Course",
|
"name": "LMS Course",
|
||||||
|
|||||||
@@ -60,12 +60,18 @@
|
|||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="progress-bar" role="progressbar" aria-valuenow="{{ progress }}"
|
<div class="progress-bar" role="progressbar" aria-valuenow="{{ progress }}"
|
||||||
aria-valuemin="0" aria-valuemax="100" style="width:{{ progress }}%">
|
aria-valuemin="0" aria-valuemax="100" style="width:{{ progress }}%">
|
||||||
<span class="sr-only"> {{ progress }} Complete</span>
|
<span class="sr-only"> {{ progress }} {{ _("Complete") }} </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress-percent">{{ progress }}% Completed</div>
|
<div class="progress-percent">{{ progress }}% {{ _("Completed") }} </div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if course.paid_certificate %}
|
||||||
|
<div class="certificate-price small mt-3">
|
||||||
|
{{ _("Certificate Price: ") }} {{ frappe.utils.fmt_money(course.price_certificate, 2, course.currency) }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="course-card-footer">
|
<div class="course-card-footer">
|
||||||
<span class="">
|
<span class="">
|
||||||
{% set instructors = get_instructors(course.name) %}
|
{% set instructors = get_instructors(course.name) %}
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ input[type=checkbox] {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.course-card-title {
|
.course-card-title {
|
||||||
@@ -813,16 +814,6 @@ input[type=checkbox] {
|
|||||||
.progress-percent {
|
.progress-percent {
|
||||||
margin: 0.5rem 0;
|
margin: 0.5rem 0;
|
||||||
font-size: var(--text-base);
|
font-size: var(--text-base);
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.progress-percentage {
|
|
||||||
width: 100%;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 165%;
|
|
||||||
letter-spacing: 0.02em;
|
|
||||||
color: #000000;
|
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
@@ -862,13 +853,18 @@ pre {
|
|||||||
.certificate-footer {
|
.certificate-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 50%;
|
width: 30%;
|
||||||
margin: 5rem auto 0;
|
margin: 5rem auto 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.certificate-price {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.certificate-ribbon {
|
.certificate-ribbon {
|
||||||
background-color: var(--primary-color);
|
background-color: var(--primary-color);
|
||||||
padding: 1rem;
|
padding: 0.5rem;
|
||||||
border-radius: var(--border-radius-md);
|
border-radius: var(--border-radius-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -887,7 +883,7 @@ pre {
|
|||||||
border-radius: var(--border-radius-md);
|
border-radius: var(--border-radius-md);
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: var(--shadow-sm);
|
box-shadow: var(--shadow-sm);
|
||||||
padding: 2rem;
|
padding: 1rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 6rem;
|
margin: 0 6rem;
|
||||||
}
|
}
|
||||||
@@ -901,26 +897,26 @@ pre {
|
|||||||
height: 1.5rem;
|
height: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1050px) {
|
||||||
|
.certificate-footer {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.certificate-heading {
|
.certificate-card {
|
||||||
font-size: 1rem;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 550px) {
|
@media (max-width: 550px) {
|
||||||
.certificate-footer {
|
.certificate-content {
|
||||||
flex-direction: column;
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 500px) {
|
.certificate-footer {
|
||||||
.certificate-heading {
|
width: 100%;
|
||||||
font-size: 0.5rem;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.certificate-content {
|
|
||||||
padding: 2.5rem 2rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-card {
|
.profile-card {
|
||||||
@@ -944,7 +940,7 @@ pre {
|
|||||||
|
|
||||||
.empty-state-heading {
|
.empty-state-heading {
|
||||||
font-size: var(--text-xl);
|
font-size: var(--text-xl);
|
||||||
color: var(--gray-900);
|
color: var(--text-color);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -957,7 +953,7 @@ pre {
|
|||||||
background-image: url(/assets/frappe/icons/timeless/search.svg);
|
background-image: url(/assets/frappe/icons/timeless/search.svg);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: var(--border-radius-md);
|
border-radius: var(--border-radius-md);
|
||||||
font-size: var(--text-base);
|
font-size: var(--text-sm);
|
||||||
padding: 0.625rem 0.75rem;
|
padding: 0.625rem 0.75rem;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
@@ -982,11 +978,11 @@ pre {
|
|||||||
.testimonial-author {
|
.testimonial-author {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: var(--text-lg);
|
font-size: var(--text-lg);
|
||||||
color: var(--gray-900);
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.testimonial-review {
|
.testimonial-review {
|
||||||
color: var(--gray-900);
|
color: var(--text-color);
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1212,7 +1208,8 @@ pre {
|
|||||||
.course-overlay-content {
|
.course-overlay-content {
|
||||||
padding: 1.25rem;
|
padding: 1.25rem;
|
||||||
font-size: var(--text-base);
|
font-size: var(--text-base);
|
||||||
color: var(--gray-900);
|
color: var(--text-color);
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb-destination {
|
.breadcrumb-destination {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
{{ _("This certifies that") }}
|
{{ _("This certifies that") }}
|
||||||
</div>
|
</div>
|
||||||
<div class="certificate-heading"> {{ member.full_name }} </div>
|
<div class="certificate-heading"> {{ member.full_name }} </div>
|
||||||
<div class="mt-5"> {{ _("has successfully completed the course on") }} </div>
|
<div class="mt-2"> {{ _("has successfully completed the course on") }} </div>
|
||||||
<div class="certificate-heading"> {{ course.title }} </div>
|
<div class="certificate-heading"> {{ course.title }} </div>
|
||||||
|
|
||||||
<div class="certificate-footer">
|
<div class="certificate-footer">
|
||||||
|
|||||||
@@ -106,8 +106,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if certificate_request %}
|
{% if certificate_request %}
|
||||||
<p> <b>{{ _("Evaluation On") }}</b>
|
<p class="mb-2"> <b>{{ _("Evaluation On: ") }}</b>
|
||||||
{{ _(": {0} at {1}").format(frappe.utils.format_date(certificate_request.date, "medium"),
|
{{ _("{0} at {1}").format(frappe.utils.format_date(certificate_request.date, "medium"),
|
||||||
frappe.utils.format_time(certificate_request.start_time, "short")) }} </p>
|
frappe.utils.format_time(certificate_request.start_time, "short")) }} </p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="vertically-center mb-2">
|
<div class="vertically-center justify-content-center mb-2">
|
||||||
<div class="">
|
<div class="">
|
||||||
<svg class="icon icon-md mr-1">
|
<svg class="icon icon-md mr-1">
|
||||||
<use class="" href="#icon-users">
|
<use class="" href="#icon-users">
|
||||||
@@ -151,6 +151,12 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if course.paid_certificate %}
|
||||||
|
<div class="certificate-price">
|
||||||
|
{{ _("Certificate Price:") }} {{ frappe.utils.fmt_money(course.price_certificate, 2, course.currency) }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% set lesson_index = get_lesson_index(membership.current_lesson) if membership and
|
{% set lesson_index = get_lesson_index(membership.current_lesson) if membership and
|
||||||
membership.current_lesson
|
membership.current_lesson
|
||||||
else '1.1' %}
|
else '1.1' %}
|
||||||
@@ -173,12 +179,6 @@
|
|||||||
{{ _("Checkout Course") }} <img class="ml-2" src="/assets/lms/icons/white-arrow.svg" />
|
{{ _("Checkout Course") }} <img class="ml-2" src="/assets/lms/icons/white-arrow.svg" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% elif membership %}
|
|
||||||
<a class="button wide-button is-primary" id="continue-learning"
|
|
||||||
href="{{ get_lesson_url(course.name, lesson_index) }}{{ course.query_parameter }}">
|
|
||||||
{{ _("Continue Learning") }} <img class="ml-2" src="/assets/lms/icons/white-arrow.svg" />
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{% elif course.upcoming and not is_user_interested %}
|
{% elif course.upcoming and not is_user_interested %}
|
||||||
<div class="button wide-button is-default"
|
<div class="button wide-button is-default"
|
||||||
id="notify-me" data-course="{{course.name | urlencode}}">
|
id="notify-me" data-course="{{course.name | urlencode}}">
|
||||||
@@ -191,6 +191,12 @@
|
|||||||
style="color: inherit;">
|
style="color: inherit;">
|
||||||
{{ _("Manage the course") }}
|
{{ _("Manage the course") }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
{% elif membership %}
|
||||||
|
<a class="button wide-button is-primary" id="continue-learning"
|
||||||
|
href="{{ get_lesson_url(course.name, lesson_index) }}{{ course.query_parameter }}">
|
||||||
|
{{ _("Continue Learning") }} <img class="ml-2" src="/assets/lms/icons/white-arrow.svg" />
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% set certificate = is_certified(course.name) %}
|
{% set certificate = is_certified(course.name) %}
|
||||||
@@ -210,6 +216,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ def get_context(context):
|
|||||||
raise frappe.Redirect
|
raise frappe.Redirect
|
||||||
|
|
||||||
course = frappe.db.get_value("LMS Course", course_name,
|
course = frappe.db.get_value("LMS Course", course_name,
|
||||||
["name", "title", "image", "short_introduction", "description", "published", "upcoming",
|
["name", "title", "image", "short_introduction", "description", "published", "upcoming", "disable_self_learning", "status",
|
||||||
"disable_self_learning", "video_link", "enable_certification", "status", "grant_certificate_after"],
|
"video_link", "enable_certification", "grant_certificate_after", "paid_certificate", "price_certificate", "currency"],
|
||||||
as_dict=True)
|
as_dict=True)
|
||||||
|
|
||||||
related_courses = frappe.get_all("Related Courses", {"parent": course.name}, ["course"])
|
related_courses = frappe.get_all("Related Courses", {"parent": course.name}, ["course"])
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ def get_context(context):
|
|||||||
def get_courses():
|
def get_courses():
|
||||||
courses = frappe.get_all("LMS Course",
|
courses = frappe.get_all("LMS Course",
|
||||||
filters={"published": True},
|
filters={"published": True},
|
||||||
fields=["name", "upcoming", "title", "image", "enable_certification"])
|
fields=["name", "upcoming", "title", "image", "enable_certification",
|
||||||
|
"paid_certificate", "price_certificate", "currency"])
|
||||||
|
|
||||||
live_courses, upcoming_courses = [], []
|
live_courses, upcoming_courses = [], []
|
||||||
for course in courses:
|
for course in courses:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ def get_common_context(context):
|
|||||||
batch_name = None
|
batch_name = None
|
||||||
|
|
||||||
course = frappe.db.get_value("LMS Course",
|
course = frappe.db.get_value("LMS Course",
|
||||||
frappe.form_dict["course"], ["name", "title", "video_link"], as_dict=True)
|
frappe.form_dict["course"], ["name", "title", "video_link", "enable_certification"], as_dict=True)
|
||||||
if not course:
|
if not course:
|
||||||
context.template = "www/404.html"
|
context.template = "www/404.html"
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user