Minor fixes
This commit is contained in:
parent
c011b08699
commit
95bb3c0ee9
@ -106,7 +106,6 @@ def evaluate_quiz(enrollment, quiz_response, quiz_name):
|
||||
"""LMS Function: Evaluates a simple multiple choice quiz.
|
||||
:param quiz_response: contains user selected choices for a quiz in the form of a string formatted as a dictionary. The function uses `json.loads()` to convert it to a python dictionary.
|
||||
"""
|
||||
|
||||
import json
|
||||
quiz_response = json.loads(quiz_response)
|
||||
quiz = frappe.get_doc("Quiz", quiz_name)
|
||||
@ -239,3 +238,19 @@ def get_quiz_progress(program_name):
|
||||
quiz_meta.name = program_name
|
||||
quiz_meta.program = program.program_name
|
||||
return quiz_meta
|
||||
|
||||
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def get_course_details(course_name):
|
||||
try:
|
||||
course = frappe.get_doc('Course', course_name)
|
||||
return course
|
||||
except:
|
||||
return None
|
||||
|
||||
# Functions to get program & course details
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def get_topics(course_name):
|
||||
course = frappe.get_doc('Course', course_name)
|
||||
topics = course.get_topics()
|
||||
return topics
|
Loading…
Reference in New Issue
Block a user