', is_correct: false },
+ { label: '', is_correct: true }
+ ]
+ },
+ {
+ title: 'How many levels of headings are available in HTML?',
+ name: 'q2',
+ points: 1,
+ order: 1,
+ question_type: QuestionTypes[0], // RADIO
+ options: [
+ { label: '3', is_correct: false },
+ { label: '4', is_correct: false },
+ { label: '6', is_correct: true }
+ ]
+ },
+ {
+ title: 'Which HTML tag is used for the smallest heading?',
+ name: 'q3',
+ points: 1,
+ order: 2,
+ question_type: QuestionTypes[0], // RADIO
+ options: [
+ { label: '', is_correct: true },
+ { label: '', is_correct: false },
+ { label: '', is_correct: false }
+ ]
+ },
+ {
+ title: 'Can you change the appearance of headings using CSS?',
+ name: 'q4',
+ points: 1,
+ order: 3,
+ question_type: QuestionTypes[0], // RADIO
+ options: [
+ { label: 'Yes', is_correct: true },
+ { label: 'No', is_correct: false }
+ ]
+ },
+ {
+ title: 'Which HTML tag is used for second-level headings?',
+ name: 'q5',
+ points: 1,
+ order: 4,
+ question_type: QuestionTypes[1], // CHECKBOX
+ options: [
+ { label: '', is_correct: true },
+ { label: '', is_correct: false },
+ { label: '', is_correct: false }
+ ]
+ },
+ {
+ title: 'What is the purpose of using semantic headings in HTML?',
+ name: 'q6',
+ points: 2,
+ order: 5,
+ question_type: QuestionTypes[1], // CHECKBOX
+ options: [
+ { label: 'To improve SEO', is_correct: true },
+ { label: 'To add background colors', is_correct: false },
+ { label: 'To control font size', is_correct: false }
+ ]
+ },
+ {
+ title: "Explain the difference between an 'h1' element and an 'h2' element in HTML.",
+ name: 'q7',
+ points: 2,
+ order: 6,
+ question_type: QuestionTypes[2], // TEXTAREA
+ options: []
+ },
+ {
+ title: 'How can you align a heading to the center using CSS?',
+ name: 'q8',
+ points: 2,
+ order: 7,
+ question_type: QuestionTypes[2], // TEXTAREA
+ options: []
+ },
+ {
+ title: "What is the default font size for an 'h3' element in HTML?",
+ name: 'q9',
+ points: 1,
+ order: 8,
+ question_type: QuestionTypes[2], // TEXTAREA
+ options: []
+ },
+ {
+ title: 'What is the purpose of using heading elements in HTML?',
+ name: 'q10',
+ points: 2,
+ order: 9,
+ question_type: QuestionTypes[2], // TEXTAREA
+ options: []
+ }
+ ]
+ }
+};
+
+export default template;
diff --git a/src/lib/mocks/html/004_html_paragraph.ts b/src/lib/mocks/html/004_html_paragraph.ts
new file mode 100644
index 00000000..351fcb98
--- /dev/null
+++ b/src/lib/mocks/html/004_html_paragraph.ts
@@ -0,0 +1,119 @@
+import { QuestionTypes } from '../utils';
+
+import type { ExerciseTemplate } from '$lib/utils/types';
+
+const template: ExerciseTemplate = {
+ title: 'HTML Paragraphs Quiz',
+ description: 'Test your knowledge of HTML paragraphs',
+ questionnaire: {
+ questions: [
+ {
+ title: 'What HTML tag is used to define a paragraph?',
+ name: 'q1',
+ points: 1,
+ order: 0,
+ question_type: QuestionTypes[0], // RADIO
+ options: [
+ { label: '
', is_correct: true },
+ { label: '', is_correct: false },
+ { label: '', is_correct: false }
+ ]
+ },
+ {
+ title: 'How can you create a line break in HTML?',
+ name: 'q2',
+ points: 1,
+ order: 1,
+ question_type: QuestionTypes[0], // RADIO
+ options: [
+ { label: '
', is_correct: true },
+ { label: '', is_correct: false },
+ { label: '', is_correct: false }
+ ]
+ },
+ {
+ title: "What is the purpose of the 'align' attribute in the 'p' tag?",
+ name: 'q3',
+ points: 1,
+ order: 2,
+ question_type: QuestionTypes[0], // RADIO
+ options: [
+ { label: 'To specify the font size', is_correct: false },
+ { label: 'To specify the text alignment', is_correct: true },
+ { label: 'To add a border around the paragraph', is_correct: false }
+ ]
+ },
+ {
+ title: 'Which HTML tag is used to create a preformatted text?',
+ name: 'q4',
+ points: 1,
+ order: 3,
+ question_type: QuestionTypes[0], // RADIO
+ options: [
+ { label: '', is_correct: true },
+ { label: '', is_correct: false },
+ { label: '', is_correct: false }
+ ]
+ },
+ {
+ title: 'How can you emphasize text in HTML?',
+ name: 'q5',
+ points: 1,
+ order: 4,
+ question_type: QuestionTypes[1], // CHECKBOX
+ options: [
+ { label: '', is_correct: true },
+ { label: '', is_correct: true },
+ { label: '', is_correct: false },
+ { label: '', is_correct: false }
+ ]
+ },
+ {
+ title: "What is the purpose of the 'blockquote' element in HTML?",
+ name: 'q6',
+ points: 2,
+ order: 5,
+ question_type: QuestionTypes[1], // CHECKBOX
+ options: [
+ { label: 'To create a quotation', is_correct: true },
+ { label: 'To add a background color', is_correct: false },
+ { label: 'To insert an image', is_correct: false }
+ ]
+ },
+ {
+ title: "Explain the use of the 'q' element in HTML.",
+ name: 'q7',
+ points: 2,
+ order: 6,
+ question_type: QuestionTypes[2], // TEXTAREA
+ options: []
+ },
+ {
+ title: 'How can you create a subscript text in HTML?',
+ name: 'q8',
+ points: 2,
+ order: 7,
+ question_type: QuestionTypes[2], // TEXTAREA
+ options: []
+ },
+ {
+ title: "What does the 'cite' attribute in the 'blockquote' element specify?",
+ name: 'q9',
+ points: 1,
+ order: 8,
+ question_type: QuestionTypes[2], // TEXTAREA
+ options: []
+ },
+ {
+ title: 'How can you create a superscript text in HTML?',
+ name: 'q10',
+ points: 2,
+ order: 9,
+ question_type: QuestionTypes[2], // TEXTAREA
+ options: []
+ }
+ ]
+ }
+};
+
+export default template;
diff --git a/src/lib/mocks/html/005_html_styles.ts b/src/lib/mocks/html/005_html_styles.ts
new file mode 100644
index 00000000..a4033db9
--- /dev/null
+++ b/src/lib/mocks/html/005_html_styles.ts
@@ -0,0 +1,120 @@
+import { QuestionTypes } from '../utils';
+
+import type { ExerciseTemplate } from '$lib/utils/types';
+
+const template: ExerciseTemplate = {
+ title: 'HTML Styles Quiz',
+ description: 'Test your knowledge of HTML styles',
+ questionnaire: {
+ questions: [
+ {
+ title: 'Which HTML attribute is used to add inline styles?',
+ name: 'q1',
+ points: 1,
+ order: 0,
+ question_type: QuestionTypes[0], // RADIO
+ options: [
+ { label: 'style', is_correct: true },
+ { label: 'css', is_correct: false },
+ { label: 'class', is_correct: false }
+ ]
+ },
+ {
+ title: 'What is the purpose of CSS in web development?',
+ name: 'q2',
+ points: 1,
+ order: 1,
+ question_type: QuestionTypes[0], // RADIO
+ options: [
+ { label: 'To add interactivity to a webpage', is_correct: false },
+ { label: 'To define the structure of a webpage', is_correct: false },
+ { label: 'To style the appearance of a webpage', is_correct: true }
+ ]
+ },
+ {
+ title: 'How can you include an external CSS file in an HTML document?',
+ name: 'q3',
+ points: 1,
+ order: 2,
+ question_type: QuestionTypes[0], // RADIO
+ options: [
+ { label: 'Using the
@@ -180,7 +179,7 @@
- {#each searchStudents(searchValue) as student}
+ {#each searchStudents(searchValue, students) as student}
diff --git a/src/routes/courses/[id]/lessons/[...lessonParams]/+page.svelte b/src/routes/courses/[id]/lessons/[...lessonParams]/+page.svelte
index 42658bf4..901fe330 100644
--- a/src/routes/courses/[id]/lessons/[...lessonParams]/+page.svelte
+++ b/src/routes/courses/[id]/lessons/[...lessonParams]/+page.svelte
@@ -22,6 +22,7 @@
import Download from 'carbon-icons-svelte/lib/Download.svelte';
import OverflowMenuVertical from 'carbon-icons-svelte/lib/OverflowMenuVertical.svelte';
import { apps } from '$lib/components/Apps/store';
+ import APPS_CONSTANTS from '$lib/components/Apps/constants';
import IconButton from '$lib/components/IconButton/index.svelte';
import { lesson, lessons } from '$lib/components/Course/components/Lesson/store/lessons';
import { browser } from '$app/environment';
@@ -197,6 +198,11 @@
mode = mode === MODES.edit ? MODES.view : MODES.edit;
}
+ function handleAppClick(appName) {
+ $apps.selectedApp = appName;
+ $apps.open = true;
+ }
+
$: path = $page.url?.pathname?.replace(/\/exercises[\/ 0-9 a-z -]*/, '');
$: if (data.courseId && browser) {
@@ -311,6 +317,7 @@
{/if}