Did the same thing elsewhere
This commit is contained in:
@@ -143,10 +143,12 @@ def build_write_blanks_text_form(form: [], start_id):
|
|||||||
def build_write_blanks_solutions(questions: [], start_id):
|
def build_write_blanks_solutions(questions: [], start_id):
|
||||||
solutions = []
|
solutions = []
|
||||||
for i, q in enumerate(questions, start=start_id):
|
for i, q in enumerate(questions, start=start_id):
|
||||||
|
solution = [q["possible_answers"]] if isinstance(q["possible_answers"], str) else q["possible_answers"]
|
||||||
|
|
||||||
solutions.append(
|
solutions.append(
|
||||||
{
|
{
|
||||||
"id": str(i),
|
"id": str(i),
|
||||||
"solution": q["possible_answers"]
|
"solution": solution
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return solutions
|
return solutions
|
||||||
|
|||||||
Reference in New Issue
Block a user