ENCOA-312
This commit is contained in:
@@ -41,12 +41,14 @@ const SpeakingComponents: React.FC<Props> = ({ localSettings, updateLocalAndSche
|
||||
const [selectedAvatar, setSelectedAvatar] = useState<Avatar | null>(null);
|
||||
|
||||
const randomDiff = difficulty.length === 1
|
||||
? capitalize(difficulty[0])
|
||||
: `Random (${difficulty.map(dif => capitalize(dif)).join(", ")})` as Difficulty;
|
||||
|
||||
const DIFFICULTIES = difficulty.length === 1
|
||||
? ["A1", "A2", "B1", "B2", "C1", "C2"]
|
||||
: ["A1", "A2", "B1", "B2", "C1", "C2", randomDiff];
|
||||
? capitalize(difficulty[0])
|
||||
: difficulty.length == 0 ?
|
||||
"Random" :
|
||||
`Selected (${difficulty.sort().map(dif => capitalize(dif)).join(", ")})` as Difficulty;
|
||||
|
||||
const DIFFICULTIES = difficulty.length === 1
|
||||
? ["A1", "A2", "B1", "B2", "C1", "C2", "Random"]
|
||||
: ["A1", "A2", "B1", "B2", "C1", "C2", randomDiff, "Random"];
|
||||
|
||||
const difficultyOptions: Option[] = DIFFICULTIES.map(level => ({
|
||||
label: level,
|
||||
|
||||
@@ -31,12 +31,14 @@ const WritingComponents: React.FC<Props> = ({ localSettings, updateLocalAndSched
|
||||
} = useExamEditorStore((store) => store.modules["writing"]);
|
||||
|
||||
const randomDiff = difficulty.length === 1
|
||||
? capitalize(difficulty[0])
|
||||
: `Random (${difficulty.map(dif => capitalize(dif)).join(", ")})` as Difficulty;
|
||||
? capitalize(difficulty[0])
|
||||
: difficulty.length == 0 ?
|
||||
"Random" :
|
||||
`Selected (${difficulty.sort().map(dif => capitalize(dif)).join(", ")})` as Difficulty;
|
||||
|
||||
const DIFFICULTIES = difficulty.length === 1
|
||||
? ["A1", "A2", "B1", "B2", "C1", "C2"]
|
||||
: ["A1", "A2", "B1", "B2", "C1", "C2", randomDiff];
|
||||
? ["A1", "A2", "B1", "B2", "C1", "C2", "Random"]
|
||||
: ["A1", "A2", "B1", "B2", "C1", "C2", randomDiff, "Random"];
|
||||
|
||||
const difficultyOptions: Option[] = DIFFICULTIES.map(level => ({
|
||||
label: level,
|
||||
|
||||
Reference in New Issue
Block a user