diff --git a/frontend/src/components/Modals/LiveClassModal.vue b/frontend/src/components/Modals/LiveClassModal.vue
index 044fb6be..d06e19b6 100644
--- a/frontend/src/components/Modals/LiveClassModal.vue
+++ b/frontend/src/components/Modals/LiveClassModal.vue
@@ -17,78 +17,61 @@
-
-
- {{ __('Title') }}
-
-
-
-
-
-
-
- {{ __('Time') }}
-
-
-
-
-
-
-
-
- {{ __('Timezone') }}
-
-
+
+
-
+
+
-
-
- {{ __('Date') }}
-
-
-
-
-
-
-
- {{ __('Duration') }}
-
-
-
-
-
-
-
-
- {{ __('Auto Recording') }}
-
-
+
+
-
+
+
-
-
- {{ __('Description') }}
-
-
-
+
@@ -102,6 +85,7 @@ import {
Dialog,
createResource,
Tooltip,
+ FormControl,
} from 'frappe-ui'
import { reactive, inject } from 'vue'
import { getTimezones, createToast } from '@/utils/'
diff --git a/frontend/src/components/Quiz.vue b/frontend/src/components/Quiz.vue
index 71896f40..1a7afe67 100644
--- a/frontend/src/components/Quiz.vue
+++ b/frontend/src/components/Quiz.vue
@@ -124,13 +124,16 @@
-
- {{ questionDetails.data[`option_${index}`] }}
+
{{ questionDetails.data[`explanation_${index}`] }}
@@ -247,6 +250,9 @@ const quiz = createResource({
cache: ['quiz', props.quizName],
auto: true,
onSuccess(data) {
+ if (data.shuffle_questions) {
+ data.questions = data.questions.sort(() => Math.random() - 0.5)
+ }
attempts.reload()
resetQuiz()
},
@@ -342,7 +348,8 @@ const checkAnswer = () => {
createToast({
title: 'Please select an option',
icon: 'alert-circle',
- iconClasses: 'text-yellow-600 bg-yellow-100',
+ iconClasses: 'text-yellow-600 bg-yellow-100 rounded-full',
+ position: 'top-center',
})
return
}
diff --git a/frontend/src/components/QuizBlock.vue b/frontend/src/components/QuizBlock.vue
index f7ba8d86..eadcc076 100644
--- a/frontend/src/components/QuizBlock.vue
+++ b/frontend/src/components/QuizBlock.vue
@@ -23,4 +23,8 @@ const props = defineProps({
required: true,
},
})
+
+const redirectToLogin = () => {
+ window.location.href = `/login`
+}
diff --git a/lms/lms/doctype/lms_batch/lms_batch.py b/lms/lms/doctype/lms_batch/lms_batch.py
index 45342891..ff9edb15 100644
--- a/lms/lms/doctype/lms_batch/lms_batch.py
+++ b/lms/lms/doctype/lms_batch/lms_batch.py
@@ -184,7 +184,6 @@ def remove_assessment(assessment, parent):
def create_live_class(
batch_name, title, duration, date, time, timezone, auto_recording, description=None
):
- date = format_date(date, "yyyy-mm-dd", True)
frappe.only_for("Moderator")
payload = {
"topic": title,
diff --git a/lms/lms/doctype/lms_quiz/lms_quiz.json b/lms/lms/doctype/lms_quiz/lms_quiz.json
index 3464e53e..d93a089a 100644
--- a/lms/lms/doctype/lms_quiz/lms_quiz.json
+++ b/lms/lms/doctype/lms_quiz/lms_quiz.json
@@ -8,14 +8,16 @@
"engine": "InnoDB",
"field_order": [
"title",
- "show_answers",
+ "passing_percentage",
"column_break_gaac",
"max_attempts",
- "show_submission_history",
- "section_break_hsiv",
- "passing_percentage",
- "column_break_rocd",
"total_marks",
+ "section_break_hsiv",
+ "show_answers",
+ "column_break_rocd",
+ "show_submission_history",
+ "column_break_dsup",
+ "shuffle_questions",
"section_break_sbjx",
"questions",
"section_break_3",
@@ -97,7 +99,8 @@
},
{
"fieldname": "section_break_hsiv",
- "fieldtype": "Section Break"
+ "fieldtype": "Section Break",
+ "label": "Settings"
},
{
"fieldname": "passing_percentage",
@@ -118,11 +121,21 @@
"non_negative": 1,
"read_only": 1,
"reqd": 1
+ },
+ {
+ "fieldname": "column_break_dsup",
+ "fieldtype": "Column Break"
+ },
+ {
+ "default": "0",
+ "fieldname": "shuffle_questions",
+ "fieldtype": "Check",
+ "label": "Shuffle Questions"
}
],
"index_web_pages_for_search": 1,
"links": [],
- "modified": "2024-02-27 13:04:00.785182",
+ "modified": "2024-04-24 12:37:20.578041",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Quiz",