fix: no cache for quiz

This commit is contained in:
Jannat Patel
2022-11-03 15:01:06 +05:30
parent b1bdf6516e
commit 0d0e64f930
3 changed files with 4 additions and 2 deletions

View File

@@ -22,10 +22,10 @@ frappe.ready(() => {
const add_question = () => {
if ($(".new-quiz-card").length) {
/* if ($(".new-quiz-card").length) {
scroll_to_question_container();
return;
}
} */
let add_after = $(".quiz-card").length ? $(".quiz-card:last") : $("#quiz-title");
let question_template = `<div class="quiz-card new-quiz-card">

View File

@@ -3,6 +3,7 @@ from frappe.utils import cstr
def get_context(context):
context.no_cache = 1
quizname = frappe.form_dict["quizname"]
if quizname == "new-quiz":
context.quiz = frappe._dict()

View File

@@ -1,4 +1,5 @@
import frappe
def get_context(context):
context.no_cache = 1
context.quiz_list = frappe.get_all("LMS Quiz", {"owner": frappe.session.user}, ["name", "title"])