Solved a problem with the generation of listening

This commit is contained in:
Tiago Ribeiro
2024-02-05 11:08:40 +00:00
parent 45a4dbe018
commit fcf2993de0

View File

@@ -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