fix: redirect after quiz submission
This commit is contained in:
@@ -263,10 +263,10 @@
|
||||
{{ _("To create a new assignment or quiz for this class, click on the buttons below. Once you have created the new assignment or quiz you can come back and add it from here.") }}
|
||||
</p>
|
||||
<div class="flex">
|
||||
<a class="btn btn-secondary btn-sm" href="/assignments/new-assignment">
|
||||
<a class="btn btn-default btn-sm" href="/assignments/new-assignment">
|
||||
{{ _("Create Assignment") }}
|
||||
</a>
|
||||
<a class="btn btn-secondary btn-sm ml-2" href="/assignments/new-quiz">
|
||||
<a class="btn btn-default btn-sm ml-2" href="/assignments/new-quiz">
|
||||
{{ _("Create Quiz") }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -17,6 +17,8 @@ def get_context(context):
|
||||
|
||||
if submission == "new-submission":
|
||||
context.submission = frappe._dict()
|
||||
context.no_of_attempts = 0
|
||||
context.hide_quiz = False
|
||||
else:
|
||||
context.submission = frappe.db.get_value(
|
||||
"LMS Quiz Submission",
|
||||
@@ -45,4 +47,3 @@ def get_context(context):
|
||||
context.hide_quiz = (
|
||||
context.is_moderator and context.submission.member != frappe.session.user
|
||||
)
|
||||
print(context.no_of_attempts)
|
||||
|
||||
Reference in New Issue
Block a user