Solved a problem with the generation of listening
This commit is contained in:
@@ -155,10 +155,12 @@ def build_write_blanks_solutions(questions: [], start_id):
|
|||||||
def build_write_blanks_solutions_listening(words: [], start_id):
|
def build_write_blanks_solutions_listening(words: [], start_id):
|
||||||
solutions = []
|
solutions = []
|
||||||
for i, word in enumerate(words, start=start_id):
|
for i, word in enumerate(words, start=start_id):
|
||||||
|
solution = [word] if isinstance(word, str) else word
|
||||||
|
|
||||||
solutions.append(
|
solutions.append(
|
||||||
{
|
{
|
||||||
"id": str(i),
|
"id": str(i),
|
||||||
"solution": word
|
"solution": solution
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return solutions
|
return solutions
|
||||||
|
|||||||
Reference in New Issue
Block a user