diff --git a/src/lib/components/Course/components/Lesson/Exercise/functions.js b/src/lib/components/Course/components/Lesson/Exercise/functions.js index eb2418f1..51cf92ba 100644 --- a/src/lib/components/Course/components/Lesson/Exercise/functions.js +++ b/src/lib/components/Course/components/Lesson/Exercise/functions.js @@ -58,13 +58,12 @@ export function getPropsForQuestion( } return { - title: questionIndex + '. ' + question.title, + index: questionIndex + '. ', + title: question.title, name: `${question.name}`, options: question.options, code: question.code, - defaultValue: isOpenQuesiton - ? answers[question.name] || '' - : answers[question.name] || [], + defaultValue: isOpenQuesiton ? answers[question.name] || '' : answers[question.name] || [], onSubmit, onPrevious, disablePreviousButton: questionIndex === 1, @@ -75,18 +74,18 @@ export function getPropsForQuestion( nextButtonProps: isOpenQuesiton ? { label: 'Next', - isActive: true, + isActive: true } : isCorrect ? { label: isLast ? 'Finish' : 'Next', isActive: true, - disableOptionSelect: true, + disableOptionSelect: true } : { label: 'Check', - isActive: false, - }, + isActive: false + } }; } diff --git a/src/lib/components/Question/CheckboxQuestion/index.svelte b/src/lib/components/Question/CheckboxQuestion/index.svelte index ced2d3f4..3ed1226f 100644 --- a/src/lib/components/Question/CheckboxQuestion/index.svelte +++ b/src/lib/components/Question/CheckboxQuestion/index.svelte @@ -7,6 +7,7 @@ import Grade from '$lib/components/Question/Grade.svelte'; export let title = ''; + export let index = 1; export let code; export let name = ''; export let options = []; @@ -63,7 +64,12 @@