Merge branch 'develop' of bitbucket.org:ecropdev/ielts-ui into develop
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const websiteUrl = process.env.NODE_ENV === 'production' ? "https://encoach.com" : "http://localhost:3000";
|
||||
const nextConfig = {
|
||||
reactStrictMode: false,
|
||||
reactStrictMode: true,
|
||||
output: "standalone",
|
||||
async headers() {
|
||||
return [
|
||||
|
||||
@@ -144,7 +144,7 @@ const TaskTab = ({ section, label, index, setSection }: { section: LevelSection;
|
||||
multiple_choice_underlined: "Welcome to {part} of the {label}. In this section, you'll be asked to identify the underlined word or group of words that is not correct in each sentence.\n\nFor each question, carefully review the sentence and click on the option (A, B, C, or D) that you believe contains the incorrect word or group of words. After making your selection, you can proceed to the next question by clicking \"Next\". If needed, you can go back to previous questions by clicking \"Back\".",
|
||||
blank_space_text: undefined,
|
||||
reading_passage_utas: "Welcome to {part} of the {label}. In this section, you will read a text and answer the questions that follow.\n\nCarefully read the provided text, then select the correct answer (A, B, C, or D) for each question. After making your selection, you can proceed to the next question by clicking \"Next\". If you need to review or change your answers, you can go back at any time by clicking \"Back\".",
|
||||
fill_blanks_mc: "Welcome to {part} of the {label}. In this section, you will read a text and choose the correct word to fill in each blank space.\n\nFor each question, carefully read the text and click on the option (A, B, C, or D) that you believe best fits the context. Once you've made your choice, proceed to the next question by clicking \"Next\". If needed, you can go back to review or change your answers by clicking \"Back\"."
|
||||
fill_blanks_mc: "Welcome to {part} of the {label}. In this section, you will read a text and choose the correct word to fill in each blank space.\n\nFor each question, carefully read the text and click on the option that you believe best fits the context."
|
||||
};
|
||||
|
||||
const getDefaultPreset = () => {
|
||||
@@ -177,7 +177,7 @@ const TaskTab = ({ section, label, index, setSection }: { section: LevelSection;
|
||||
}, [descriptionOption])
|
||||
|
||||
useEffect(() => {
|
||||
if (section.part && ((descriptionOption.value === "Custom" || descriptionOption.value === "Default") && !section.part.intro)) {
|
||||
if (section?.part && ((descriptionOption.value === "Custom" || descriptionOption.value === "Default") && !section.part.intro)) {
|
||||
setUpdateIntro(true);
|
||||
}
|
||||
}, [section?.part, descriptionOption, category])
|
||||
@@ -590,11 +590,27 @@ const LevelGeneration = ({ id }: Props) => {
|
||||
|
||||
setIsLoading(true);
|
||||
|
||||
parts.forEach((part) => {
|
||||
part.part!.exercises.forEach((exercise, i) => {
|
||||
switch(exercise.type) {
|
||||
case 'fillBlanks':
|
||||
exercise.prompt.replaceAll('\n', '\\n')
|
||||
break;
|
||||
case 'multipleChoice':
|
||||
exercise.prompt.replaceAll('\n', '\\n')
|
||||
break;
|
||||
case 'writeBlanks':
|
||||
exercise.prompt.replaceAll('\n', '\\n')
|
||||
break;
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
const exam = {
|
||||
...generatedExam,
|
||||
id,
|
||||
label: label,
|
||||
parts: generatedExam.parts.map((p, i) => ({ ...p, exercises: parts[i].part!.exercises, category: parts[i].part?.category, intro: parts[i].part?.intro })),
|
||||
parts: generatedExam.parts.map((p, i) => ({ ...p, exercises: parts[i].part!.exercises, category: parts[i].part?.category, intro: parts[i].part?.intro?.replaceAll('\n', '\\n') })),
|
||||
};
|
||||
|
||||
axios
|
||||
|
||||
Reference in New Issue
Block a user