fix: removed unnecessary code

This commit is contained in:
Jannat Patel
2022-12-29 11:32:31 +05:30
parent ad084389cc
commit 7c36294359
4 changed files with 9 additions and 6 deletions

View File

@@ -114,7 +114,7 @@ def sanitize_html(html, macro):
any broken tags. This makes sures that all those things are fixed any broken tags. This makes sures that all those things are fixed
before passing to the etree parser. before passing to the etree parser.
""" """
soup = BeautifulSoup(html, features="html5lib") soup = BeautifulSoup(html, features="lxml")
nodes = soup.body.children nodes = soup.body.children
classname = "" classname = ""
if macro == "YouTubeVideo": if macro == "YouTubeVideo":

View File

@@ -1,9 +1,10 @@
import frappe import frappe
def execute(): def execute():
assignment_lessons = frappe.get_all("Course Lesson", { assignment_lessons = frappe.get_all(
"file_type": ["is", "set"] "Course Lesson", {"file_type": ["is", "set"]}, ["name", "question"]
}, ["name", "question"]) )
for lesson in assignment_lessons: for lesson in assignment_lessons:
if not lesson.question: if not lesson.question:

View File

@@ -11,7 +11,7 @@ frappe.ready(() => {
hide_search_bar(); hide_search_bar();
}); });
$(document).keydown(function(e) { $(document).keydown(function (e) {
if ((e.metaKey || e.ctrlKey) && e.key == "k") { if ((e.metaKey || e.ctrlKey) && e.key == "k") {
show_search_bar(e); show_search_bar(e);
} }

View File

@@ -190,7 +190,9 @@ const quiz_summary = (e = undefined) => {
.parent() .parent()
.prepend( .prepend(
`<div class="summary"> `<div class="summary">
<div class="font-weight-bold"> ${__("Score")}: ${data.message}/${total_questions} </div> <div class="font-weight-bold"> ${__("Score")}: ${
data.message
}/${total_questions} </div>
</div>` </div>`
); );
$("#try-again").removeClass("hide"); $("#try-again").removeClass("hide");