feat: quiz creation from lesson form
This commit is contained in:
@@ -91,7 +91,8 @@
|
|||||||
<div>
|
<div>
|
||||||
{{ option.label }}
|
{{ option.label }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="option.label != option.description"
|
<div
|
||||||
|
v-if="option.label != option.description"
|
||||||
class="text-xs text-gray-700"
|
class="text-xs text-gray-700"
|
||||||
v-html="option.description"
|
v-html="option.description"
|
||||||
></div>
|
></div>
|
||||||
|
|||||||
@@ -26,12 +26,15 @@
|
|||||||
:label="__('Add an existing quiz')"
|
:label="__('Add an existing quiz')"
|
||||||
@change="(option) => addQuiz(option)"
|
@change="(option) => addQuiz(option)"
|
||||||
/>
|
/>
|
||||||
<router-link :to="{
|
<router-link
|
||||||
|
:to="{
|
||||||
name: 'QuizCreation',
|
name: 'QuizCreation',
|
||||||
params: {
|
params: {
|
||||||
quizID: 'new',
|
quizID: 'new',
|
||||||
}
|
},
|
||||||
}" class="self-end ml-2">
|
}"
|
||||||
|
class="self-end ml-2"
|
||||||
|
>
|
||||||
<Button>
|
<Button>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<Plus class="h-4 w-4 stroke-1.5" />
|
<Plus class="h-4 w-4 stroke-1.5" />
|
||||||
@@ -121,7 +124,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const addQuiz = (value) => {
|
const addQuiz = (value) => {
|
||||||
console.log("here")
|
console.log('here')
|
||||||
console.log(value)
|
console.log(value)
|
||||||
getCurrentEditor().caret.setToLastBlock('end', 0)
|
getCurrentEditor().caret.setToLastBlock('end', 0)
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|||||||
@@ -70,7 +70,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Breadcrumbs, FormControl, createResource, Button } from 'frappe-ui'
|
import { Breadcrumbs, FormControl, createResource, Button } from 'frappe-ui'
|
||||||
import { computed, reactive, onMounted, inject, ref, onBeforeUnmount } from 'vue'
|
import {
|
||||||
|
computed,
|
||||||
|
reactive,
|
||||||
|
onMounted,
|
||||||
|
inject,
|
||||||
|
ref,
|
||||||
|
onBeforeUnmount,
|
||||||
|
} from 'vue'
|
||||||
import EditorJS from '@editorjs/editorjs'
|
import EditorJS from '@editorjs/editorjs'
|
||||||
import LessonPlugins from '@/components/LessonPlugins.vue'
|
import LessonPlugins from '@/components/LessonPlugins.vue'
|
||||||
import { ChevronRight } from 'lucide-vue-next'
|
import { ChevronRight } from 'lucide-vue-next'
|
||||||
|
|||||||
Reference in New Issue
Block a user