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