feat: text editor for lesson body
This commit is contained in:
12
lms/patches/v0_0/convert_lesson_markdown_to_html.py
Normal file
12
lms/patches/v0_0/convert_lesson_markdown_to_html.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import frappe
|
||||
from lms.lms.md import markdown_to_html
|
||||
|
||||
|
||||
def execute():
|
||||
lessons = frappe.get_all("Course Lesson", fields=["name", "body"])
|
||||
|
||||
for lesson in lessons:
|
||||
html = markdown_to_html(lesson.body)
|
||||
frappe.db.set_value("Course Lesson", lesson.name, "body", html)
|
||||
|
||||
frappe.reload_doc("lms", "doctype", "course_lesson")
|
||||
Reference in New Issue
Block a user