-
{answer.group}
+
+
{answer.group}
{/if}
{/each}
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 @@
- {title}
+
+ {index}
+
+ {title}
+
+
diff --git a/src/lib/components/Question/RadioQuestion/index.svelte b/src/lib/components/Question/RadioQuestion/index.svelte
index 8b17f3cc..d64cc802 100644
--- a/src/lib/components/Question/RadioQuestion/index.svelte
+++ b/src/lib/components/Question/RadioQuestion/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 = [];
@@ -65,9 +66,12 @@
-
- {title}
-
+
+ {index}
+ {title}
+
diff --git a/src/lib/components/Question/TextareaQuestion/index.svelte b/src/lib/components/Question/TextareaQuestion/index.svelte
index 27f5f4ac..0612188a 100644
--- a/src/lib/components/Question/TextareaQuestion/index.svelte
+++ b/src/lib/components/Question/TextareaQuestion/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 onSubmit = () => {};
@@ -37,7 +38,10 @@
- {title}
+
+ {index}
+ {title}
+