diff --git a/frontend/src/components/LessonContent.vue b/frontend/src/components/LessonContent.vue
index 15739fa2..15d529ff 100644
--- a/frontend/src/components/LessonContent.vue
+++ b/frontend/src/components/LessonContent.vue
@@ -2,7 +2,7 @@
+ {{ quizId }}
diff --git a/frontend/src/components/Quiz.vue b/frontend/src/components/Quiz.vue
index 073250b2..f3f5db50 100644
--- a/frontend/src/components/Quiz.vue
+++ b/frontend/src/components/Quiz.vue
@@ -27,7 +27,7 @@
{{
__(
- 'The quiz has a time limit.For each question you will be given { 0} seconds.'
+ 'The quiz has a time limit.For each question you will be given {0} seconds.'
).format(quiz.doc.time)
}}
diff --git a/frontend/src/pages/CreateLesson.vue b/frontend/src/pages/CreateLesson.vue
index 7bdba741..b0090f72 100644
--- a/frontend/src/pages/CreateLesson.vue
+++ b/frontend/src/pages/CreateLesson.vue
@@ -208,6 +208,16 @@ const lessonReference = createResource({
const convertToJSON = (lessonData) => {
let blocks = []
+ if (lessonData.youtube) {
+ let youtubeID = lessonData.youtube.split('/').pop()
+ blocks.push({
+ type: 'embed',
+ data: {
+ service: 'youtube',
+ embed: `https://www.youtube.com/embed/${youtubeID}`,
+ },
+ })
+ }
lessonData.body.split('\n').forEach((block) => {
if (block.includes('{{ YouTubeVideo')) {
let youtubeID = block.match(/\(["']([^"']+?)["']\)/)[1]
@@ -291,6 +301,16 @@ const convertToJSON = (lessonData) => {
})
}
})
+
+ if (lessonData.quizId) {
+ blocks.push({
+ type: 'quiz',
+ data: {
+ quiz: lessonData.quizId,
+ },
+ })
+ }
+
return blocks
}
diff --git a/lms/lms/utils.py b/lms/lms/utils.py
index 1412a3df..ca71a5d3 100644
--- a/lms/lms/utils.py
+++ b/lms/lms/utils.py
@@ -1769,6 +1769,8 @@ def get_lesson_creation_details(course, chapter, lesson):
"content",
"instructor_notes",
"instructor_content",
+ "youtube",
+ "quiz_id",
],
as_dict=1,
)