fix: quiz and time validation before linking to video

This commit is contained in:
Jannat Patel
2025-06-02 19:12:13 +05:30
parent 7b7484332b
commit 2c8ce133f7
5 changed files with 58 additions and 23 deletions

View File

@@ -56,7 +56,6 @@ def save_progress(lesson, course):
)
quiz_completed = get_quiz_progress(lesson)
print("quiz_completed", quiz_completed)
assignment_completed = get_assignment_progress(lesson)
if not already_completed and quiz_completed and assignment_completed:
@@ -115,10 +114,8 @@ def get_quiz_progress(lesson):
macros = find_macros(lesson_details.body)
quizzes = [value for name, value in macros if name == "Quiz"]
print(quizzes)
for quiz in quizzes:
passing_percentage = frappe.db.get_value("LMS Quiz", quiz, "passing_percentage")
print(quiz, passing_percentage)
if not frappe.db.exists(
"LMS Quiz Submission",
{