diff --git a/erpnext/education/utils.py b/erpnext/education/utils.py index ac7294badb..433ef9f829 100644 --- a/erpnext/education/utils.py +++ b/erpnext/education/utils.py @@ -308,7 +308,7 @@ def get_program_completion(program): from `tabcourse topic`, `tabprogram course` where `tabcourse topic`.parent = `tabprogram course`.course - and `tabprogram course`.parent = '{0}'""".format(program.name)) + and `tabprogram course`.parent = %(program)s""", {'program': program}) progress = [] for topic in topics: diff --git a/erpnext/www/lms/content.py b/erpnext/www/lms/content.py index f804cee3bd..3ab7a9f478 100644 --- a/erpnext/www/lms/content.py +++ b/erpnext/www/lms/content.py @@ -63,6 +63,6 @@ def allowed_content_access(program, content, content_type): `tabtopic content` where `tabcourse topic`.parent = `tabprogram course`.course and `tabtopic content`.parent = `tabcourse topic`.topic - and `tabprogram course`.parent = '{0}'""".format(program)) + and `tabprogram course`.parent = %(program)s""", {'program': program}) return (content, content_type) in contents_of_program \ No newline at end of file