fix: removed unnecessary code
This commit is contained in:
@@ -1197,7 +1197,7 @@ pre {
|
|||||||
.card-heading {
|
.card-heading {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--gray-900);
|
color: var(--gray-900);
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.course-head-container {
|
.course-head-container {
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
{{ _("Download") }}
|
{{ _("Download") }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="btn btn-default btn-sm ml-2" target="_blank" href="https://www.linkedin.com/shareArticle?summary=My+course+completion+certificate+for+%22Microsoft+Excel+-+Excel+from+Beginner+to+Advanced%22&url=http%3A%2F%2Fude.my%2FUC-0654a032-f576-449a-a373-c5f530ab6a24&source=udemy&title=Udemy+Course+Completion+Certificate&mini=true">
|
<!-- <a class="btn btn-default btn-sm ml-2" target="_blank" href="https://www.linkedin.com/sharing/share-offsite?url={{ url | urlencode }}">
|
||||||
{{ _("Share") }}
|
{{ _("Share") }}
|
||||||
</a>
|
</a> -->
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe.utils.jinja import render_template
|
from frappe.utils.jinja import render_template
|
||||||
from frappe.utils import get_url
|
from frappe.utils import get_url
|
||||||
from lms.lms.utils import get_instructors
|
|
||||||
|
|
||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
@@ -29,6 +28,7 @@ def get_context(context):
|
|||||||
context.member = frappe.db.get_value(
|
context.member = frappe.db.get_value(
|
||||||
"User", context.doc.member, ["full_name", "username"], as_dict=True
|
"User", context.doc.member, ["full_name", "username"], as_dict=True
|
||||||
)
|
)
|
||||||
|
context.url = f"{get_url()}/courses/{context.course.name}/{context.doc.name}"
|
||||||
|
|
||||||
default_print_format = frappe.db.get_value(
|
default_print_format = frappe.db.get_value(
|
||||||
"Property Setter",
|
"Property Setter",
|
||||||
@@ -43,8 +43,9 @@ def get_context(context):
|
|||||||
template = frappe.db.get_value(
|
template = frappe.db.get_value(
|
||||||
"Print Format", default_print_format.value, ["html", "css"], as_dict=True
|
"Print Format", default_print_format.value, ["html", "css"], as_dict=True
|
||||||
)
|
)
|
||||||
final_template = "<style> " + template.css + " </style>" + template.html
|
merged_template = "<style> " + template.css + " </style>" + template.html
|
||||||
context.final_template = render_template(final_template, context)
|
final_template = render_template(merged_template, context)
|
||||||
|
context.final_template = final_template
|
||||||
|
|
||||||
|
|
||||||
def redirect_to_course_list():
|
def redirect_to_course_list():
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ markdown
|
|||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
lxml
|
lxml
|
||||||
cairocffi
|
cairocffi
|
||||||
|
html2image
|
||||||
Reference in New Issue
Block a user