fix: assignment renderer
This commit is contained in:
@@ -313,6 +313,7 @@ def render_html(lesson):
|
|||||||
if lesson.question:
|
if lesson.question:
|
||||||
assignment = "{{ Assignment('" + lesson.question + "-" + lesson.file_type + "') }}"
|
assignment = "{{ Assignment('" + lesson.question + "-" + lesson.file_type + "') }}"
|
||||||
text = text + assignment
|
text = text + assignment
|
||||||
|
|
||||||
return markdown_to_html(text)
|
return markdown_to_html(text)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -183,9 +183,8 @@ def video_renderer(src):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def assignment_renderer(name):
|
def assignment_renderer(detail):
|
||||||
|
supported_types = {
|
||||||
"""supported_types = {
|
|
||||||
"Document": ".doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
"Document": ".doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||||
"PDF": ".pdf",
|
"PDF": ".pdf",
|
||||||
"Image": ".png, .jpg, .jpeg",
|
"Image": ".png, .jpg, .jpeg",
|
||||||
@@ -197,7 +196,7 @@ def assignment_renderer(name):
|
|||||||
return frappe.render_template(
|
return frappe.render_template(
|
||||||
"templates/assignment.html",
|
"templates/assignment.html",
|
||||||
{"question": question, "accept": accept, "file_type": file_type},
|
{"question": question, "accept": accept, "file_type": file_type},
|
||||||
)"""
|
)
|
||||||
|
|
||||||
|
|
||||||
def show_custom_signup():
|
def show_custom_signup():
|
||||||
|
|||||||
Reference in New Issue
Block a user